Call Us Today! 877.742.2583




Page tree
Skip to end of metadata
Go to start of metadata

About

mod_snom is an application for controlling the functionality and appearance of the programmable softkeys on a Snom phone. It also adds the possibility to send KEY events to snoms embedded webserver.

It was tested with firmware series 7.3.x, 8.2.x and 8.4.x on Snom models 370, 820 and 870.

 Click here to expand Table of Contents

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.

Otherwise you just have to configure one of your fkeys as "Button" and add an numeric index e.g "2" for fkey 2.

Usage

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 [[mod_sofia|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>

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'.

 

Control Keys using HTTP

Sends Keyevents to the SNOM phone using the embedded webserver (if enabled) to simulate a keypress. See [http://wiki.snom.com/FAQ/Can_I_control_my_snom_phone_remotely SNOM wiki] for more infos.

Usage:

snom_command <ip|user> <command> <type> <username> <password> 

Possible combinations:

snom_command */<user> key <key> 

or

snom_command */<user>@<domain> key <key> 

or

snom_command <profile>/<user>@<domain> key <key> 

or

snom_command <ip> key <key> 

Examples:

snom_command */2000 key enter 

This command sends the ENTER key command to the snom from which user is registered to FreeSWITCH. If a call is ringing, you can pick up the call using this technique.

Using IP:

snom_command 10.1.1.1 key enter 

Its even possible to give key sequences

snom_command */2000 key enter,50,5000;cancel,50,1000

Reference