Asterisk 1.8 and SIP Phone

Evening all,

I’ve finnally maanged to install asterisk 1.8 and get the gui working and even get a phone : )

however i can not call in or out.

I’m using a basic personal number from SIPgate rather tha nthe buisness scheme but i see no reason it shouldn’t work.

I’m getting this error

— (18 headers 19 lines) —
Sending to (NAT)
Using INVITE request as basis request -
Found peer ‘1531133’ for ‘07504614638’ from

<— Reliably Transmitting (NAT) to —>
SIP/2.0 401 Unauthorized
Via: SIP/2.0/UDP;branch=z9hG4bK3c1e.ff987d11.1;received=;rport=5060
Via: SIP/2.0/UDP;branch=z9hG4bK3c1e.ff987d11.1
Via: SIP/2.0/UDP;received=;branch=z9hG4bK019ecb09
Via: SIP/2.0/UDP;received=;branch=z9hG4bK019ecb09;rport=5060
From: “07504******”;tag=as4c8e7ff8
CSeq: 102 INVITE
Server: Asterisk PBX
Supported: replaces, timer
WWW-Authenticate: Digest algorithm=MD5, realm=“asterisk”, nonce="75cd5b98"
Content-Length: 0

Scheduling destruction of SIP dialog '’ in 32000 ms (Method: INVITE)

<— SIP read from UDP: —>
ACK sip:s@ SIP/2.0
Via: SIP/2.0/UDP;branch=z9hG4bK3c1e.ff987d11.0
Via: SIP/2.0/UDP;branch=z9hG4bK3c1e.ff987d11.0
From: “0750461****”;tag=as4c8e7ff8
CSeq: 102 ACK
Max-Forwards: 69
Content-Length: 0
X-hint: rr-enforced

user - my trunk is connecting fine. I think its to do with the user setup.
fromuser=joshua ; Specify user to put in “from” instead of callerid
host=dynamic ; use either host=dynamic or defaultip=…
amaflags=default ; Choices are default, omit, billing, documentation
accountcode=joshua ; Users may be associated with an accountcode to ease billing

exten => 1531133,1,Dial(SIP/userjoshua,60)
exten => 1531133,n,Hangup()

exten => 1+NXXNXXXXXX.,1,Dial(SIP/${EXTEN}
exten => 1+NXXNXXXXXX.,n,Hangup()

I believe it might be the fact, its something to do with the authorisation but can’t seem to think what it could be any help would be very grateful thank you.

i think you need to register the trunk by using register =>

Replace “secret” by “remotesecret”. (Historically the advice would have been to use insecure=invite.)

Also, ITSPs generally do not register with you, so you cannot use host=dynamic.

Also note that it is usually better to use type=peer.

There must already be a register=> line, otherwise the ITSP would not know how to send the INVITE to you.

401, in itself, is not an error; it simply tells the other side how to authenticate. The error is that you are expecting them to authenticate with you, when they have no intention of doing so.

Thank you for the replies, but i think you misunderstand me

that isn’t my whole sip.conf file, as i didn’t put in the trunk link, in which i use peer as i’ve already sorted that problem and i’m connected to my provider.
right ok i’ll change the host=dynamic,

When i call the number i get a constant tone on the phone of my mobile.

where as before it was saying its an wrong number.

the problem is its going from the provider to the asterisk box but not to the phone. i guess i’m guessing how to set up a user for a phone. as its not working.

the authentication is with the phone not the provider i’m already connected to SIPGate.

sorry if i was vague in my original post does this make it any better?

Thank you again.

The trace clearly shows you trying to get sipgate to authenticate itself, which it won’t do.

oh right… my bad, that’s a little weird as that message only comes up when i ring the phone, otherwise its fine. and i don’t get authentication errors. ok cool well i guess i’ll retrace my steps.