FreeSWITCH uaCSTA for Siemens OpenStage Phones

5 years after


FreeSWITCH uaCSTA via mod_erlang_event module for Siemens OpenStage SIP phones.


  • Works only with Siemens OpenStage SIP phones, because it's not standard uaCSTA.
  • No response of the NOTIFY request with the uaCSTA is processed, so this is fire and forget. This is a limitation of FreeSWITCH.
  • When the connection to the FreeSWITCH goes down, the gen_server process will automatically stop, but will not automatically reconnect, once the FreeSWICTH is up again.
  • Only a few uaCSTA requests are implemented, which made sense with the limitations described above.
  • No uaCSTA events are processed, because OpenStage phones do not send any events.

Implemented uaCSTA Requests

  • AnswerCall
  • MakeCall
  • SetForwarding


Before you can use fs_uacsta, you need to to the following.

FreeSWITCH Configuration

You need to edit /etc/freeswitch/autoload_configs/modules.conf and add the following:

    !!! WARNING !!!

    Only the necessary parts of the xml to run mod_erlang_event is shown here.
    You probably want more modules loaded, like mod_sofia, or this will not
    make a whole lot of sense. Please consult the FreeSWITCH wiki at
    http://wiki.freeswitch.org on how to accomplish this.
<configuration name="modules.conf">
        <load module="mod_erlang_event"/>

You can copy and paste this to /etc/freeswitch/autoload_configs/erlang_event.conf:

<configuration name="erlang_event.conf">
        <param name="listen-ip" value=""/>
        <param name="listen-port" value="8031"/>
        <param name="nodename" value="[email protected]$${local_ip_v4}"/>
        <param name="cookie" value="pantech"/>
        <param name="encoding" value="binary"/>


Get it from GitHub:

$ git clone https://github.com/matthias-endler/fs_uacsta.git

Compile it:

$ cd fs_uacsta
$ make

Then in the start an Erlang shell:

$ erl -pa ebin -name [email protected] -setcookie pantech

Make sure you use your local ip address instead of

Start fs_uacsta:

1> application:start(fs_uacsta).

Connect to FreeSWITCH mod_sofia SIP profile (assuming the ip address of FreeSWITCH is and the profile name is internal):

2> {ok, Ref} fs_uacsta:connect('[email protected]', <<"internal">>).
{ok, <0.114.0>}

Make a call from a phone which is registered to sip:[email protected] to extension 1001:

3> fs_uacsta:make_call(Ref, <<"1000">>, <<"">>, <<"1001">>).

Call the phone registered at sip:[email protected] and answer it:

4> fs_uacsta:answer_call(Ref, <<"1000">>, <<"">>).

Supported forward types are:

  • forwardImmediate
  • forwardBusy
  • forwardNoAns

Set the immediate forwarding on a phone registered at sip:[email protected] to extension 1001:

5> fs_uacsta:set_forwarding(Ref, <<"1000">>, <<"">>, forwardImmediate, <<"1001">>, true).

And cancel the forwarding again:

6> fs_uacsta:set_forwarding(Ref, <<"1000">>, <<"">>, forwardImmediate, <<"1001">>, false).

Other Documentation



This project is licensed under the ISC License. See LICENSE for details.

Copyright © 2013, Matthias Endler. All rights reserved.