Go Back   Voxilla VoIP Forum > Hardware/Software Support Forums > Asterisk Support Forum

Asterisk Support Forum Technical support, how-to guides, troubleshooting, and general assistance, from beginner to seasoned pro, this is where to discuss Asterisk, the most powerful open source PBX.



Reply
 
LinkBack Thread Tools Rate Thread Display Modes
  #1 (permalink)  
Old February 17th, 2009, 07:57 PM
eric's Avatar
Administrator
 
Join Date: Jun 2006
Location: San Francisco, California
Posts: 712
Blog Entries: 34
eric is an unknown quantity at this point
Default Asterisk in a cloud - Asterisk 1.6.0.5 optimized for Amazon EC2

We've received a number of requests for an Amazon EC2 AMI built based on the Asterisk in a cloud tutorial, so we built one.

Open source Asterisk PBX running on your corner of the Amazon cloud. Asterisk 1.6.0.5 with a VoIP optimized kernel timer.

AMI ID: ami-0bfa1d62
AMI Manifest: voxilla/asterisk-1.6.0.5-i386.manifest.xml
License: Public
Operating System: Linux/Unix

About this AMI
Published by Voxilla (http://voxilla.com).

This AMI is a build of Asterisk 1.6.0.5 on Fedora 8 with the kernel timer optimized for VoIP (1000Hz timer).

Asterisk was buit from the Asterisk in a cloud tutorial.

This AMI contains:
  • Asterisk 1.6.0.5
  • DAHDI (dahdi_dummy - used by MeetMe conferencing and IAX2)
  • VoIP optimized 1000Hz kernel timer

Release notes
  • Asterisk runs under the asterisk user and group, instead of root.
  • For help identifying network ports used by Asterisk or configuring an Asterisk EC2 Security Group, see the Asterisk in a cloud tutorial.
  • The Asterisk configuration was made by running make samples.
  • sip.conf was changed to treat the 10.0.0.0/8 subnet as a localnetwork, SIP TCP is enabled, and STUN is used to determine the public IP address of the server.
  • The following modules are enabled by the sample configuration:

    Code:
    Module                      Description
    app_adsiprog                Asterisk ADSI Programming Application
    app_alarmreceiver           Alarm Receiver for Asterisk
    app_amd                     Answering Machine Detection Application
    app_authenticate            Authentication Application
    app_cdr                     Tell Asterisk to not maintain a CDR for
    app_chanisavail             Check channel availability
    app_channelredirect         Redirects a given channel to a dialplan
    app_chanspy                 Listen to the audio of an active channel
    app_controlplayback         Control Playback Application
    app_dahdibarge              Barge in on DAHDI channel application
    app_dahdiras                DAHDI ISDN Remote Access Server
    app_dahdiscan               Scan DAHDI channels application
    app_db                      Database Access Functions
    app_dial                    Dialing Application
    app_dictate                 Virtual Dictation Machine
    app_directed_pickup         Directed Call Pickup Application
    app_directory               Extension Directory
    app_disa                    DISA (Direct Inward System Access) Appli
    app_dumpchan                Dump Info About The Calling Channel
    app_echo                    Simple Echo Application
    app_exec                    Executes dialplan applications
    app_externalivr             External IVR Interface Application
    app_festival                Simple Festival Interface
    app_flash                   Flash channel application
    app_followme                Find-Me/Follow-Me Application
    app_forkcdr                 Fork The CDR into 2 separate entities
    app_getcpeid                Get ADSI CPE ID
    app_ices                    Encode and Stream via icecast and ices
    app_image                   Image Transmission Application
    app_jack                    JACK Interface
    app_macro                   Extension Macros
    app_meetme                  MeetMe conference bridge
    app_milliwatt               Digital Milliwatt (mu-law) Test Applicat
    app_minivm                  Mini VoiceMail (A minimal Voicemail e-ma
    app_mixmonitor              Mixed Audio Monitoring Application
    app_morsecode               Morse code
    app_mp3                     Silly MP3 Application
    app_nbscat                  Silly NBS Stream Application
    app_page                    Page Multiple Phones
    app_parkandannounce         Call Parking and Announce Application
    app_pickupchan              Channel Pickup Application
    app_playback                Sound File Playback Application
    app_privacy                 Require phone number to be entered, if n
    app_queue                   True Call Queueing
    app_read                    Read Variable Application
    app_readexten               Read and evaluate extension validity
    app_readfile                Stores output of file into a variable
    app_record                  Trivial Record Application
    app_sayunixtime             Say time
    app_senddtmf                Send DTMF digits Application
    app_sendtext                Send Text Applications
    app_setcallerid             Set CallerID Presentation Application
    app_sms                     SMS/PSTN handler
    app_softhangup              Hangs up the requested channel
    app_speech_utils            Dialplan Speech Applications
    app_stack                   Dialplan subroutines (Gosub, Return, etc
    app_system                  Generic System() application
    app_talkdetect              Playback with Talk Detection
    app_test                    Interface Test Application
    app_transfer                Transfers a caller to another extension
    app_url                     Send URL Applications
    app_userevent               Custom User Event Application
    app_verbose                 Send verbose output
    app_voicemail               Comedian Mail (Voicemail System)
    app_waitforring             Waits until first ring after time
    app_waitforsilence          Wait For Silence
    app_waituntil               Wait until specified time
    app_while                   While Loops and Conditional Execution
    app_zapateller              Block Telemarketers with Special Informa
    cdr_adaptive_odbc           Adaptive ODBC CDR backend
    cdr_csv                     Comma Separated Values CDR Backend
    cdr_custom                  Customizable Comma Separated Values CDR
    cdr_manager                 Asterisk Manager Interface CDR Backend
    cdr_odbc                    ODBC CDR Backend
    cdr_pgsql                   PostgreSQL CDR Backend
    cdr_radius                  RADIUS CDR Backend
    cdr_sqlite3_custom          SQLite3 Custom CDR Module
    chan_agent                  Agent Proxy Channel
    chan_dahdi                  DAHDI Telephony
    chan_gtalk                  Gtalk Channel Driver
    chan_iax2                   Inter Asterisk eXchange (Ver 2)
    chan_jingle                 Jingle Channel Driver
    chan_local                  Local Proxy Channel (Note: used internal
    chan_mgcp                   Media Gateway Control Protocol (MGCP)
    chan_oss                    OSS Console Channel Driver
    chan_phone                  Linux Telephony API Support
    chan_sip                    Session Initiation Protocol (SIP)
    chan_skinny                 Skinny Client Control Protocol (Skinny)
    chan_unistim                UNISTIM Protocol (USTM)
    codec_a_mu                  A-law and Mulaw direct Coder/Decoder
    codec_adpcm                 Adaptive Differential PCM Coder/Decoder
    codec_alaw                  A-law Coder/Decoder
    codec_dahdi                 Generic DAHDI Transcoder Codec Translato
    codec_g722                  ITU G.722-64kbps G722 Transcoder
    codec_g726                  ITU G.726-32kbps G726 Transcoder
    codec_gsm                   GSM Coder/Decoder
    codec_ilbc                  iLBC Coder/Decoder
    codec_lpc10                 LPC10 2.4kbps Coder/Decoder
    codec_resample              SLIN Resampling Codec
    codec_speex                 Speex Coder/Decoder
    codec_ulaw                  mu-Law Coder/Decoder
    format_g723                 G.723.1 Simple Timestamp File Format
    format_g726                 Raw G.726 (16/24/32/40kbps) data
    format_g729                 Raw G729 data
    format_gsm                  Raw GSM data
    format_h263                 Raw H.263 data
    format_h264                 Raw H.264 data
    format_ilbc                 Raw iLBC data
    format_jpeg                 JPEG (Joint Picture Experts Group) Image
    format_ogg_vorbis           OGG/Vorbis audio
    format_pcm                  Raw/Sun uLaw/ALaw 8KHz (PCM,PCMA,AU), G.
    format_sln                  Raw Signed Linear Audio support (SLN)
    format_sln16                Raw Signed Linear 16KHz Audio support (S
    format_vox                  Dialogic VOX (ADPCM) File Format
    format_wav                  Microsoft WAV format (8000Hz Signed Line
    format_wav_gsm              Microsoft WAV format (Proprietary GSM)
    func_base64                 base64 encode/decode dialplan functions
    func_blacklist              Look up Caller*ID name/number from black
    func_callerid               Caller ID related dialplan functions
    func_cdr                    Call Detail Record (CDR) dialplan functi
    func_channel                Channel information dialplan function
    func_curl                   Load external URL
    func_cut                    Cut out information from a string
    func_db                     Database (astdb) related dialplan functi
    func_devstate               Gets or sets a device state in the dialp
    func_dialgroup              Dialgroup dialplan function
    func_dialplan               Dialplan Context/Extension/Priority Chec
    func_enum                   ENUM related dialplan functions
    func_env                    Environment/filesystem dialplan function
    func_extstate               Gets an extension's state in the dialpla
    func_global                 Variable dialplan functions
    func_groupcount             Channel group dialplan functions
    func_iconv                  Charset conversions
    func_lock                   Dialplan mutexes
    func_logic                  Logical dialplan functions
    func_math                   Mathematical dialplan function
    func_md5                    MD5 digest dialplan functions
    func_module                 Checks if Asterisk module is loaded in m
    func_odbc                   ODBC lookups
    func_rand                   Random number dialplan function
    func_realtime               Read/Write/Store/Destroy values from a R
    func_sha1                   SHA-1 computation dialplan function
    func_shell                  Returns the output of a shell command
    func_strings                String handling dialplan functions
    func_sysinfo                System information related functions
    func_timeout                Channel timeout dialplan functions
    func_uri                    URI encode/decode dialplan functions
    func_version                Get Asterisk Version/Build Info
    func_vmcount                Indicator for whether a voice mailbox ha
    func_volume                 Technology independent volume control
    pbx_ael                     Asterisk Extension Language Compiler
    pbx_config                  Text Extension Configuration
    pbx_dundi                   Distributed Universal Number Discovery (
    pbx_loopback                Loopback Switch
    pbx_realtime                Realtime Switch
    pbx_spool                   Outgoing Spool Support
    res_adsi                    ADSI Resource
    res_ael_share               share-able code for AEL
    res_agi                     Asterisk Gateway Interface (AGI)
    res_clioriginate            Call origination from the CLI
    res_config_curl             Realtime Curl configuration
    res_config_ldap             LDAP realtime interface
    res_config_odbc             Realtime ODBC configuration
    res_config_pgsql            PostgreSQL RealTime Configuration Driver
    res_convert                 File format conversion CLI command
    res_crypto                  Cryptographic Digital Signatures
    res_indications             Region-specific tones
    res_jabber                  AJI - Asterisk Jabber Interface
    res_limit                   Resource limits
    res_monitor                 Call Monitoring Resource
    res_musiconhold             Music On Hold Resource
    res_odbc                    ODBC resource
    res_phoneprov               HTTP Phone Provisioning
    res_realtime                Realtime Data Lookup/Rewrite
    res_smdi                    Simplified Message Desk Interface (SMDI)
    res_snmp                    SNMP [Sub]Agent for Asterisk
    res_speech                  Generic Speech Recognition API
__________________
Eric Chamberlain

Last edited by eric; February 17th, 2009 at 11:58 PM. Reason: Updated AMI information
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old February 25th, 2009, 03:38 PM
Junior Member
 
Join Date: Feb 2009
Posts: 3
dgiulianelli is on a distinguished road
Default Re: Asterisk in a cloud - Asterisk 1.6.0.5 optimized for Amazon EC2

Eric,

I tried your tutorial and everything went fine except that I can't find a way to register my SIP phones with my instance of Asterisk in the cloud. I double checked the Asterisk group permissions, but when I send an invite to the amazon server, I get not response.
In my test I added the following lines to sip.conf:

[2001]
type=friend
username=2001
host=dynamic
context=default

I restarted Asterisk and then configured and tried to register first with my CISCO 7960 IP phone, and then with Zoiper softphone, but the request doesn't seem to go through (no activity on the Asterisk console at all).
Any ideas on what I'm doing wrong?
Thanks in advance.
Danilo Giulianelli
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3 (permalink)  
Old February 25th, 2009, 04:50 PM
eric's Avatar
Administrator
 
Join Date: Jun 2006
Location: San Francisco, California
Posts: 712
Blog Entries: 34
eric is an unknown quantity at this point
Default Re: Asterisk in a cloud - Asterisk 1.6.0.5 optimized for Amazon EC2

Danilo,

Can you ping the box?

Then make sure asterisk is listening on the correct ports, from the command line type:

Code:
netstat -nap | grep asterisk
The output will show you what processes are listening and on which port. You should see something like:
Code:
tcp        0      0 0.0.0.0:5060                0.0.0.0:*                   LISTEN      21431/asterisk      
tcp        0      0 0.0.0.0:5061                0.0.0.0:*                   LISTEN      21431/asterisk      
udp        0      0 0.0.0.0:5000                0.0.0.0:*                               21431/asterisk      
udp        0      0 0.0.0.0:2727                0.0.0.0:*                               21431/asterisk      
udp        0      0 0.0.0.0:4520                0.0.0.0:*                               21431/asterisk      
udp        0      0 0.0.0.0:5060                0.0.0.0:*                               21431/asterisk      
udp        0      0 0.0.0.0:4569                0.0.0.0:*                               21431/asterisk      
unix  2      [ ACC ]     STREAM     LISTENING     4808258 21431/asterisk      /var/run/asterisk/asterisk.ctl
unix  3      [ ]         STREAM     CONNECTED     6458571 21431/asterisk      
unix  3      [ ]         STREAM     CONNECTED     4808274 21431/asterisk
The important line is to make sure asterisk is listening on UDP port 5060.




Have you checked the SIP settings and tried enabling SIP debug to confirm that the traffic is getting to the asterisk box?

From the command line:
Code:
asterisk -rvvvvvvvvvv
then type:

Code:
sip show settings
Make sure the externip address is your EC2 public IP address.

then type:
Code:
sip set debug on

Then restart your phone and see if you see any traffic registration traffic.
__________________
Eric Chamberlain
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #4 (permalink)  
Old February 25th, 2009, 05:09 PM
Junior Member
 
Join Date: Feb 2009
Posts: 3
dgiulianelli is on a distinguished road
Default Re: Asterisk in a cloud - Asterisk 1.6.0.5 optimized for Amazon EC2

I can ping the box without problems. The output of my netstat is the following:

tcp 0 0 0.0.0.0:5060 0.0.0.0:* LISTEN 810/asterisk
tcp 0 0 0.0.0.0:2000 0.0.0.0:* LISTEN 810/asterisk
udp 0 0 0.0.0.0:5000 0.0.0.0:* 810/asterisk
udp 0 0 0.0.0.0:2727 0.0.0.0:* 810/asterisk
udp 0 0 0.0.0.0:4520 0.0.0.0:* 810/asterisk
udp 0 0 0.0.0.0:5060 0.0.0.0:* 810/asterisk
udp 0 0 0.0.0.0:4569 0.0.0.0:* 810/asterisk
unix 2 [ ACC ] STREAM LISTENING 49077 810/asterisk /var/run/asterisk/asterisk.ctl


I don't see port 5061 but hopefully that should be ok.
Also my Externip matches the public elastic IP I assigned to my instance. But when I enable sip debug I don't see any trace coming out. Also I used wireshark on my machine and verified that no response is coming back from the instance box.
BTW I tried enabling httpd and authorize port 80 and everything works fine, but at this point I believe it is still something related to my Asterisk group permissions:

$ ec2-describe-group Asterisk
GROUP 761954543573 Asterisk Security Group for Asterisk instances
PERMISSION 761954543573 Asterisk ALLOWS icmp -1 -1 FROM CIDR 0.0.0.0/0
PERMISSION 761954543573 Asterisk ALLOWS tcp 80 80 FROM CIDR 0.0.0.0/0
PERMISSION 761954543573 Asterisk ALLOWS tcp 5060 5061 FROM CIDR 0.0.0.0/0
PERMISSION 761954543573 Asterisk ALLOWS tcp 22 22 FROM CIDR 135.207.168.62/32
PERMISSION 761954543573 Asterisk ALLOWS udp 4569 4569 FROM CIDR 0.0.0.0/0
PERMISSION 761954543573 Asterisk ALLOWS udp 5060 5060 FROM CIDR 0.0.0.0/0
PERMISSION 761954543573 Asterisk ALLOWS udp 10000 20000 FROM CIDR 0.0.0.0/0

Do you see anything strange? Should the "Source User:group" field populated?
Thanks for the help.
Danilo
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #5 (permalink)  
Old February 26th, 2009, 05:58 PM
Junior Member
 
Join Date: Feb 2009
Posts: 3
dgiulianelli is on a distinguished road
Default Re: Asterisk in a cloud - Asterisk 1.6.0.5 optimized for Amazon EC2

Eric,

I found the problem: my company firewall is blocking all UDP traffic in and out of our internal network. I tried to register with the machine from my home internet connection and everything works just fine.
Thanks again for the support.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #6 (permalink)  
Old April 28th, 2009, 09:41 PM
Junior Member
 
Join Date: Dec 2006
Posts: 1
kudroz is on a distinguished road
Default Re: Asterisk in a cloud - Asterisk 1.6.0.5 optimized for Amazon EC2

Great AMI, it saved me a lot of time.

I'm getting choppy audio with the MOH and IVR, and also in VM menus. Any ideas?
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply

Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Using Asterisk On Amazon's EC2 Service marcelo Asterisk Support Forum 2 September 10th, 2009 12:06 PM
email notification through asterisk pbx & asterisk GUI amitsalunkhe21 Asterisk Support Forum 1 May 9th, 2007 06:15 AM
I am completely novice need basic info. regarding asterisk and asterisk at home ... garbad Asterisk Support Forum 1 November 18th, 2006 02:17 PM
Running FOP and Asterisk Stat on Asterisk Box? habit Asterisk Support Forum 0 October 20th, 2005 11:19 PM
How to Connect SPA-3000 to Asterisk so Asterisk will answer mOe Asterisk Support Forum 3 September 4th, 2005 11:29 AM

Voxilla Recommends
  • Voxilla News

    More Voxilla news



    All times are GMT. The time now is 07:54 PM.


    vBulletin, Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.
    SEO by vBSEO 3.2.0 ©2008, Crawlability, Inc.
    Logos and trademarks are the property of Voxilla or their respective owner. All other content © 2003-2009 by Voxilla, Inc.