login | register
Sat 10 of May, 2008 [20:44 UTC]

voip-info.org

Search with Google
Search this site with Google. Results may not include recent changes.
 
Google Ads
Shoutbox
  • Nick Barnes, Fri 09 of May, 2008 [11:36 UTC]: Christopher - yesterday I tried an Asterisk install on a CentOS 5.1 box with stock GUI and it all worked fine. Sorry I can't help.
  • aero, Fri 09 of May, 2008 [08:20 UTC]: can someone help me out on this, i tried to play some sound files on my asterisk box and this is the error message i got. WARNING[4429]: format_wav.c:169 check_header: Unexpected freqency 22050 May 8 11:17:39 WARNING[4433]: codec_gsm.c:194 gsmtolin_fra
  • Christopher Faust, Thu 08 of May, 2008 [14:15 UTC]: I beleive that I may have to change something in the xserver configuration. Please advise
  • Christopher Faust, Thu 08 of May, 2008 [14:14 UTC]: Everything was perfect. In the bios I have increased the memory allocated Still receive input not supported on my display.
  • Christopher Faust, Thu 08 of May, 2008 [14:13 UTC]: This would not be my main box. I am doing some testing to see if I can install zaptel and asterisk 1.4 on a full centos 5.1 box with development software Its bizzare, because before I went through the asterisk and zaptel installation everything was perfe
  • Nick Barnes, Thu 08 of May, 2008 [13:44 UTC]: Christopher - I can't see any way in which an Asterisk installation would muck your GUI, but remember that it is advised not to use a GUI on an Asterisk box anyway.
  • Christopher Faust, Wed 07 of May, 2008 [15:28 UTC]: When I try to startx I ge input not supported. Though before installing asterisk I had no video issue to start the GUI
  • Christopher Faust, Wed 07 of May, 2008 [15:26 UTC]: Hi Nick, I got centos 5.1 and asterisk up But now I cannot start startx I have set the depth from 24 to 16 for the video i810 driver for the i845 on my netvista machine but I cannot start GNOME. Please advise
  • Nick Barnes, Wed 07 of May, 2008 [10:01 UTC]: Howard - You'll need to provide a lot more information if you really want help.
  • Nick Barnes, Wed 07 of May, 2008 [10:00 UTC]: Christopher - Search the Wiki and you'll find a page I wrote detailing exactly what you have to do for Asterisk 1.4 + CentOS 5.1.
Server Stats
  • Execution time: 0.36s
  • Memory usage: 2.22MB
  • Database queries: 33
  • GZIP: Disabled
  • Server load: 0.34

Asterisk Jabber

Jabber is a common name for XMPP-based instant-messaged and communication.

The Jabber module in Asterisk is available starting from the 1.4 series. Therefore, you can connect
Asterisk as a client (or component) to your Jabber server after you've upgraded to 1.4.

PHP script for sending jabber messages

I wrote the following PHP script to send a message via the jabber IM service to inform about an incoming call.

To get it running you need:

To use it in extensions.conf:
exten => s,1,AGI,jabber.php ; Notify via jabber
exten => s,n,Wait,30        ; Wait thirty second
exten => s,n,Answer         ; Answer the line

Have fun,
-mat-


 #!/usr/bin/php -q
 <?php
 //error_reporting(E_ALL);
 ini_set('display_errors', 0 );
 ini_set('include_path', '.:/usr/share/pear');
 require_once('class.jabber.php');

 ob_implicit_flush(true);
 set_time_limit(0);

 $err=fopen("php://stderr","w");
 $in = fopen("php://stdin","r");
 while (!feof($in)) {
     $temp = str_replace("\n","",fgets($in,4096));
     $s = split(":",$temp);
     $agi[str_replace("agi_","",$s[0])] = trim($s[1]);
     if (($temp == "") || ($temp == "\n")) {
         break;
     }
 }

 $JABBER = new Jabber;

 $JABBER->server   = 'jabber.de.cw.net';
 $JABBER->port     = 5222;
 $JABBER->username = 'asterisk';
 $JABBER->password = 'xxxx';
 $JABBER->resource = 'ClassJabberPHP';

 $JABBER->Connect() or die('Could not connect!');
 $JABBER->SendAuth() or die('Could not authenticate!');

 $JABBER->SendPresence(NULL,NULL,'online');

// $JABBER->SendMessage('xxx@jabber.de.cw.net', 'chat', NULL, array( 'body' => 'Call from '.$agi['callerid'].' on '.$agi['dnid'] ));
 $JABBER->SendMessage('xxx@jabber.de.cw.net', 'chat', NULL, array( 'body' => 'Call from '.htmlspecialchars($agi['callerid']).' on '.$agi['dnid'] ));

 $JABBER->Disconnect();
 fclose($in);
 fclose($err);
 ?>



app_jabber - jabber client as asterisk application

This asterisk application is a jabber client for use in the dialplan (extensions.conf). It supports multiple jabber accounts, SSL, message send and receive.

sample extensions.conf:
exten => 8013,1,Set(jid=arbeitszimmer/bef@arbeitszimmer)
exten => 8013,2,Set(JABBER_ACK_MSG=you are being called by ${CALLERIDNUM}.)
exten => 8013,3,JabberReceive(${jid},${JABBER_ACK_MSG})
exten => 8013,4,agi(speak.tcl,${JABBER_MSG})
exten => 8013,5,Set(JABBER_ACK_MSG="${JABBER_MSG}" read. please go ahead.)
exten => 8013,6,Goto(3)
exten => 8013,7,Hangup

arbeitszimmer is the name of the configuration section in jabber.conf and also the name of the jabber server (and as such the domain part of the JID).
This configuration is periodically trying to receive a message, which is then acknowledged after it has been read aloud by the festival spech synthesizer.

URL: http://fuhrmannek.de/projects/asterisk/app_jabber.bef

jabber.agi in Python


I've written a Jabber AGI script in Python. It is very simple, using sendxmpp to actually send the Jabber message. You also need pyst for this, which is an AGI interface Python module.

URL: http://www.unrealtower.org/asterisk

See also



Go back to Asterisk

Created by flavour, Last modification by Tzafrir Cohen on Fri 31 of Aug, 2007 [18:11 UTC]

Comments Filter

Jabber Client + SIP Support

by Brian Carpio on Saturday 26 of January, 2008 [01:11:16 UTC]
I would love to see the Jabber client offer SIP support.

Re: windows messenger live support?

by Geoff Jacobs on Wednesday 18 of July, 2007 [06:36:28 UTC]
No, MSN is a proprietary protocol and doesn't support jabber. However you can connect to MSN using a jabber client via a jabber server that is running an MSN gateway (such as PyMSNt).

windows messenger live support?

by vincent on Saturday 14 of October, 2006 [05:20:06 UTC]
Does messenger server support jabber? If so how do i authenticate myself to msn network using jabber.conf?

thank you very much !

by sjobeck on Thursday 25 of August, 2005 [00:21:46 UTC]
Thank you for this. This is a wonderful little piece of code. And an even more wonderful idea.

I hate AIM & MSN & Y!. I prefer ICQ, but even that runs over AOL's network, so, the only real option is to use jabber, and hopefully even an in-house jabber server.

Keep up the great work.

We all look very forward to any possible new versions & features. Keep it up.

Awesome.

Peace.

Jason

Syntax error

by dusty on Thursday 31 of March, 2005 [20:54:26 UTC]
There is a syntax error, can you fix the display please?

Also, is there any way to test the script from the command line?

Please update this page with new information, just login and click on the "Edit" or "Add Comment" button above. Get a free login here: Register Thanks! - support@voip-info.org

Page Changes | Comments

Sponsored by:

Terms of Service Privacy Policy
© 2003-2008 VOIP-Info.org LLC

Powered by bitweaver