[asterisk-users] A matter of context
Eddie Mikell
eddie at rimmkaufman.com
Mon Apr 19 12:46:01 CDT 2010
All:
I've starting building an asterisk system for our company, which has
about 60 users. I am new to asterisk, so thank you for your patience.
I've stripped the sip.conf and the extensions.conf down to the bare minimum:
Here is my extensions.conf file
[globals]
[general]
autofallthrough=no
[default]
[fromprovider]
exten => YYYYYYYYYY,1,Dial(SIP/151,20)
[phones]
exten => 150,1,Dial(SIP/150)
exten => 151,1,Dial(SIP/151)
exten => _X.,1,DIAL(SIP/${EXTEN}@xx.xxxxxx.net)
and the matching sip.conf:
[general]
port=5060
bindaddr=0.0.0.0 ;10.8.0.34
srvlookup=yes
disallow=all ;read somewhere you have to disallow everything first
allow=ulaw
allow=alaw
allow=gsm
dtmfmode=rfc2833 ;; allows use of push buttons on grandstream
nat=no
externip=64.4.127.106
localnet=10.0.0.0/255.0.0.0
canreinvite=no
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; register sip service
;
;register => YYYYYYYYY:xxxxxxx:4xxxxxxxxxxx at ia.ntelos.net/YYYYYYYYYY
; This register statement works also.
;
register => YYYYYYYYYY:xxxxxxxxxxx:YYYYYYYYYY at ia.ntelos.net
;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
[151] ; define extension number for grandstreams
type=friend
context=phones
username=eddie
host=dynamic
[150]
type=friend
context=phones
username=regis
host=dynamic
; define sip service
[xx.xxxxx.net]
type = peer
username = YYYYYYYYYY
fromuser = YYYYYYYYYY
user = phone
host = xx.xxxxx.net
fromdomain = xx.xxxxx.net
outboundproxy = xxxx.xxxxx.net
secret = secret
context = fromprovider
I can make outgoing phones ok.
Here's the problem. When I make an incoming phone call, I get a sip
error message stating extension not found.
If I comment out the [fromprovider] context, and leave exten =>
YYYYYYYYYY,1,Dial(SIP/151,20) in the
default context, everything works fine.
Why do the incoming phone calls work ok when defined in the default
context and not in the fromprovider context.
I hope that is clear.
Thanks for any help and tips. And thanks for everything I have gleaned
from others who have answered previous "newbie" questions.
More information about the asterisk-users
mailing list