Asterisk EC2 and RTP ports

741 views
Skip to first unread message

eric.richmond

unread,
Apr 23, 2008, 9:42:06 AM4/23/08
to adhea...@googlegroups.com
Hello all,

We are trying to see if EC2 can work for us as a staging platform for
VOIP applications. We've had great success in getting asterisk up and
running 'in the cloud', and we are able to

1) Make IAX calls successfully. Both signaling and audio work great.
2) Can make calls from a cellphone into the system via a DID. The
signaling works OK, but we cannot hear audio.
3) Can make calls from a SIP client (Gizmo) into the system. Once
again, the signaling is OK, but we cannot hear audio.

I've seen numerous reports of people getting Asterisk working (with
SIP / RTP audio) right out of the box. Is there something additional
we need to do to get this to work? Currently we have these ports open:

default ALLOWS tcp 22 22 FROM CIDR 0.0.0.0/0
default ALLOWS tcp 2727 2727 FROM CIDR 0.0.0.0/0
default ALLOWS tcp 4569 4569 FROM CIDR 0.0.0.0/0
default ALLOWS tcp 5060 5062 FROM CIDR 0.0.0.0/0
default ALLOWS tcp 10000 20000 FROM CIDR 0.0.0.0/0
default ALLOWS udp 2727 2727 FROM CIDR 0.0.0.0/0
default ALLOWS udp 4569 4569 FROM CIDR 0.0.0.0/0
default ALLOWS udp 5060 5062 FROM CIDR 0.0.0.0/0
default ALLOWS udp 10000 20000 FROM CIDR 0.0.0.0/0

Additionally, we have mapped an 'elastic ip' address to the running
instance, as well have set the 'externip' option in sip.conf.

We are running the public amazon FC4 AMI coupled with the new 2.6.18
kernel (the one that is supposed to have better support for VOIP apps).

Any ideas?

-Eric

eric.richmond

unread,
Apr 23, 2008, 9:42:06 AM4/23/08
to adhea...@googlegroups.com

eric.richmond

unread,
Apr 23, 2008, 10:31:33 AM4/23/08
to adhea...@googlegroups.com

eric

unread,
Apr 23, 2008, 12:58:04 PM4/23/08
to Adhearsion
No idea why this posted three times.

Sorry.

JasonGoecke

unread,
Apr 23, 2008, 5:49:16 PM4/23/08
to Adhearsion
Did you ever get this resolved? I am having the same problem, no audio
but I may see on the console the Asterisk pumping sound when I dial
voicemail.

Philippe Creytens

unread,
Apr 24, 2008, 2:19:55 AM4/24/08
to adhea...@googlegroups.com
My setup ran fine during testing. I was able to:

1) call into the Asterisk via a DID, playback a prompt ... and hear it on the phone
2) use an X-lite client to connect to it and hear the prompt
3) bridge two calls Xlite -->Asterisk--> outbound SIP to PSTN

Apparently the major difference is CentOS 5.x as OS

Philippe

eric

unread,
Apr 24, 2008, 9:14:28 AM4/24/08
to Adhearsion
Hey guys,

Philippe I actually used the AMI that you recommended (the rightscale
one) with no success. I remember you mentioned that you uploaded your
sip.conf and extensions.conf file instead of using the stock ones. Do
you think you had any NAT configuration stuff in those files that
might be enabling 2 way audio?

Jason, we're still trying to get it to work.

-Eric

On Apr 24, 2:19 am, "Philippe Creytens" <pcreyt...@gmail.com> wrote:
> My setup ran fine during testing. I was able to:
>
> 1) call into the Asterisk via a DID, playback a prompt ... and hear it on
> the phone
> 2) use an X-lite client to connect to it and hear the prompt
> 3) bridge two calls Xlite -->Asterisk--> outbound SIP to PSTN
>
> Apparently the major difference is CentOS 5.x as OS
>
> Philippe
>

ernieboy

unread,
Apr 24, 2008, 9:26:27 AM4/24/08
to Adhearsion
I have ports 5004:5082 open in my firewall for udp. I see you don't
have them open. You may only need 5082. It's for NAT.

Ernie

lewdsilver

unread,
Apr 24, 2008, 9:03:42 AM4/24/08
to Adhearsion
Philippe,
Where did you get the CentOS 5.x AMI? Which version of Asterisk are
you running? & are you using the same kernel as Eric?

Thanks!


ernieboy

unread,
Apr 24, 2008, 9:52:59 AM4/24/08
to Adhearsion
Here's a URL that may help you. Notice that port 5036 is open
which is in the range 5004:5082 of my previous post. It is also
a port you do not have open.

The URL discusses asterisk on EC2

http://resvoip.com/index.php?option=com_content&task=view&id=1&Itemid=1

Ernie

Philippe Creytens

unread,
Apr 24, 2008, 12:15:04 PM4/24/08
to adhea...@googlegroups.com
I got the Rightscale image from this page (nice because it already has some Ruby things in it; I did recompile to Ruby 1.8.6 though but that should not matter a lot).
I compiled Asterisk version 1.14.19, did a 'make samples' and copied over existing sip/extensions.conf...

Philippe

http://developer.amazonwebservices.com/connect/entry.jspa?externalID=821

Philippe Creytens

unread,
Apr 24, 2008, 12:38:37 PM4/24/08
to adhea...@googlegroups.com
This is what I have:

; extensions.conf - the Asterisk dial plan
;
[general]
static=yes
writeprotect=no
clearglobalvars=no

[globals]
3STARS=SIP/3STARS
CONSOLE=Console/dsp                             ; Console interface for demo

[default]
exten => _X.,1,Ringing()
exten => _X.,2,Wait(2)
;exten => _X.,2,Set(CHANNEL(language)=nl)
exten => _X.,3,SayDigits(123)
exten => _X.,4,Dial(SIP/3STARS/0473715444)
exten => _X.,5, Hangup()

; No extension used by outbound call scripts
; in Adhearsion as scripts do not have an extension via AMI
;exten => s,1,Set(CHANNEL(language)=nl)
exten => s,2,SayDigits(123)
exten => s,4,Dial(SIP/3STARS/0473715444)
exten => s,5, Hangup()

-=-=-=-=-=

; sip.conf
;
[general]
context=default                                         ; Default context for incoming calls
allowoverlap=no                                         ; Disable overlap dialing support. (Default is yes)
bindport=5060                                           ; UDP Port to bind to (SIP standard port is 5060)
bindaddr=0.0.0.0                                        ; IP address to bind to (0.0.0.0 binds to all)
srvlookup=yes                                           ; Enable DNS SRV lookups on outbound calls
disallow=all                                            ; First disallow all codecs
allow=gsm                                               ; Allow codecs in order of preference
allow=ulaw                                              ;
language=en                                             ; Default language setting for all users/peers
useragent=EC2 Asterisk PBX                              ; Allows you to change the user agent string
dtmfmode = rfc2833                                      ; Set default dtmfmode for sending DTMF. Default: rfc2833
register => account:pass...@sip.3starsnet.com/028889204
nat=yes                                                 ; Global NAT settings  (Affects all peers and users)

[3STARS]
;removed VoIP provider specific settings

[xlite1]
; Turn off silence suppression in X-Lite ("Transmit Silence"=YES)!
; Note that Xlite sends NAT keep-alive packets, so qualify=yes is not needed
type=friend
regexten=1234                           ; When they register, create extension 1234
callerid="Test Xlite"
host=dynamic                            ; This device needs to register
nat=yes                                 ; X-Lite is behind a NAT router
secret=a_password
canreinvite=no                          ; Typically set to NO if behind NAT
disallow=all
allow=gsm                               ; GSM consumes far less bandwidth than ulaw
allow=ulaw
allow=alaw

JasonGoecke

unread,
Apr 24, 2008, 3:20:43 PM4/24/08
to Adhearsion
Yes, mine was related to the sip_nat.conf, works now. Turns out that
while my externhost name had propagated to my network here, it has not
propagated to the network at EC2. So while I could use it, my server
could not. Once that cleared up, all worked fine.
> register => account:passw...@sip.3starsnet.com/028889204
> nat=yes ; Global NAT
> settings (Affects all peers and users)
>
> [3STARS]
> ;removed VoIP provider specific settings
>
> [xlite1]
> ; Turn off silence suppression in X-Lite ("Transmit Silence"=YES)!
> ; Note that Xlite sends NAT keep-alive packets, so qualify=yes is not needed
> type=friend
> regexten=1234 ; When they register, create
> extension 1234
> callerid="Test Xlite"
> host=dynamic ; This device needs to register
> nat=yes ; X-Lite is behind a NAT router
> secret=a_password
> canreinvite=no ; Typically set to NO if behind NAT
> disallow=all
> allow=gsm ; GSM consumes far less bandwidth
> than ulaw
> allow=ulaw
> allow=alaw
>
> On Thu, Apr 24, 2008 at 6:15 PM, Philippe Creytens <pcreyt...@gmail.com>
> wrote:
>
> > I got the Rightscale image from this page (nice because it already has some
> > Ruby things in it; I did recompile to Ruby 1.8.6 though but that should not
> > matter a lot).
> > I compiled Asterisk version 1.14.19, did a 'make samples' and copied over
> > existing sip/extensions.conf...
>
> > Philippe
>
> >http://developer.amazonwebservices.com/connect/entry.jspa?externalID=821
>

eric

unread,
Apr 24, 2008, 3:30:08 PM4/24/08
to Adhearsion
Hey guys,

Great news, we got it working. It turns out we were having issues
with our localnet variable. Once we got that set properly, everything
worked great!

Thanks for all the help.

-Eric
> register => account:passw...@sip.3starsnet.com/028889204
> nat=yes                                                 ; Global NAT
> settings  (Affects all peers and users)
>
> [3STARS]
> ;removed VoIP provider specific settings
>
> [xlite1]
> ; Turn off silence suppression in X-Lite ("Transmit Silence"=YES)!
> ; Note that Xlite sends NAT keep-alive packets, so qualify=yes is not needed
> type=friend
> regexten=1234                           ; When they register, create
> extension 1234
> callerid="Test Xlite"
> host=dynamic                            ; This device needs to register
> nat=yes                                 ; X-Lite is behind a NAT router
> secret=a_password
> canreinvite=no                          ; Typically set to NO if behind NAT
> disallow=all
> allow=gsm                               ; GSM consumes far less bandwidth
> than ulaw
> allow=ulaw
> allow=alaw
>
> On Thu, Apr 24, 2008 at 6:15 PM, Philippe Creytens <pcreyt...@gmail.com>
> wrote:
>
> > I got the Rightscale image from this page (nice because it already has some
> > Ruby things in it; I did recompile to Ruby 1.8.6 though but that should not
> > matter a lot).
> > I compiled Asterisk version 1.14.19, did a 'make samples' and copied over
> > existing sip/extensions.conf...
>
> > Philippe
>
> >http://developer.amazonwebservices.com/connect/entry.jspa?externalID=821
>
Reply all
Reply to author
Forward
0 new messages