SIP/REACHABLE-UNREACHABLE

Discussion in 'General' started by mydigia, Jul 9, 2010.

  1. mydigia

    Joined:
    Sep 30, 2009
    Messages:
    38
    Likes Received:
    0
    Hello Everyone,

    I am giving it a try to see how can this forum help me, yeah, my first post...

    Well, with my installation everything is working fine, two PBX servers, both installed Elastix. One is on public IP address(now on called voip1), and the other (voip4) is having NATing, from its outside IP address, to allow/nat everything inside on UDP 5060, 10000~20000.

    For VoIP4, also sip_nat.conf is configured:
    nat=yes
    externhost=voip4.mydomain.com
    externrefresh=120
    localnet=192.168.1.0/255.255.255.0


    Everything with this setup is functioning for both VoIP1 and VoIP4, I have Snom and Aastra phone, connected to both, and they work together through IAX2 Trunking, just fine. But in our office, we have agents all around world, and we just started giving them our Aastra 53i's, so they can connect. I configured the the Aastras just like the ones we have in our offices internally. These agents are to be connected to VoIP4, which is behind NAT.

    So, as far as the configuration of Aastra is concerned, I had all the configurations done, just like the ones in the office, but instead, put the voip4.mydomain.com as the registrar and outbound server.

    Story goes on, phones got delivered to the agents, one of them had 3 in his office in Romania, as soon as they turn on the phone, the phone registers just fine, and in the /var/log/asterisk/full, it shows: "chan_sip.c: Peer '50' is now Reachable.", in less than a minute, on some unknown cause, logs show: "chan_sip.c: Peer '50' is now UNREACHABLE!", and in this case, if I have the qualify=yes, the caller during that unreachable period gets the unavailable message. If I put qualify=no, the caller hears ringing, but the actual phone is not ringing at all (even worse). I also tried giving values like 999, 555, 2000, 3000 to qualify, and none seemed to help.

    For all these extensions, I have canreinvite=no, host=dynamic, nat=yes, with g729 codec allowed only (which the phone supports, and is installed on Elastix servers), type=peer.

    Out router for all services, is Vyatta V.5. We have other services like our shared folders, and some other working just fine. Even the office phones have no issues.

    I brought the registration time down to its lowest on the phones, but still, not short enough to catch the "UNREACHABILITY"...

    I thought the issue is with VoIP4 being under NAT, so moved the agents to VoIP1 (even though that is not what we want), but still, same thing. I have a feeling that there is a misconfiguration, something which somewhere should be exclusively specified for these peers, to make asterisk understand that they are remote, so they it easy with them, or some sort of setting on the phone which I am now aware of?


    I don't know if I managed to explain everything, but should there be anything missing, please ask me, and I shall provide enough information to clarify.

    I really need to get over this problem, since they are all on top of my head.

    Any help is appreciated...

    Many Thanks,
    Ali.
     
  2. dicko

    Joined:
    Oct 24, 2008
    Messages:
    4,099
    Likes Received:
    0
    I have a little trouble deciphering your described network, please state what is the specific external IP of your VOIP1 and VOIP4 servers, are they different or the same? if they are the same you can't register SIP on port 5060 on both of them at the same time.
     
  3. mydigia

    Joined:
    Sep 30, 2009
    Messages:
    38
    Likes Received:
    0
    Thanks for your reply.

    No, VoIP1 has its own dedicated public ip address, and VoIP4, is part of a network, and the only service serving VoIP under that network. Basically, VoIP4 is the second office of ours IP address, which then, we have NATed 5060 to go to 192.168.1.5, as well as 10000~20000 range.

    Did I manage to explain what you asked?

    Thanks,
    Ali.
     
  4. dicko

    Joined:
    Oct 24, 2008
    Messages:
    4,099
    Likes Received:
    0
    Not really, please post the output of

    wget -q -O - checkip.dyndns.org:8245|sed -e 's/.*Current IP Address: //' |cut -d "<" -f1

    from each server, please obfuscate the most significant bits as necessary

    also the contents of both sip_nat.conf files for comparison.
     
  5. mydigia

    Joined:
    Sep 30, 2009
    Messages:
    38
    Likes Received:
    0
    Thanks for your reply!

    VoIP1:
    [root@voip1 ~]# wget -q -O - checkip.dyndns.org:8245|sed -e 's/.*Current IP Address: //' |cut -d "<" -f1
    82.102.73.37


    VoIP4:
    [root@trnrts-voip asterisk]# wget -q -O - checkip.dyndns.org:8245|sed -e 's/.*Current IP Address: //' |cut -d "<" -f1
    82.102.73.56

    Rgds,
    Ali.
     
  6. dicko

    Joined:
    Oct 24, 2008
    Messages:
    4,099
    Likes Received:
    0
    It can be a long way from Cyprus to Romania, please make sure all firewalls, both near and far, are appropriately setup, but pay more attention to "far", your config looks good but there are "many a slip between cup and lip"
     
  7. mydigia

    Joined:
    Sep 30, 2009
    Messages:
    38
    Likes Received:
    0
    1) Okey, I want to verify first on my end if there is anything wrong. The devices can make calls out, i am sure I have 5060 and 10000~20000 nated. I have sip_nat.conf properly setup. What else do I need to do?

    2) On their end, they have 8Mbps ADSL Connection. What could be their issue? What should I check on their dlink di-524 router?

    3) How is it that big DID providers, send incoming calls, and do not lose their registrations with peers all around the world?

    4) When is that a device/peer becomes UNREACHABLE, when it is UNREACHABLE is it really unreachable, or it is just asterisk assuming that?

    5) If it is the endpoint firewall issue (IF), then that means for each agent I have to worry about their firewall?

    :DISAPPOINTED:

    Rgds,
    Ali.
     
  8. dicko

    Joined:
    Oct 24, 2008
    Messages:
    4,099
    Likes Received:
    0
    In your case , my guess is pretty well always number 5 that will FYU . sorry but that's the way of things
     
  9. mydigia

    Joined:
    Sep 30, 2009
    Messages:
    38
    Likes Received:
    0
    Yes, but I don't understand, what should be configured on their firewall?

    What is the proper setup for their connection to work fine?

    Like ports to be opened? port forwarding can not be the case, because the don't have only one phone, they have 3 phones under the same network...

    Please elaborate on your guess...

    Thanks!
    Ali.
     
  10. dicko

    Joined:
    Oct 24, 2008
    Messages:
    4,099
    Likes Received:
    0
    Sorry don't know your hardware, it's possible that each extension behind that firewall will need a unique registration port , e.g. 5060,5061,5062 etc. some routers are clever, some are just cheap. :)
     
  11. mydigia

    Joined:
    Sep 30, 2009
    Messages:
    38
    Likes Received:
    0
    I don't think that would be the case. Because initially we sent them only one phone, and the same exact thing was happening. Even now I can have only one phone turned on, and plugged in, and can see same thing happening...
     
  12. mydigia

    Joined:
    Sep 30, 2009
    Messages:
    38
    Likes Received:
    0
    Apart from that, the same network, has a computer with a softphone (Zoiper), IAX peer, and it is working just fine ever since. So it if was firewall, it is not doing that for IAX, and only SIP? (sounds abnormal)

    That is why i doubt it is the configuration and SIP behavior, and some changes on the peer configuration, or current setup will fix it. I just don't know any better....

    Thanks,
    Ali.
     
  13. dicko

    Joined:
    Oct 24, 2008
    Messages:
    4,099
    Likes Received:
    0
    Then revert to the time honored

    sip debug

    from the asterisk CLI

    IAX2 is simpler and only needs one port open, it will carry signaling and payload (audio) on the same connection so if IAX2 works then then SIP will probably work also if you get it configured correctly, maybe ask the vendor, it is vendor specific here and I'm sorry but I can't be of more help.

    dicko?
     
  14. mydigia

    Joined:
    Sep 30, 2009
    Messages:
    38
    Likes Received:
    0
    Something else!

    Last night I tried the following:

    Used another ADSL connection, far from the PBX, but in the same city still, and got the same result. The peer was going unreachable... If I didn't have short enough registration time, it was staying unreachable forever. And then I took off qualify, and set it to =no. The soft phone was receiving incoming, but after, even though I switched off the soft phone, and the computer, calling to that extension was still ringing, instead or normally saying the person is not available.

    Rgds,
    Ali.
     
  15. dicko

    Joined:
    Oct 24, 2008
    Messages:
    4,099
    Likes Received:
    0
    sorry , but that's still a router misconfiguration, perhaps this time it points top the local one, I wish I could help you more.

    dicko
     
  16. mydigia

    Joined:
    Sep 30, 2009
    Messages:
    38
    Likes Received:
    0
    Thanks for your replies.

    I will now give it a try from Romania, switching all phones off, and trying a softphone on SIP. That will clarify everything...

    I appreciate your time though.


    Anyone else any clue?

    Rgds,
    Ali.
     
  17. mastervoip

    Joined:
    Apr 20, 2012
    Messages:
    50
    Likes Received:
    0
    Hi all,

    I'm having the exact same problems of SIP extensions not registering at some point in the day.
    The difference is that it occurs ocassionaly, say Monday 9:00am then Tuesday 12:00pm, Wednesday 10am and 4pm.... It randomly happens.

    I have three Grandstream FXS 24 Port channel banks, but specifically one that has the most issues.

    Here's my conf:

    FXS 1: SIP accounts 1 through 24
    FXS 2: Sip accounts 25 through 49
    FXS 3: SIP accounts 50 through 72

    THe FXS 3 has the most incidence of UNREACHABLE STATUS of the SIP accounts. Shortly after 2 or three minutes, they go back to the REACHABLE status. Get it?

    I noticed that ports 5060+2 are used in FXS 1, but the same configurations are used in all the other ones. In CLI, since ports are occupied, they use a random port, so they can communicate.

    I do have a sip_nat.conf file with the same configurations you mention, but I think you problem isn't there at all.

    I isolated my PBX from all connections and the internet, and still had the same problems. It´s more evident once there's a lot of traffic.

    My first guess is the PORT that each SIP Extension is using, of maybe some network issue.

    Any other ideas?
     

Share This Page