Updated: 2014/12/30 8:06PM (UTC-2)

AstDemo was created to improve XMPP and VoIP integration, adding new features in scenarios that use this two technologies. The goal is to transform Asterisk+Openfire in a powerful solution, allowing VoIP operation directly in XMPP clients.


  • Openfire
  • Asterisk 11 or later with XMPP support
  • PostgreSQL
  • ServerInfo Plugin (http://www.mundoopensource.com.br/serverinfo-plugin-openfire/)
  • pyst (http://sourceforge.net/projects/pyst/)
  • psycopg2 (http://initd.org/psycopg/)
  • xmpppy (http://xmpppy.sourceforge.net/)


  • To install AstDemo download its latest version here and then open it in agi-bin Asterisk directory (a subdirectory astdemo will be created).
  • Create AstDemo database (schema available in db/pgsql/astdemo.sql).
  • Copy config.ini.sample to config.ini and change it with your scenario informations.
  • Configure Asterisk xmpp (or jabber) resource. (example available in asterisk_config/xmpp.conf)
  • Then edit extensions.conf, adding [from_xmpp_demo] context and the new variables in [globals] context. If you want to use dnd and callerid update your extensions context. You’ll find examples in asterisk_config/extensions.conf.

Using AstDemo

To use AstDemo add astdemo@yourjabberdomain.com in your roster and start to send messages to it. Valid commands are:

  • callmsg <number> – make a call to <number> and play tt-monkeys when answered.
  • callerid <extension> [jid] – enable or disable the callerid xmpp message on received calls to extension.
  • info <voip|xmpp> – show VoIP or XMPP server informations.
  • help – show this help.
  • iaxpeers – show IAX peers.
  • monitor iax <peer> – monitor iax <peer> state.
  • monitor sip <extension> – monitor <extension> state.
  • monitor queue <queue> – monitor queue <queue> and alarm when it has no members logged.
  • monitoring – show monitoring items.
  • sippeer <extension> – show SIP informations of <extension>.
  • sippeers – show SIP peers.
  • unmonitor iax <peer> – unmonitor iax <peer> state.
  • unmonitor sip <extension> – unmonitor <extension> state.
  • unmonitor queue <queue> – unmonitor queue <queue>.
  • version – show astdemo version.

If you have Asterisk Realtime enabled you’ll have access to more commands:

  • call <sip extension> – call to <sip extension> and transfer to your extension when answered.
  • dnd <on|off|status> – enable/disable or show Do Not Disturb status.
  • queue <queue> – show <queue> members and statistics.
  • queuemsg <queue> <message> – send <message> to all members of <queue>.
  • enter <queue> – join <queue>.
  • leave <queue> – leave <queue>.
  • whoami – show informations about myself.

Asterisk Realtime

First: do you have Asterisk Realtime enabled? Read more about Asterisk Realtime Architecture here. You need this activated to use Asterisk Realtime in AstDemo.

To enable Asterisk Realtime in AstDemo, you need to have a field in your sip table to store jabberid of extension(jid, character varying, tamanho 150). You’ll need to link extensions with jid in sip table too. And don’t forget to activate realtime support in config.ini file.


To enable monitoring copy cronjob file to your cron (cron/astdemo_monitor). This cronjob run astdemo_monitor.py each 5 minutes.

If you want to monitor SIP or IAX peers, you need qualify enabled in peer configuration (qualify=yes).


  • No roadmap yet.


You can download  AstDemo version in Mundo Open Sourc site.


Available here.

Source code

AstDemo is available on Github in this URL (GPL v2.0).


Floating Social Media Icons by Acurax Wordpress Designers
Visit Us On FacebookVisit Us On TwitterCheck Our FeedVisit Us On Linkedin