Change ip to static in and outbound calls stop

Discussion in 'General' started by evok20, Jun 3, 2009.

  1. evok20

    Joined:
    Jun 2, 2009
    Messages:
    9
    Likes Received:
    0
    Hi,
    Sorry if this has been covered somewhere, I searched and searched and have not found this issue covered anywhere..

    I have a working system set up elastix version 1.5.2-2

    Problem is when I set my ip address (in elastics network config) to static, all my inbound and outbound calls stop working.. on outbound calls I get "all circuits are busy now" and inbound just goes straight to my voip providers voice mail.. If I change it back to dhcp it seems to work again.. Has anyone run into this before or know what might cause that?

    I'm not sure if it is need or not but I will post my settings just in case..

    SIP Trunk settings: (BTW there is a default zap trunk from the install that I don't use)

    allow=ulaw
    authname=XXXXXXXXX
    canrenvite=no
    context=from-pstn
    defaultip=XXXXXXXXXXXX
    disallow=all
    dtmfmode=rfc2833
    fromdomain=XXXXXXXXXXXXXXXX
    fromuser=XXXXXXXXXXXX
    host=XXXXXXXXXXXXXXXX
    insecure=very
    secret=XXXXXXXXXXX
    type=friend
    username=XXXXXXXXXXX

    Dial Rules:
    1+NXXNXXXXXX
    1NXXNXXXXXX
    411
    911


    Outbound route:
    Dial rules:
    411
    911
    011.
    1NXXNXXXXXX
    NXXNXXXXXX
    NXXXXXX

    trunk sequence goes straight to my voip sip trunk (0)

    Any help is greatly appreciated..

    Like I said it all works until I try to change to static ip..
     
  2. Patrick_elx

    Joined:
    Dec 14, 2008
    Messages:
    1,120
    Likes Received:
    0
    Did you set in
    sip_nat.conf
    externip and localnet?

    Is your static ip in the same subnet than the one you had in dhcp?
    If not, depending on your network topology you maybe need to change your nat setting for each extension/trunk?

    Did you set up the DNS, router and netmask properly?

    Have you tried to do a reboot after the change (I had that problem once, everything looks fine on all the files and display, however when I looked with wireshark some stuff still had the old address)?
     
  3. evok20

    Joined:
    Jun 2, 2009
    Messages:
    9
    Likes Received:
    0
    Thanks for the quick reply..

    question 1:
    Did you set in
    sip_nat.conf
    externip and localnet?

    Answer = no
    My external IP is not static I believe. Not sure I understand the configs for sip_nat.conf - I will do some snooping on that unless you feel like opening my eyes :unsure:

    question 2:
    Is your static ip in the same subnet than the one you had in dhcp?

    Answer = yes
    Actually it is the exact same ip assign during dhcp I just clicked to make it static..

    Question 3:
    Have you tried to do a reboot after the change

    Answer yep every time I reboot.. When I switch to static and reboot phone stops working.. Then if I switch back to dhcp and reboot it starts working again.. It is always the same IP either way..

    Sorry if I seem a little ignorant, this is my first elastix install obviously..
     
  4. evok20

    Joined:
    Jun 2, 2009
    Messages:
    9
    Likes Received:
    0
    So I was searching in the forums and found this little bit of info, would this be appropriate for me to put into the sip_nat.conf file for a connection to an isp that assigns a dynamic ip? localnet being the static ip I would set the pbx server to..

    nat=yes
    externip=`curl whatismyip.com/automation/n09230945.asp`
    localnet=192.168.2.9/255.255.255.0
    externrefresh=120


    Really all I was doing previously is switching the ip from dhcp to static in the elastics control panel..
     
  5. dicko

    Joined:
    Oct 24, 2008
    Messages:
    4,099
    Likes Received:
    0
    It occurs to me that when you use dhcp then you will be normally be given a nameserver(DNS), statically you will need a nameserver in /etc/resolv.conf.

    a test would be that ping www.google.com doesn't work but ping 72.14.213.103 (for example) does.
    the output of
    ifconfig
    should match the assigned IP, router(gateway) and subnet both statically and dynamically configured.

    and from your last post

    >>localnet=192.168.2.9/255.255.255.0

    is not correct
    192.168.2.9 is a host (your server) 192.168.2.0/255.255.255.0 is the network it is in, given this common misunderstanding I would check that your statically assigned host, network and subnet settings are not similarly mis-interpreted.
     
  6. evok20

    Joined:
    Jun 2, 2009
    Messages:
    9
    Likes Received:
    0
    Great thanks for your help guy's I really appreciate it.. I will use these ideas to move forward when I get a chance to sit down and work on the server.. For now the dhcp is working fine so it is not an emergency..
     

Share This Page