3CX WindowsDNS.bat HELP

Discussion in '3CX Phone System - General' started by HowardMaxfield241, Dec 12, 2017.

Thread Status:
Not open for further replies.
  1. HowardMaxfield241

    Joined:
    Nov 24, 2017
    Messages:
    10
    Likes Received:
    0
    So i installed a Failover and as directed by 3CX partner support I created the A record in my DNS to point to the active server. They all so told me to setup a .BAT file to automatically initiate when the passive server goes active. Now I have that .BAT however it doesnt seem like its working. When the Passive Server goes active all the extensions will not provision to the FQDN, and yes I do have all the extension interfaces set the to FQDN to provision. I have followed 3CX's advice to the T and yet it still will not work. Im thinking it the .BAT file not pointing the DNS to the Failover once its active. This is the .BAT


    REM *** Dyn Variables ***
    set hostA=192.168.1.2
    set hostB=192.168.5.200
    set zone=*******
    set fqdn=********
    set dnsserver=192.168.1.2

    REM *** Change To Host B ***
    REM Start new DNS Change in Zone ********
    dnscmd %dnsserver% /RecordDelete %zone% %fqdn% 60 A %hostA% /f
    dnscmd %dnsserver% /RecordAdd %zone% %fqdn% 60 A %hostB%
    dnscmd %dnsserver% /clearcache

    ipconfig /flushdns


    SET hostA=192.168.1.2
    set hostB=192.168.5.200
    set zone=*********
    set fqdn=*********
    set dnsserver=192.168.1.2


    Im not 100% familiar with script so any help would be GREATLY appreciated. I've been working on this for too long now.
     
  2. cobaltit

    cobaltit Active Member

    Joined:
    Mar 22, 2012
    Messages:
    913
    Likes Received:
    146
    So at no point did you actually test the DNS? You mention the phones don't register but you don't say anything about checking DNS resolution. Batch files are just automation so try running the commands manually first to confirm they actually work instead of just blinding running the batch file.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  3. HowardMaxfield241

    Joined:
    Nov 24, 2017
    Messages:
    10
    Likes Received:
    0
    Whelp I got the .Bat file configured properly, however when I run it it will not connect to the DNS server. it gives me a error.

    Command failed: ERROR_ACCESS_DENIED 5 (00000005)
     
  4. viraltechnology

    Joined:
    Mar 22, 2015
    Messages:
    39
    Likes Received:
    6
    Which versions of windows is running your dns? which version of windows are you running the batch file from ?
     
  5. HowardMaxfield241

    Joined:
    Nov 24, 2017
    Messages:
    10
    Likes Received:
    0
    both are Server 2016
     
  6. NickD_3CX

    NickD_3CX Support Team
    Staff Member 3CX Support

    Joined:
    Jun 2, 2014
    Messages:
    1,327
    Likes Received:
    73
Thread Status:
Not open for further replies.