Dialling another Asterisk System

I’m trying to get one asterisk system, 192.168.10.5, to dial a user on another asterisk system, 192.168.10.7. I’m having a heck of a time getting the authentication to work. In fact, I don’t think I’ve ever gotten it to work!

192.168.10.5

sip.conf:
[vm_server]
type=peer
host=192.168.10.7
context=test
username=vm_server
secret=180

extensions.conf:
exten => 8000,1,Dial(SIP/8000@vm_server,20,tr)

192.168.10.7

sip.conf:
[vm_server]
type=friend
context=test
host=dynamic
username=vm_server
secret=180

User 2001 dials 8000 on 192.168.10.5. It sends an INVITE to 192.168.10.7, where it asks for auth credentials. Box 192.168.10.5 sends the credentials…

U 192.168.10.5:5060 -> 192.168.10.7:5060
INVITE sip:8000@192.168.10.7 SIP/2.0.
Via: SIP/2.0/UDP 192.168.10.5:5060;branch=z9hG4bK6c511b7f;rport.
From: “Elvis Presley” sip:2001@192.168.10.5;tag=as2c436a30.
To: sip:8000@192.168.10.7.
Contact: sip:2001@192.168.10.5.
Call-ID: 31446b47239099851c51260e27ec8c67@192.168.10.5.
CSeq: 103 INVITE.
User-Agent: Asterisk PBX.
Max-Forwards: 70.
Proxy-Authorization: Digest username=“vm_server”, realm=“asterisk”, algorithm=MD5, uri="sip:8000@192.168.10.7", nonce=“681085
44”, response=“681edc1dec65f9c0dad608c4f5b20f57”, opaque="".
Date: Tue, 29 Nov 2005 16:43:43 GMT.
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY.
Content-Type: application/sdp.
Content-Length: 263.

As you can see it sends a digest username of vm_server, as it should. Asterisk then sends back a 403 Forbidden. Why???

This could be related to what I’ve seen in the past where, in sip.conf, if your [section-name] isn’t the same as your username, it barfs. Asterisk doesn’t like that. Again, why? The From: and the digest user name DO NOT NEED to be the same, but Asterisk thinks they do.

Anyway, how can I get one Asterisk box to dial a number on another? Trying to locate voicemail on a different system.

Thanks,
Doug.

hmmm, a forbidden is normal. SIP usually sends a request, and if it gets denied then sends the SAME request only this time with auth crientials attached. Is that happening to you?

Forbidden isn’t normal. Proxy auth is. The forbidden is in response to the new invite with proxy credentials included. Works for SER…

ahh yes of course… my bad :smile:

post a sip debug from the recieving server?

Thanks, but I gave up. I finally got it to work with IAX instead. :smile: Doesn’t matter what the protocol is between Asterisk boxes, as long as it works.