i am using the freebsd port, which seems to not yet have WaitExten(),
which i kinda want to use thusly
[ext-666]
exten => _.,1,SetVar(areacode=666)
exten => _.,2,Background(zz-in-who) ; give them list of extns
exten => _.,3,WaitExten(10) ; let them enter extn to call
include => extensions
include => applications
include => speeddials
exten => i,1,HangUp
exten => t,1,HangUp
how do i hack this?
randy
Mark Anthony C. Delfin
2004-Jun-18 21:46 UTC
[Asterisk-Users] newbie, error 401 unauthorzed question
hello asterisk list,
i've installed asterisk-0.9.0 on fedora core 1, i've been receiving
error 401 when i connect my voip gateways on asterisk (welltech fxo, antek fxs)
here is my sip.conf
[general]
port=5060
bindaddr=0.0.0.0
context=from-sip
tos=lowdelay
[x8000001]
type=friend
username=8000001
secret=12345
host=dynamic
dtmfmode=inband
canreinvite=no
callerid="welltech"<8000001>
[x8000002]
type=friend
username=8000002
secret=12345
host=dynamic
dtmfmode=inband
canreinvite=no
callerid="antek"<8000002>
here is my extensions.conf
[general]
static=yes
writeprotect=no
[globals]
welltechfxo=SIP/x8000001
antekfxs=SIP/x8000002
[from-sip]
include => to-sip
[to-sip]
exten => 8000001,1,Dial(${welltechfxo},20,tr)
exten => 8000002,1,Dial(${antekfxs},20,tr)
here is the debug output
Sip read:
REGISTER sip:210.16.20.7:5060 SIP/2.0
Via: SIP/2.0/UDP 210.16.20.14:5060;branch=0
From: <sip:8000002@210.16.20.7:5060>
To: <sip:8000002@210.16.20.7:5060>
Call-ID: 0@210.16.20.14
CSeq: 15 REGISTER
Contact: <sip:8000002@210.16.20.14:5060>
Expires: 60
Content-Length: 0
9 headers, 0 lines
Using latest request as basis request
Sending to 210.16.20.14 : 5060 (non-NAT)
Transmitting (no NAT):
SIP/2.0 401 Unauthorized
Via: SIP/2.0/UDP 210.16.20.14:5060;branch=0
From: <sip:8000002@210.16.20.7:5060>
To: <sip:8000002@210.16.20.7:5060>;tag=as6e12e2cb
Call-ID: 0@210.16.20.14
CSeq: 15 REGISTER
User-Agent: Asterisk PBX
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER
Contact: <sip:8000002@210.16.20.7>
Content-Length: 0
to 210.16.20.14:5060
Jun 19 12:43:41 NOTICE[-1116562512]: chan_sip.c:5623 handle_request:
Registration from '<sip:8000002@210.16.20.7:5060>' failed for
'210.16.20.14'
Thanks in Advance
Mark
On Sat, 2004-06-19 at 14:10, Randy Bush wrote:> i am using the freebsd port, which seems to not yet have WaitExten(), > which i kinda want to use thusly > > [ext-666] > exten => _.,1,SetVar(areacode=666) > exten => _.,2,Background(zz-in-who) ; give them list of extns > exten => _.,3,WaitExten(10) ; let them enter extn to call > include => extensions > include => applications > include => speeddials > exten => i,1,HangUp > exten => t,1,HangUpI never heard of the app WaitExten but you could do the following: exten => _.,1,DigitTimeout,5 exten => _.,2,ResponseTimeout,10 exten => _.,3,SetVar(areacode=666) exten => _.,4,Background(zz-in-who) include => extensions include => applications include => speeddials exten => i,1,PlayBack(Invalid-Ext) exten => i,2,HangUp exten => t,1,PlayBack(NoExtensionEntered) exten => t,2,Hangup> how do i hack this?Don't, I suggest you read the handbook, the wiki, and/or the archives. Regards, Adam