Unable to get SIP Trunk registered

Hi

I just installed my new server using the AsteriskNOW install. I updated the system to the latest software before starting any config.
I got the extensions working fine internally. I am now stuck at creating the SIP Trunk. I can create it, but it does not register.
I have an internal address of 192.168.x.x and a static public ip that is connected to an IPCOP firewall.

I have no PSTN lines. All I want to do is use the SIP trunk for outbound and inbound calls.

DNS resolve work fine, the SIP host is vphone.co.za
You can see that it resolves. So I am ruling out network.
I configured my account directly on my YEALINK sip phone, and it registers and I am able to make calls from within my network. That is why I rule out the network setup.

Here is the log:
[Dec 29 00:33:56] VERBOSE[9562] loader.c: – Reloading module ‘chan_sip.so’ (Session Initiation Protocol (SIP))
[Dec 29 00:33:56] VERBOSE[8563] chan_sip.c: Reloading SIP
[Dec 29 00:33:56] VERBOSE[8563] config.c: == Parsing ‘/etc/asterisk/sip.conf’: [Dec 29 00:33:56] VERBOSE[8563] config.c: == Found
[Dec 29 00:33:56] VERBOSE[8563] config.c: == Parsing ‘/etc/asterisk/sip_general_additional.conf’: [Dec 29 00:33:56] VERBOSE[8563] config.c: == Found
[Dec 29 00:33:56] VERBOSE[8563] config.c: == Parsing ‘/etc/asterisk/sip_general_custom.conf’: [Dec 29 00:33:56] VERBOSE[8563] config.c: == Found
[Dec 29 00:33:56] VERBOSE[8563] config.c: == Parsing ‘/etc/asterisk/sip_nat.conf’: [Dec 29 00:33:56] VERBOSE[8563] config.c: == Found
[Dec 29 00:33:56] VERBOSE[8563] config.c: == Parsing ‘/etc/asterisk/sip_registrations_custom.conf’: [Dec 29 00:33:56] VERBOSE[8563] config.c: == Found
[Dec 29 00:33:56] VERBOSE[8563] config.c: == Parsing ‘/etc/asterisk/sip_registrations.conf’: [Dec 29 00:33:56] VERBOSE[8563] config.c: == Found
[Dec 29 00:33:56] VERBOSE[8563] config.c: == Parsing ‘/etc/asterisk/sip_custom.conf’: [Dec 29 00:33:56] VERBOSE[8563] config.c: == Found
[Dec 29 00:33:56] VERBOSE[8563] config.c: == Parsing ‘/etc/asterisk/sip_additional.conf’: [Dec 29 00:33:56] VERBOSE[8563] config.c: == Found
[Dec 29 00:33:56] VERBOSE[8563] config.c: == Parsing ‘/etc/asterisk/sip_custom_post.conf’: [Dec 29 00:33:56] VERBOSE[8563] config.c: == Found
[Dec 29 00:33:56] VERBOSE[9562] loader.c: – Reloading module ‘codec_lpc10.so’ (LPC10 2.4kbps Coder/Decoder)
[Dec 29 00:33:56] VERBOSE[9562] loader.c: – Reloading module ‘res_clialiases.so’ (CLI Aliases)
[Dec 29 00:33:56] ERROR[9562] res_clialiases.c: res_clialiases configuration file ‘cli_aliases.conf’ not found
[Dec 29 00:33:56] VERBOSE[9562] loader.c: – Reloading module ‘codec_ulaw.so’ (mu-Law Coder/Decoder)
[Dec 29 00:33:56] VERBOSE[9562] loader.c: – Reloading module ‘codec_dahdi.so’ (Generic DAHDI Transcoder Codec Translator)
[Dec 29 00:33:56] VERBOSE[8563] config.c: == Parsing ‘/etc/asterisk/sip_notify.conf’: [Dec 29 00:33:56] VERBOSE[8563] config.c: == Found
[Dec 29 00:33:56] VERBOSE[8563] config.c: == Parsing ‘/etc/asterisk/sip_notify_custom.conf’: [Dec 29 00:33:56] VERBOSE[8563] config.c: == Found
[Dec 29 00:33:56] VERBOSE[8563] config.c: == Parsing ‘/etc/asterisk/sip_notify_additional.conf’: [Dec 29 00:33:56] VERBOSE[8563] config.c: == Found
[Dec 29 00:33:56] VERBOSE[9562] manager.c: == Manager ‘admin’ logged off from 127.0.0.1
[Dec 29 00:33:57] VERBOSE[8563] chan_sip.c: – Got SIP response 503 “SERVICE UNAVAILABLE” back from 196.3.177.10
[Dec 29 00:34:17] NOTICE[8563] chan_sip.c: – Registration for ‘[email protected]’ timed out, trying again (Attempt #1)
[Dec 29 00:34:17] VERBOSE[8563] chan_sip.c: – Got SIP response 503 “SERVICE UNAVAILABLE” back from 196.3.177.10
[Dec 29 00:34:37] NOTICE[8563] chan_sip.c: – Registration for ‘[email protected]’ timed out, trying again (Attempt #2)
[Dec 29 00:34:37] VERBOSE[8563] chan_sip.c: – Got SIP response 503 “SERVICE UNAVAILABLE” back from 196.3.177.10
[Dec 29 00:34:57] NOTICE[8563] chan_sip.c: – Registration for ‘[email protected]’ timed out, trying again (Attempt #3)
[Dec 29 00:34:57] VERBOSE[8563] chan_sip.c: – Got SIP response 503 “SERVICE UNAVAILABLE” back from 196.3.177.10
[Dec 29 00:35:17] NOTICE[8563] chan_sip.c: – Registration for ‘[email protected]’ timed out, trying again (Attempt #4)
[Dec 29 00:35:17] VERBOSE[8563] chan_sip.c: – Got SIP response 503 “SERVICE UNAVAILABLE” back from 196.3.177.10
[Dec 29 00:35:37] NOTICE[8563] chan_sip.c: – Registration for ‘[email protected]’ timed out, trying again (Attempt #5)
[Dec 29 00:35:37] VERBOSE[8563] chan_sip.c: – Got SIP response 503 “SERVICE UNAVAILABLE” back from 196.3.177.10
[Dec 29 00:35:57] NOTICE[8563] chan_sip.c: – Registration for ‘[email protected]’ timed out, trying again (Attempt #6)
[Dec 29 00:35:57] VERBOSE[8563] chan_sip.c: – Got SIP response 503 “SERVICE UNAVAILABLE” back from 196.3.177.10
[Dec 29 00:36:17] NOTICE[8563] chan_sip.c: – Registration for ‘[email protected]’ timed out, trying again (Attempt #7)
[Dec 29 00:36:17] VERBOSE[8563] chan_sip.c: – Got SIP response 503 “SERVICE UNAVAILABLE” back from 196.3.177.10
[Dec 29 00:36:37] NOTICE[8563] chan_sip.c: – Registration for ‘[email protected]’ timed out, trying again (Attempt #8)
[Dec 29 00:36:37] VERBOSE[8563] chan_sip.c: – Got SIP response 503 “SERVICE UNAVAILABLE” back from 196.3.177.10
[Dec 29 00:36:57] NOTICE[8563] chan_sip.c: – Registration for ‘[email protected]’ timed out, trying again (Attempt #9)
[Dec 29 00:36:58] VERBOSE[8563] chan_sip.c: – Got SIP response 503 “SERVICE UNAVAILABLE” back from 196.3.177.10
[Dec 29 00:37:17] NOTICE[8563] chan_sip.c: – Registration for ‘[email protected]’ timed out, trying again (Attempt #10)
[Dec 29 00:37:17] VERBOSE[8563] chan_sip.c: – Got SIP response 503 “SERVICE UNAVAILABLE” back from 196.3.177.10
[Dec 29 00:37:37] NOTICE[8563] chan_sip.c: – Registration for ‘[email protected]’ timed out, trying again (Attempt #11)
[Dec 29 00:37:37] VERBOSE[8563] chan_sip.c: – Got SIP response 503 “SERVICE UNAVAILABLE” back from 196.3.177.10
[Dec 29 00:37:57] NOTICE[8563] chan_sip.c: – Registration for ‘[email protected]’ timed out, trying again (Attempt #12)
[Dec 29 00:37:57] VERBOSE[8563] chan_sip.c: – Got SIP response 503 “SERVICE UNAVAILABLE” back from 196.3.177.10
[Dec 29 00:38:13] VERBOSE[9584] manager.c: == Manager ‘admin’ logged on from 127.0.0.1
[Dec 29 00:38:13] VERBOSE[9584] manager.c: == Manager ‘admin’ logged off from 127.0.0.1
[Dec 29 00:38:15] VERBOSE[9586] manager.c: == Manager ‘admin’ logged on from 127.0.0.1

Your registration is timing out, can you ping vphone.co.za ?

Is DNS working?

I reloaded my server and everything is ok. I kept the old VM to have a looka at.
What I found is that the DNS entries from the resolv.conf file keeps disapearing.

[Dec 29 09:54:46] VERBOSE[8563] chan_sip.c: — (12 headers 0 lines) —
[Dec 29 09:54:46] VERBOSE[8563] chan_sip.c: Really destroying SIP dialog ‘[email protected]’ Method: OPTIONS
[Dec 29 09:54:46] VERBOSE[10281] manager.c: == Manager ‘admin’ logged off from 127.0.0.1
[Dec 29 09:54:52] NOTICE[8563] chan_sip.c: – Registration for ‘[email protected]’ timed out, trying again (Attempt #1149)
[Dec 29 09:54:52] VERBOSE[8563] dnsmgr.c: > doing dnsmgr_lookup for ‘vphone.co.za
[Dec 29 09:54:52] VERBOSE[8563] chan_sip.c: REGISTER 10 headers, 0 lines
[Dec 29 09:54:52] VERBOSE[8563] chan_sip.c: Reliably Transmitting (no NAT) to 196.3.177.10:5060:
REGISTER sip:vphone.co.za SIP/2.0
Via: SIP/2.0/UDP 196.214.79.50:5060;branch=z9hG4bK587ff02f
Max-Forwards: 70
From: sip:[email protected];tag=as40df3a7d
To: sip:[email protected]
Call-ID: [email protected]
CSeq: 1251 REGISTER
User-Agent: Asterisk PBX 1.6.2.11
Expires: 120
Contact: sip:[email protected]
Content-Length: 0

[Dec 29 10:36:04] VERBOSE[8563] chan_sip.c: — (8 headers 0 lines) —
[Dec 29 10:36:04] VERBOSE[8563] chan_sip.c: Really destroying SIP dialog ‘[email protected]’ Method: OPTIONS
[Dec 29 10:36:14] VERBOSE[11310] manager.c: == Manager ‘admin’ logged on from 127.0.0.1
[Dec 29 10:36:14] VERBOSE[11310] manager.c: == Manager ‘admin’ logged off from 127.0.0.1
[Dec 29 10:36:18] NOTICE[8563] chan_sip.c: – Registration for ‘[email protected]’ timed out, trying again (Attempt #47)
[Dec 29 10:36:18] VERBOSE[8563] dnsmgr.c: > doing dnsmgr_lookup for ‘vphone.co.za
[Dec 29 10:36:18] VERBOSE[8563] srv.c: > ast_get_srv: SRV lookup for ‘_sip._UDP.vphone.co.za’ mapped to host sip2.vphone.co.za, port 5060
[Dec 29 10:36:18] VERBOSE[8563] chan_sip.c: REGISTER 10 headers, 0 lines
[Dec 29 10:36:18] VERBOSE[8563] chan_sip.c: Reliably Transmitting (NAT) to 196.41.212.66:5060:
REGISTER sip:vphone.co.za SIP/2.0
Via: SIP/2.0/UDP 196.214.79.50:5060;branch=z9hG4bK481fab8d;rport
Max-Forwards: 70
From: sip:[email protected];tag=as25d81d09
To: sip:[email protected]
Call-ID: [email protected]
CSeq: 149 REGISTER
User-Agent: Asterisk PBX 1.6.2.11
Expires: 120
Contact: sip:[email protected]
Content-Length: 0

I set debugginf to 99 and enabled debug on sip.

[Dec 29 09:47:24] VERBOSE[10211] pbx.c: – Executing [s@macro-dialout-trunk:16] Macro(“SIP/101-00000002”, “dialout-trunk-predial-hook,”) in new stack
[Dec 29 09:47:24] VERBOSE[10211] pbx.c: – Executing [s@macro-dialout-trunk-predial-hook:1] MacroExit(“SIP/101-00000002”, “”) in new stack
[Dec 29 09:47:24] VERBOSE[10211] pbx.c: – Executing [s@macro-dialout-trunk:17] GotoIf(“SIP/101-00000002”, “0?bypass,1”) in new stack
[Dec 29 09:47:24] VERBOSE[10211] pbx.c: – Executing [s@macro-dialout-trunk:18] GotoIf(“SIP/101-00000002”, “0?customtrunk”) in new stack
[Dec 29 09:47:24] VERBOSE[10211] pbx.c: – Executing [s@macro-dialout-trunk:19] Dial(“SIP/101-00000002”, “SIP/VOX_Outbound/0119532187,300,tr”) in new stack
[Dec 29 09:47:24] VERBOSE[10211] netsock.c: == Using SIP RTP TOS bits 184
[Dec 29 09:47:24] VERBOSE[10211] netsock.c: == Using SIP RTP CoS mark 5
[Dec 29 09:47:24] VERBOSE[10211] app_dial.c: – Called VOX_Outbound/0119532187
[Dec 29 09:47:24] WARNING[8563] chan_sip.c: Received response: “Forbidden” from ‘“TV Kamer” sip:[email protected];tag=as55d5a450’
[Dec 29 09:47:24] VERBOSE[10211] app_dial.c: – SIP/VOX_Outbound-00000003 is circuit-busy
[Dec 29 09:47:24] VERBOSE[10211] app_dial.c: == Everyone is busy/congested at this time (1:0/1/0)
[Dec 29 09:47:24] VERBOSE[10211] pbx.c: – Executing [s@macro-dialout-trunk:20] NoOp(“SIP/101-00000002”, “Dial failed for some reason with DIALSTATUS = CONGESTION and HANGUPCAUSE = 21”) in new stack
[Dec 29 09:47:24] VERBOSE[10211] pbx.c: – Executing [s@macro-dialout-trunk:21] Goto(“SIP/101-00000002”, “s-CONGESTION,1”) in new stack
[Dec 29 09:47:24] VERBOSE[10211] pbx.c: – Goto (macro-dialout-trunk,s-CONGESTION,1)
[Dec 29 09:47:24] VERBOSE[10211] pbx.c: – Executing [s-CONGESTION@macro-dialout-trunk:1] Set(“SIP/101-00000002”, “RC=21”) in new stack
[Dec 29 09:47:24] VERBOSE[10211] pbx.c: – Executing [s-CONGESTION@macro-dialout-trunk:2] Goto(“SIP/101-00000002”, “21,1”) in new stack
[Dec 29 09:47:24] VERBOSE[10211] pbx.c: – Goto (macro-dialout-trunk,21,1)
[Dec 29 09:47:24] VERBOSE[10211] pbx.c: – Executing [21@macro-dialout-trunk:1] Goto(“SIP/101-00000002”, “continue,1”) in new stack
[Dec 29 09:47:24] VERBOSE[10211] pbx.c: – Goto (macro-dialout-trunk,continue,1)
[Dec 29 09:47:24] VERBOSE[10211] pbx.c: – Executing [continue@macro-dialout-trunk:1] GotoIf(“SIP/101-00000002”, “1?noreport”) in new stack
[Dec 29 09:47:24] VERBOSE[10211] pbx.c: – Goto (macro-dialout-trunk,continue,3)
[Dec 29 09:47:24] VERBOSE[10211] pbx.c: – Executing [continue@macro-dialout-trunk:3] NoOp(“SIP/101-00000002”, “TRUNK Dial failed due to CONGESTION HANGUPCAUSE: 21 - failing through to other trunks”) in new stack
[Dec 29 09:47:24] VERBOSE[10211] pbx.c: – Executing [continue@macro-dialout-trunk:4] Set(“SIP/101-00000002”, “CALLERID(number)=101”) in new stack
[Dec 29 09:47:24] VERBOSE[10211] pbx.c: – Executing [0119532187@from-internal:9] Macro(“SIP/101-00000002”, “outisbusy,”) in new stack
[Dec 29 09:47:24] VERBOSE[10211] pbx.c: – Executing [s@macro-outisbusy:1] Progress(“SIP/101-00000002”, “”) in new stack
[Dec 29 09:47:24] VERBOSE[10211] pbx.c: – Executing [s@macro-outisbusy:2] GotoIf(“SIP/101-00000002”, “1?emergency,1”) in new stack
[Dec 29 09:47:24] VERBOSE[10211] pbx.c: – Goto (macro-outisbusy,emergency,1)
[Dec 29 09:47:24] VERBOSE[10211] pbx.c: – Executing [emergency@macro-outisbusy:1] Playback(“SIP/101-00000002”, “all-circuits-busy-now&pls-try-call-later”) in new stack
[Dec 29 09:47:25] VERBOSE[10211] file.c: – <SIP/101-00000002> Playing ‘all-circuits-busy-now.gsm’ (language ‘en’)
[Dec 29 09:47:26] VERBOSE[10211] file.c: – <SIP/101-00000002> Playing ‘pls-try-call-later.gsm’ (language ‘en’)
[Dec 29 09:47:29] VERBOSE[10211] pbx.c: – Executing [emergency@macro-outisbusy:2] Congestion(“SIP/101-00000002”, “20”) in new stack
[Dec 29 09:47:31] VERBOSE[10211] app_macro.c: == Spawn extension (macro-outisbusy, emergency, 2) exited non-zero on ‘SIP/101-00000002’ in macro ‘outisbusy’
[Dec 29 09:47:31] VERBOSE[10211] pbx.c: == Spawn extension (from-internal, 0119532187, 9) exited non-zero on ‘SIP/101-00000002’
[Dec 29 09:47:31] VERBOSE[10211] pbx.c: – Executing [h@from-internal:1] Macro(“SIP/101-00000002”, “hangupcall”) in new stack
[Dec 29 09:47:31] VERBOSE[10211] pbx.c: – Executing [s@macro-hangupcall:1] GotoIf(“SIP/101-00000002”, “1?skiprg”) in new stack
[Dec 29 09:47:31] VERBOSE[10211] pbx.c: – Goto (macro-hangupcall,s,4)
[Dec 29 09:47:31] VERBOSE[10211] pbx.c: – Executing [s@macro-hangupcall:4] GotoIf(“SIP/101-00000002”, “1?skipblkvm”) in new stack
[Dec 29 09:47:31] VERBOSE[10211] pbx.c: – Goto (macro-hangupcall,s,7)
[Dec 29 09:47:31] VERBOSE[10211] pbx.c: – Executing [s@macro-hangupcall:7] GotoIf(“SIP/101-00000002”, “1?theend”) in new stack
[Dec 29 09:47:31] VERBOSE[10211] pbx.c: – Goto (macro-hangupcall,s,9)
[Dec 29 09:47:31] VERBOSE[10211] pbx.c: – Executing [s@macro-hangupcall:9] Hangup(“SIP/101-00000002”, “”) in new stack
[Dec 29 09:47:31] VERBOSE[10211] app_macro.c: == Spawn extension (macro-hangupcall, s, 9) exited non-zero on ‘SIP/101-00000002’ in macro ‘hangupcall’
[Dec 29 09:47:31] VERBOSE[10211] pbx.c: == Spawn extension (from-internal, h, 1) exited non-zero on ‘SIP/101-00000002’
[Dec 29 09:47:31] VERBOSE[10212] app_mixmonitor.c: == MixMonitor close filestream
[Dec 29 09:47:31] VERBOSE[10212] app_mixmonitor.c: == End MixMonitor Recording SIP/101-00000002
[Dec 29 09:47:32] NOTICE[8563] chan_sip.c: – Registration for ‘[email protected]’ timed out, trying again (Attempt #1127)
[Dec 29 09:47:32] VERBOSE[8563] dnsmgr.c: > doing dnsmgr_lookup for ‘vphone.co.za
[Dec 29 09:47:32] VERBOSE[8563] chan_sip.c: – Got SIP response 503 “SERVICE UNAVAILABLE” back from 196.3.177.10
[Dec 29 09:47:52] NOTICE[8563] chan_sip.c: – Registration for ‘[email protected]’ timed out, trying again (Attempt #1128)
[Dec 29 09:47:52] VERBOSE[8563] dnsmgr.c: > doing dnsmgr_lookup for ‘vphone.co.za
[Dec 29 09:47:52] VERBOSE[8563] chan_sip.c: – Got SIP response 503 “SERVICE UNAVAILABLE” back from 196.3.177.10
[Dec 29 09:47:59] VERBOSE[10213] manager.c: == Manager ‘admin’ logged on from 127.0.0.1
[Dec 29 09:47:59] VERBOSE[10213] manager.c: == Manager ‘admin’ logged off from 127.0.0.1
[Dec 29 09:48:03] VERBOSE[10215] manager.c: == Manager ‘admin’ logged on from 127.0.0.1
[Dec 29 09:48:04] VERBOSE[10215] manager.c: == Manager ‘admin’ logged off from 127.0.0.1
[Dec 29 09:48:05] VERBOSE[10217] manager.c: == Manager ‘admin’ logged on from 127.0.0.1