login | register
Wed 01 of Aug, 2007 [09:23 UTC]

voip-info.org

Search with Google
Search this site with Google. Results may not include recent changes.

Web www.voip-info.org
Shoutbox
  • Aykut, Wed 01 of Aug, 2007 [07:53 UTC]: Hi all, does anybody know about Thomson ST2030 SIP phone. I have upgraded it to latest version (1.56) but "Hold" and "Conf" features are not working after the upgrade ?? Do you know any solution or do you have Ver. 1.52 ?? Where can I find it?
  • Edward J Brown, Tue 31 of Jul, 2007 [23:33 UTC]: Has anybody experienced Choppy voice quality when using a Linksys SPA942 in an Asterisk Conference bridge? It works fine with my polycom and Cisco, but sucks with my Linksys.
  • www.astawerks.com, Fri 27 of Jul, 2007 [18:00 UTC]: does anyone use asterisk on top of clark connect? does it work good?
  • simon, Fri 27 of Jul, 2007 [14:16 UTC]: Hi All, Has anyone here managed to get the Cisco79x1 to successfully fail over to the backup proxy. I have 2 asterisk servers , handsets all register and function, except that backup proxy function doesn't work. Any working example would be very apprecia
  • Matthew Richmond, Thu 26 of Jul, 2007 [03:40 UTC]: using the page() application to page across our building...often the meetme conferences don't disconnect after the caller hangs up. Anyone else having this problem. (using Polycom phones)
  • Matthew Richmond, Wed 25 of Jul, 2007 [02:58 UTC]: thanks Nicholas Blasgen! I haven't worked with AGI before, but there's always a first! Thanks again!
  • Nicholas Blasgen, Tue 24 of Jul, 2007 [19:18 UTC]: Matthew Richmond, AGI will handle all that for you.
  • sam, Mon 23 of Jul, 2007 [16:39 UTC]: need help - certain voicemail extension will stop working and recording voicemail on asterisk - anyone know why and how to fix it? Thanks
  • john haji, Mon 23 of Jul, 2007 [14:55 UTC]: free calls to pakistan
  • bong, Sat 21 of Jul, 2007 [19:09 UTC]: hi good day to all can anyone help me how to configured the nortel sip to the signaling server and how to activate in mobile w/ sip compatible without mcs
Server Stats
  • Execution time: 0.38s
  • Memory usage: 2.20MB
  • Database queries: 32
  • GZIP: Disabled
  • Server load: 2.99

Aynchronous Javascript Asterisk Manager (AJAM)

AJAM is a new technology available in Asterisk 1.4 which allows web browsers or other HTTP enabled applications and web pages to directly access the Asterisk Manager Interface (AMI) via HTTP. Setting up your server to process AJAM involves a few steps:

Setup the Asterisk HTTP server


1) Uncomment the line "enabled=yes" in /etc/asterisk/http.conf to enable Asterisk's builtin micro HTTP server.

2) If you want Asterisk to actually deliver simple HTML pages, CSS, JavaScript, etc. you should uncomment "enablestatic=yes"

3) Adjust your "bindaddr" and "bindport" settings as appropriate for your desired accessibility

4) Adjust your "prefix" if appropriate, which must be the beginning of any URI on the server to match. The default is "asterisk" and the rest of these instructions assume that value.

Allow Manager Access via HTTP


1) Make sure you have both "enabled = yes" and "webenabled = yes" setup in /etc/asterisk/manager.conf

2) You may also use "httptimeout" to set a default timeout for HTTP connections.

3) Make sure you have a manager username/secret

Once these configuration changes are complete you can reload or restart Asterisk and you should be able to point your web browser to specific URI's which will allow you to access various web functions. A complete list can be found by typing "show http" at the Asterisk CLI.

Examples:

http://localhost:8088/asterisk/manager?action=login&username=foo&secret=bar

This logs you into the manager interface's "HTML" view. Once you're logged in, Asterisk stores a cookie on your browser (valid for the length of httptimeout) which is used to connect to the same session.

http://localhost:8088/asterisk/rawman?action=status

Assuming you've already logged into manager, this URI will give you a "raw" manager output for the "status" command.

http://localhost:8088/asterisk/mxml?action=status

This will give you the same status view but represented as AJAX data, theoretically compatible with RICO (http://www.openrico.org).

http://localhost:8088/asterisk/static/ajamdemo.html

If you have enabled static content support and have done a make install, Asterisk will serve up a demo page which presents a live, but very basic, "astman" like interface. You can login with your username/secret for manager and have a basic view of channels as well as transfer and hangup calls. It's only tested in Firefox, but could probably be made to run in other browsers as well.

A sample library (astman.js) is included to help ease the creation of manager HTML interfaces.

Note that for the demo, there is no need for *any* external web server.

Integration with other web servers


Asterisk's micro HTTP server is *not* designed to replace a general purpose web server and it is intentionally created to provide only the minimal interfaces required. Even without the addition of an external web server, one can use Asterisk's interfaces to implement screen pops and similar tools pulling data from other web servers using iframes, div's etc. If you want to integrate CGI's, databases, PHP, etc. you will likely need to use a more traditional web server like Apache and link in your Asterisk micro HTTP server with something like this:

ProxyPass /asterisk http://localhost:8088/asterisk

Created by muppetmaster, Last modification by Sean Bright on Wed 25 of Apr, 2007 [22:15 UTC]

Comments Filter

Re: 1.4-beta2 ajamdemo not working?

by Yan, SY FUNG on Sunday 29 of April, 2007 [09:12:53 UTC]
Just download the latest release 1.4.4, expanded the package to a temp directory, then copy the whole directory "static-http" to the root directory of my Apache default root.

The 404 error prompts at my URL "http://localhost/static-http/ajamdemo.html" and find the error log in my httpd log file:

"error client 127.0.0.1 File does not exist: /var/www/html/rawman, referer: http://localhost/static-http/ajamdemo.html".

It also found that only the files find in the "static-http" directory bundle with the 1.4.4:

-rw-r--r-- 1 apache apache 6066 May 7 2006 ajamdemo.html
-rw-r--r-- 1 apache apache 461 Apr 1 2006 astman.css
-rw-r--r-- 1 apache apache 7914 Apr 3 2006 astman.js
-rw-r--r-- 1 apache apache 47445 Apr 1 2006 prototype.js

As a result, Ajam modules is ONLY partial bundled.

You are welcome to update my points of view for the above.

Best regards,

Yan, SY FUNG.

Re: 1.4-beta2 ajamdemo not working?

by siqhamo on Sunday 22 of October, 2006 [09:51:23 UTC]
The thing does work all u need to is to go to your manager.conf and set webenabled=yes.

by www.astawerks.com on Friday 22 of September, 2006 [18:19:02 UTC]
this thing does not work!!!.

1.4-beta2 ajamdemo not working?

by Milo on Friday 22 of September, 2006 [13:48:22 UTC]
I was curious to see this new HTTP interface so I installed 1.4-beta2, but when I go to http://blah/asterisk/static/ajamdemo.html a little popup box comes up and says "Error: 404: Not Found", but the interface displays fine, although clicking on anything gives this same error.

Any idea where the HTTP logs would be, to debug this issue?

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-2007 Arte Marketing, Inc.

Powered by bitweaver