I can't make call between extensions. but i can call outside

Sip.conf

[general] ; General setup
bindport=5060
bindaddr=0.0.0.0
srvlookup=yes
context=default
defaultexpirey=3600
maxexpirey=3600
rtptimeout=60
rtpholdtimeout=300
rtpkeepalive=1
dtmfmode=rfc2833
nat=yes
disallow=all
allow=g729
allow=ulaw
allow=alaw
qualify=yes
registertimeout=60
context=internal
;Register your AlienVoip SIP username and password to AlienVoip’s SIP server
register => XXXXXX:XXXXXX@sip1.alienvoip.com:5060/XXXXXX

; Setup an account

[alienvoip] ; Give your gateway a meaningful name
port=5060 ; AlienVoip uses port 5060 for voip authentication
type=friend ; Set this to friend
secret=XXXXXXX ; This is your password for your SIP username
username=XXXXXXX ; This is your SIP username
fromuser=XXXXXXX ; This is your SIP username
host=sip1.alienvoip.com ; This is where AlienVoip’s sip registration server is located
fromdomain=sip1.alienvoip.com
canreinvite=no
qualify=yes
nat=yes ; Depending on your network condition, if your Asterisk is located behind a router,
; set it to yes, if your asterisk server has a public IP of its own, set it to no
context=incoming
; If your asterisk server allows incoming AlienVoip to AlienVoip calls, give
; this a meaningfull context
insecure=invite
disallow=all ; First disallow all codecs
allow=ilbc ; Allow codecs in order of preference
;see doc/rtp-packetization for framing options

[240] ; Register an account for your SIP client
username=240
callerid=testing <240>
secret=cbx
regexten=240
host=dynamic
nat=yes
canreinvite=no
type=friend
qualify=yes
disallow=all
allow=ilbc
allow=gsm
allow=ulaw
allow=alaw
dtmfmode=rfc2833
context=alienvoip

[241] ; Register an account for your SIP client
username=241
callerid=testing <241>
secret=cbx
regexten=241
host=dynamic
nat=yes
canreinvite=no
type=friend
qualify=yes
disallow=all
allow=ilbc
allow=gsm
allow=ulaw
allow=alaw
dtmfmode=rfc2833
context=alienvoip

[242] ; Register an account for your SIP client
username=242
callerid=testing <242>
secret=cbx
regexten=242
host=dynamic
nat=yes
canreinvite=no
type=friend
qualify=yes
disallow=all
allow=ilbc
allow=gsm
allow=ulaw
allow=alaw
dtmfmode=rfc2833
context=alienvoip

extensions.conf
[general]

[internal]

exten => _X.,Dial(SIP/240,60)
exten => _X.,Dial(SIP/241,60)
exten => _X.,Dial(SIP/242,60)

[alienvoip]

exten => _X.,1,NoOp()
exten => _X.,n,Dial(SIP/alienvoip/${EXTEN},60)
exten => _X.,n,Hangup()

Firstly, Asterisk doesn’t make calls from extensions. All calls come from devices (and finally terminate on devices.

You have no devices in your internal context.

Also any devices in your internal context would have no access to extensions in your alianvoip context. You only have one such extension, the one that dials the ITSP.

Sorry, first of all I’m new into this. Correct me if i was wrong.

If i disable all the alienvoip, my extensions works as well. can contacting each other. but it cant dial out .
so what is my chances to make this two features enable ?

You need to read the documentation before requesting free support.

Currently your dialplan is either or. You will have to combine them into one and define like when the user dial 240, it will dial SIP/240,etc, and everything else or special code like 9x, dial to alienvoip

thanks for those who responded at my post. i solved my problems. wew . Took a week to settle up for this configurations.