Skip to content
XMPP + VoIP (Openfire + Asterisk) demo integration.
Python
Branch: master
Clone or download
mhterres * Better socket support
* Little improvements
Latest commit 65f2c6c Sep 13, 2016
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
asterisk_config * Version 0.1.6.1 (2014-12-30) Marcelo H. Terres <mhterres@mundoopens… Dec 30, 2014
audios * Version 0.1.6.1 (2014-12-30) Marcelo H. Terres <mhterres@mundoopens… Dec 30, 2014
cron * Version 0.1.6 (2014-12-30) Marcelo H. Terres <mhterres@mundoopensou… Dec 30, 2014
db/pgsql * Version 0.1.6.2 (2014-01-03) Marcelo H. Terres <mhterres@mundoopens… Jan 3, 2015
CALLS.txt * Version 0.1.3.2 - Marcelo H. Terres <mhterres@mundoopensource.com.br> Dec 26, 2014
CHANGELOG
README.md
TODO * Version 0.1.6.1 (2014-12-30) Marcelo H. Terres <mhterres@mundoopens… Dec 30, 2014
astdemo.agi * Better socket support Sep 13, 2016
astdemo_classes.py * Version 0.1.6.1 (2014-12-30) Marcelo H. Terres <mhterres@mundoopens… Dec 30, 2014
astdemo_db.py * Version 0.1.6 (2014-12-30) Marcelo H. Terres <mhterres@mundoopensou… Dec 30, 2014
astdemo_defs.py * Better socket support Sep 13, 2016
astdemo_monitor.py * Version 0.1.6 (2014-12-30) Marcelo H. Terres <mhterres@mundoopensou… Dec 30, 2014
config.ini.sample * Better socket support Sep 13, 2016

README.md

AstDemo

XMPP + VoIP (Openfire + Asterisk) demo integration.

Requisites


Installation


  • Create a subdirectory in your agi-bin asterisk dir named astdemo
  • Put all astdemo files there
  • Create you astdemo database (you can use db/pgsql/astdemo.sql)
  • Copy config.ini.sample to config.ini and update inifile with your data
  • Configure your xmpp Asterisk resource (asterisk_config/xmpp.conf has a sample of configuration)
  • Edit your extensions.conf file, adding [from_xmpp_demo] context, [call] context and adding variables in [globals] context. If you want support to features like callerid and dnd, adapt your extensions context too. See extensions.conf file in asterisk_config directory.

Available Commands


  • callmsg - make a call to and play tt-monkeys when answered.
  • callerid [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 - monitor iax state.
  • monitor sip - monitor state.
  • monitor queue - monitor queue and alarm when it has no members logged.
  • monitoring - show monitoring items.
  • sippeer - show SIP informations of .
  • sippeers - show SIP peers.
  • unmonitor iax - unmonitor iax state.
  • unmonitor sip - unmonitor state.
  • unmonitor queue - unmonitor queue .
  • version - show astdemo version.

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

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

Asterisk Realtime Support


First question: do you have Asterisk Realtime enabled? Read more about Asterisk Realtime Architecture in https://wiki.asterisk.org/wiki/display/AST/Realtime+Database+Configuration. After your Asterisk have Realtime support, you can continue.

To activate Asterisk Realtime support in AstDemo, first you need to have a jid field in your sip database table (jid, character varying, length 150). If you have it, you just need to enable asterisk realtime support in config.ini file.

If you activate Asterisk Realtime support in AstDemo you will release more AstDemo features.

After Asterisk Realtime support activation you will see new commands in help and some commands will change, like callerid, cause you don't need to indicate your extension and your jid anymore, it'll just toggle xmpp message.

ATTENTION: you need to configure your sip record with your jid, or new resources will not work.

Monitoring


To activate monitoring copy the cronjob file (cron/astdemo_monitor) to /etc/cron.d. To monitor IAX or SIP devices you need to qualify peer in its configuration (qualify=yes)

You can’t perform that action at this time.