SearchSearch  Log in to check your private messagesLog in to check your private messages  recent posts Recent Posts
Post new topic   Reply to topic
View previous topic Printable version Log in to check your private messages View next topic
Author Message
andypsykesOffline



Joined: May 16, 2009
Posts: 1

Status: Offline
Posted: May 16, 2009 - 12:48 AM Reply with quote Back to top
I have just setup up my first Asterisk server (Version 1.6.1.0) under Centos Linux.

I have got my test clients communicating OK, but in checking the SIP conversations with a packet sniffer - for interest/education as much as anything else - I have found that Asterisk is consistently rejecting all new SIP messages, such as a REGISTER or INVITE, with a 401 Unauthorized response. If the client repeats the message, the conversation proceeds as expected - i.e. a REGISTER is greeted with an OK and an INVITE results in a connected call.

This behavior is not stopping anything working but it does not seem to me to be correct. Is this just the way Asterisk behaves or have I done something wrong in the configuration. I have attached my exensions.conf and sip.conf (with IP addresses edited out for security) below as this seems to the first thing anyone asks for.

Many thanks.

Andy

extensions.conf:
[globals]

[macro-phone]
exten => s,1,Set(station=${MACRO_EXTEN:-4})
exten => s,2,Dial(SIP/${station},25)
exten => s,n,Goto(${DIALSTATUS},1)

exten => ANSWER,1,Hangup
exten => CANCEL,1,Hangup
exten => NOANSWER,1,Voicemail(${station}@default,u)
exten => BUSY,1,Voicemail(${station}@default,b)
exten => CONGESTION,1,Voicemail(${station}@default,b)
exten => CHANUNAVAIL,1,Voicemail(${station}@default,u)
exten => a,1,VoicemailMain(${station}@default)

[stations]
exten => 2220,1,Macro(phone)
exten => 2221,1,Macro(phone)

exten => 4242,1,VoicemailMain(default)
exten => 4444,1,VoicemailMain(s${CALLERID(num)}@default)

[long-distance]
exten => _NXXNXXXXXX,1,Set(DNIS=+1${EXTEN})
exten => _NXXNXXXXXX,n,Set(PATH=ld-no-cc})
exten => _NXXNXXXXXX,n,Goto(VOICECORE,1)

exten => _1NXXNXXXXXX,1,Set(DNIS=+${EXTEN})
exten => _1NXXNXXXXXX,n,Set(PATH=ld-with-cc})
exten => _1NXXNXXXXXX,n,Goto(VOICECORE,1)

exten => VOICECORE,1,Set(CALLERID(num)=+1214259${CALLERID(num)})
exten => VOICECORE,n,Set(CALLERID(name)=${CALLERID(num)})
exten => VOICECORE,n,Dial(SIP/labSBC/${DNIS})

[international]
exten => _Z.,1,Set(DNIS=+${EXTEN})
exten => _Z.,n,Set(PATH=international})
exten => _Z.,n,Goto(VOICECORE,1)

[did]
exten => _+1214259222X,1,Macro(phone)

[users]
include => stations
include => local
include => did
include => long-distance
include => international

sip.conf
[general]
videosupport=yes
context=users
port=5060
bindaddr=0.0.0.0
rtpstart=10000
rtpend=20000

[2220]
type=friend
host=dynamic
secret=smle303
context=users
subscribecontext=users
callerid=Astra Phone <2220>
disallow=all
allow=ulaw
allow=alaw
allow=g729
allow=h263
allow=h263p
allow=h264
dtmfmode=rfc2833
mailbox=2220@default
canreinvite=no

[2221]
type=friend
host=dynamic
username=asykes
secret=smle303
context=users
subscribecontext=users
callerid=Video Phone <2221>
disallow=all
allow=ulaw
allow=alaw
allow=g729
allow=h263
allow=h263p
allow=h264
dtmfmode=rfc2833
mailbox=2221@default
canreinvite=no

[2222]
type=friend
host=dynamic
username=asykes
secret=smle303
context=users
subscribecontext=users
callerid=Video Phone <2222>
disallow=all
allow=ulaw
allow=alaw
allow=g729
allow=h263
allow=h263p
allow=h264
dtmfmode=rfc2833
mailbox=2222@default
canreinvite=no

[labSBC]
type=peer
host=xx.xx.xx.xx
deny=0.0.0.0/0.0.0.0
permit=xx.xx.xx.0/255.255.255.0
disallow=all
allow=g729
dtmfmode=rfc2833
qualify=yes
transport=udp
canreinvite=no
context=users
canreinvite=no
View user's profile Send private message


View previous topic Printable version Log in to check your private messages View next topic

Post new topic   Reply to topic
Forum Rules and Guidelines | About VoIP User | Privacy Policy


All logos and trademarks in this site are property of their respective owner.
Comments and posts are property of the poster, all the rest (c) 2003-2008 VoIP User Limited.

VoIP User Limited is incorporated in England and Wales under Company Number 6694577.

No part of this site may be reproduced without our prior consent.