Mod snom
From FreeSWITCH Wiki
Contents |
Introduction
mod_snom is an application for controlling the functionality and appearance of the programmable softkeys on a Snom Snom phone.
It was tested with firmware series 7.3.x, 8.2.x and 8.4.x on Snom models 370, 820 and 870.
Prerequests
If you plan to trigger this from other sip servers than FreeSWITCH you have to set some values in the phone configuration like this description in the snom wiki here.
Otherwise you just have to configure one of your fkeys as "Button" and add an numeric index e.g "2" for fkey 2.
Synopsis
snom_bind_key <key> <light> <label> <user> <host> <profile> [<action_name>] [<action>]
Parameters
key: number or name of the key to control
light: state of the led/light for the key, possible values are:
- off
- on
- hold
- pickup
- park
- message
- offline (indicates that phone is not available or DND is active)
- error
label: a UTF8 text label describing what the key does
user: the SIP user (phone) to send the key configuration to
host: the host the SIP user is on (usually FS itself)
profile: the sofia profile the user is located under
action_name: the type of action to take when the key is pressed (optional)
- invite - dials the number given in the action field
- message - send a SIP message with data in the action field
action: data for the action_name field, value depends on the type of action_name, see example below.
Example
From the conf/dialplan/default.xml file: Snom button demo, call 9000 to make button 2 mapped to transfer the current call to a conference
<extension name="snom-demo-1">
<condition field="destination_number" expression="^9000$">
<!-- <key> <light> <label> <user> <host> <profile> <action_name> <action> -->
<action application="eval" data="${snom_bind_key(2 on DND ${sip_from_user} ${sip_from_host} ${sofia_profile_name} message api+uuid_transfer ${uuid} 9001)}"/>
<action application="playback" data="$${hold_music}"/>
</condition>
</extension>
<extension name="snom-demo-2">
<condition field="destination_number" expression="^9001$">
<action application="eval" data="${snom_bind_key(2 off DND ${sip_from_user} ${sip_from_host} ${sofia_profile_name} message notused)}"/>
<action application="transfer" data="3000"/>
</condition>
</extension>
Note:
Snom firmware 8.x: If you want to actually have the phone flash the second line you must set the line type to 'button' and the Number to the number of the line eg. '2' in the Function Keys section of the phone's web interface or things won't work.
Snom firmware 7.x: If you want to actually have the phone flash the second line you must set the line type to 'button'.

