trying to setup a new inphonex sip conneciton w/ inphonex -bad context-help

bicserver
Joined: Wed 01 of Apr, 2009

Re: trying to setup a new inphonex sip conneciton w/ inphonex -bad context-help

Posted:Wed 01 of Apr, 2009 (11:36 UTC)
We can configured asterisk as per your requirements
Feel Free to contact us
Email Id: bicserver1@gmail.com
mjh2000
Joined: Thu 19 of Mar, 2009

trying to setup a new inphonex sip conneciton w/ inphonex -bad context-help

Posted:Thu 19 of Mar, 2009 (19:11 UTC)
I am trying to setup sip on asterisk 1.6. My voip provider is inphonex.


Can someone tell me if this is a correct sip.conf and extensions.conf ? All i want to do is dial in and out of my office phones. I would like the calls that come in to be routed to a particular extension. I also can not seem to make calls within the office...please help !

thanks
mjh



my sip.conf file:

[general]
pedantic=no
type=user
port=5060 ; Port to bind to
bindaddr=0.0.0.0 ;Fill in the IP address that your Asterisk Server is listening on.
tos=reliability
allow=alaw
allow=ulaw
externip=XXX.XXX.com

register => XXXXXassword@sip.inphonex.com

[inphonex_peer]
dtmfmode=rfc2833
nat = yes
maxexpirey = 180
defaultexpirey = 160
type=peer
username=XXXXX
secret=password
host=sip.inphonex.com
fromuser=XXXXX
fromdomain=inphonex.com
context=from-inphonex
canreinvite=no

[sip.inphonex.com]
nat = yes
dtmfmode=rfc2833
username=2697433
user=XXXXX
password=password
type=friend
; insecure=very
host=sip.inphonex.com
fromdomain=inphonex.com
context=from-inphonex
canreinvite=no



[101] ; The IP phone, soft phone, or ATA that you are registering with Asterisk
dtmf=rfc2833
dtmfmode=rfc2833
context=outbound
callerid="101"
type=friend ; This means it can place and receive calls
username=101
password=password ;You need to make one up for your device to connect to Asterisk
secret= password ;Make it the same password
host=dynamic
nat=no ;Change this if you need to
canreinvite=no
qualify=no
mailbox=101
callgroup=0
pickupgroup=0


[102] ; The IP phone, soft phone, or ATA that you are registering with Asterisk
dtmf=rfc2833
dtmfmode=rfc2833
context=outbound
callerid="102"
type=friend ; This means it can place and receive calls
username=102
password=password ;You need to make one up for your device to connect to Asterisk
secret= password ;Make it the same password
host=dynamic
nat=yes ;Change this if you need to
canreinvite=no
qualify=no
mailbox=102
callgroup=0
pickupgroup=0


my extensions.conf is:
---------------------------

[general]
static=yes
writeprotect=no

[globals]

[from-inphonex]
include => local

exten => _X.,1,Answer
exten => _X.,2,Wait(1)
exten => _X.,3,Goto(from-inphonex,s,1)

exten => s,1,Set(aaa=0)
exten => s,2,Ringing()
exten => s,3,NoOp(${CALLERID})
exten => s,4,VoiceMail,u9000
exten => s,5,playback(/var/lib/asterisk/proj2/10-thanksforcalling)
exten => s,6,Hangup()

exten => 0,1,Dial(SIP/101&SIP/102&SIP/1001&SIP/108,20,tr)
exten => 0,2,VoiceMail,u9000
exten => 0,3,playback(/var/lib/asterisk/proj2/10-thanksforcalling)
exten => 0,4,Hangup()


[local]

exten => 101,1,Dial(SIP/101,80,T)
exten => 102,1,Dial(SIP/101,80,T)

exten => 108,1,Ringing
exten => 108,2,Dial(SIP/108,100,T)
exten => 108,4,Hangup

exten => 112,1,Dial(SIP/112,80,T)


;Now we make the context for your outbound calls
[outbound]
include =>local

exten => _X.,1,Dial(SIP/${EXTEN}@inphonex_peer)