Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I'm trying to make a asterisk server connect to a SIP provider (which offers PSTN origination and termination). I've been reading the great Definitive Guide, but it doesn't seem to cover the case where the provider is contacted through a proxy. The sip.conf documentation mentions the outboundproxy field, but I'm not having much success with it.

Here's my current sip.conf:

[general]
context=unauthenticated         ; default context for incoming calls
allowguest=no                   ; disable unauthenticated calls
srvlookup=yes                   ; enabled DNS SRV record lookup on outbound calls
udpbindaddr=0.0.0.0             ; listen for UDP requests on all interfaces
tcpenable=no                    ; disable TCP support
outboundproxy = proxy.voip.sapo.pt
outboundproxyport= 5070
register => +351000000000:password@voip.sapo.pt/line1


[sapo]
type = peer
host = voip.sapo.pt
; Most providers won't authenticate when they send calls to you,
; so you need this line to just accept their calls.
insecure = invite
dtmfmode = rfc2833
username = +351000000000
secret = password
context = incoming

I'm not sure if the host (on the peer section) should be the proxy or the original server. Same for the register line.

All I'm getting from the console is timeouts:

 Reloading SIP
       > doing dnsmgr_lookup for 'voip.sapo.pt'
[Dec  7 14:48:30] NOTICE[5192]: chan_sip.c:11722 sip_reg_timeout:    -- Registration for '+351000000000@voip.sapo.pt' timed out, trying again
share|improve this question

1 Answer 1

I would change your register command to register to: proxy.voip.sapo.pt:5070.

share|improve this answer
    
Ah, so the register must be done on the proxy? Doing that change, I'm getting a handle_response_register: Got 404 Not found on SIP register to service +351000000000@proxy.voip.sapo.pt, giving up now. Analyzing the traffic, it seems it is doing a REGISTER sip:proxy.voip.sapo.pt, while another (successful) sip client does REGISTER sip:voip.sapo.pt (to proxy.voip.sapo.pt)... –  goncalopp Dec 7 '12 at 16:32
    
register => +351000000000@voip.sapo.pt:password@proxy.voip.sapo.pt:5070/line1 seems to take care of that. Now there's just a Failed to authenticate on REGISTER. I'll phone my provider to try and troubleshoot this one –  goncalopp Dec 7 '12 at 18:07

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.