Peer Is UNREACHABLE

Home » Asterisk Users » Peer Is UNREACHABLE
Asterisk Users 17 Comments

Hi list!

I have a problem and I hope someone can help me… I configured an Asterisk on a VM to serve more accounts and act as a proxy to other SIP-providers.

The first account running on my phone works without any problem. A second account, running on the phone of my wife, is always UNREACHABLE. I can just see in the log:

[May 28 21:48:46] NOTICE[3646]: chan_sip.c:22933 sip_poke_noanswer: Peer
‘0049351111111’ is now UNREACHABLE! Last qualify: 0

In the CLI I can see:

Name/username Host Dyn Nat ACL Port Status
0049351111111/00493511111 192.168.200.11 D 5060 UNREACHABLE
0049351222222/00493512222 192.168.200.10 D 5060 OK (17 ms)
0049351333333 (Unspecified) D 5060 UNKNOWN
1234 (Unspecified) D 5060 UNKNOWN
messagenet/1234567890 212.97.59.76 5061 Unmonitored pbxanika/00493511111111 172.16.34.132 5060 Unmonitored pbxfax/00493513333333 172.16.34.132 5060 Unmonitored pbxluca/00493512222222 172.16.34.132 5060 Unmonitored
8 sip peers [Monitored: 1 online, 3 offline Unmonitored: 4 online, 0 offline]

Asterisk connects to another Test-VM with AsteriskNOW and to the italian provider Messagenet.

Can someone suggest me, what can I do?
I can send the configuration file, if they are needed.

Thanks Luca Bertoncello
(lucabert@lucabert.de)

17 thoughts on - Peer Is UNREACHABLE

  • proxy to UNREACHABLE. ms)

    offline]

    What kind of phone are we talking about, both yours that works and your wife’s that does not?

    Can you ping the unreachable phone and does it respond to a ping?

    Many phones will have a network test function built in to them to help you determine if the phone is properly connected to the network.

    Do you see anything in the asterisk logs or the logs of the phone itself
    (providing the phone puts logs somewhere) that indicate a failure to register or to resolve the ip address of the asterisk server?

  • Kevin Larsen schrieb:

    Right!

    I can ping both phones from the VM

    Unfortunately not that… I tried with Twinkle from my PC, using the same account of my wife
    (configured IDENTICALLY to my account, just another username). It don’t work… I presume, I configured something wrong in Asterisk…

    Unfortunately not… Just UNREACHABLE…

    Thanks Luca Bertoncello
    (lucabert@lucabert.de)

  • your you itself

    Can you post the Manufacturer and Model of your phones (both of them if they are different)? That will help us look up what diagnostics/log files there might be on the phones.

    Does the Twinkle software on the PC show any error messages?

    If you watch the CLI in asterisk, does anything go by in there regarding a failed registration? If I get one of my phones programmed with an incorrect username/secret, it will try to register with the server, but can’t. Those failed registrations do show up in the CLI.

    Double check that you are not mistyping the credentials somewhere. If you do post the relevant parts of your config in here, you might want to obscure the secret.

  • Kevin Larsen schrieb:

    Of course!
    My phone is a Thomson ST2022 and my wife has a KE1020A

    Nope, just trying and then say “unable to connect”…

    That’s very strange… I expected these errors, but in the console I can’t see anything…

    SOMETIMES, but just sometimes, if the phone of my wife tries to connect, I
    see something like “connecting from 192.168.200.11” (I can’t find the error message anymore), and then:

    [May 28 21:46:27] NOTICE[3592] chan_sip.c: Peer ‘00493512222222’ is now UNREACHABLE! Last qualify: 0

    Which part of the configuration do you need?

    Thanks Luca Bertoncello
    (lucabert@lucabert.de)

  • I’d start by turning on sip debugging in asterisk
    >sip set debug ip [your_phone_ip]

    and use tcpdump or wireshark to see what the OS sees

    tcpdump host [your_phone_ip] and udp port 5060

  • Darryl Moore schrieb:

    Really destroying SIP dialog ‘490d1996593c8e11217828b71aae5c4d@172.16.34.133’ Method: OPTIONS
    Reliably Transmitting (no NAT) to 192.168.200.11:5060:
    OPTIONS sip:00493512222222@192.168.200.11:5060 SIP/2.0
    Via: SIP/2.0/UDP 172.16.34.133:5060;branch=z9hG4bK13db26f5;rport Max-Forwards: 70
    From: “asterisk” ;tag=as1215345d To:
    Contact:
    Call-ID: 78f3a0d0145f3dfa630a5e7c506142d6@172.16.34.133
    CSeq: 102 OPTIONS
    User-Agent: Asterisk PBX 1.6.2.5-0ubuntu1.4
    Date: Thu, 28 May 2015 20:39:02 GMT
    Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO
    Supported: replaces, timer Content-Length: 0

    repeated in loop… Help that?

    192.168.200.11 is the IP of the phone of my wife, and 172.16.34.133 the IP of the Asterisk server.

    Thanks Luca Bertoncello
    (lucabert@lucabert.de)

  • The phone you gave your wife is really old. Are you sure it supports SIP
    OPTIONS? Can you make a call in or out to it? If you can, it is more likely that it just doesn’t support that and you can’t use a qualify statement.

  • Kevin Larsen schrieb:

    No, I’m not sure. And no, I can’t make any call, right now… At least, not connected to my Asterisk… If I connect it to the other VM with AsteriskNOW I can call my Twinkle, but NOT my phone connected on my Asterisk, using the “proxy”. I can see that in the log:

    [May 28 22:49:51] WARNING[4135]: chan_sip.c:12800 check_auth: username mismatch, have <1234>, digest has
    [May 28 22:49:51] NOTICE[4135]: chan_sip.c:20083 handle_request_invite:
    Failed to authenticate device “Test1” ;tag=as6dd12e05

    Thanks Luca Bertoncello
    (lucabert@lucabert.de)

  • Ahh. Seen that before! That suggests to me that you don’t have your sip.conf records setup right.

    What’s your sip.conf look like?

  • my but
    ;tag=as6dd12e05

    I know from your previous email that you are new to Asterisk. Have you created a dialplan that would allow you to call from one extension to another without going through your phone company? That is to say, call from your phone through Asterisk to your wife’s phone?

    You have two parts that you need to have in place for the basics to work. You need your sip.conf in order to tell asterisk what devices and phone trunks you have and you need extensions.conf to tell Asterisk how to route calls. Since you are new to this, you can start by getting the two phones to both register (sounds like one of them is and one probably is not). Then you get to where you can dial from one phone to the other and vice versa. From there you can add in the telephone company lines and the ability to dial in and out to the world.

    I am still curious why you have both an Asterisk setup and an AsteriskNow setup? Is that just to play around with? At the end of the day you should just need one or the other.

  • Darryl Moore schrieb:

    Well, here what I wrote in my sip.conf:

    register => 00493511111111:MYSECRET@pbxluca/00493511111111
    register => 00493512222222:MYSECRET@pbxfax/00493512222222
    register => 00493513333333:MYSECRET@pbxanika/00493513333333
    register => 4444444444:MYSECRET@messagenet/4444444444

    [pbxluca]
    type=peer defaultuser493511111111
    secret= MYSECRET
    dtmfmode=rfc2833
    host2.16.34.132
    context=luca_incoming outboundproxy2.16.34.132
    portP60
    fromuser493511111111
    fromdomain2.16.34.132
    usereqphone=yes canreinvite=no insecure=invite

    [pbxfax]
    type=peer defaultuser493512222222
    secret= MYSECRET
    dtmfmode=rfc2833
    host2.16.34.132
    context

  • Kevin Larsen schrieb:

    Just why I need a second SIP-provider to check if all works, when Deutsche Telekom activate the new line… So I installed AsteriskNOW on a VM and configured it to serve a couple of number. Then I installed Asterisk on a second VM and configured it to connect to AsteriskNOW (later will be Telekom) and Messagenet.

    Dialplan and the other configuration were already sent…

    Thanks Luca Bertoncello
    (lucabert@lucabert.de)

  • I think your phone may be trying to register with the username ‘1234’, while your sip configuration is expecting ‘luca’. Can you try changing your phone registration credentials to use ‘luca’? Can you give us a sip transcript when you try to place a call from it?

  • Darryl Moore schrieb:

    Well, right now this phone USES the username 1234, on the AsteriskNOW (the
    “later Telekom”). I really don’t know why it tries to authenticate to my “own Asterisk”…

    What I see right now, if I try to connect the phone of my wife to “my own Asterisk”:

    — Registered SIP ‘00493512222222’ at 192.168.200.11 port 5060
    [May 28 23:46:01] NOTICE[1350]: chan_sip.c:22933 sip_poke_noanswer: Peer ‘00493512222222’ is now UNREACHABLE! Last qualify: 0

    But, as I said, right now the phone is connected to the AsteriskNOW…

    Well, now I must sleep… Hope someone can suggest me something that I can try tomorrow.

    Thanks a lot Luca Bertoncello
    (lucabert@lucabert.de)

  • Darryl Moore schrieb:

    Well, another information (then I **MUST** go sleep…):

    I tried to use my mobile phone logging to my “own Asterisk” with the login data of my wife’s telefon. Now this user is REACHABLE… So I think, it was a problem on her phone…

    I can’t call and receive calls. I think, that it’s a problem of my Dialplan. If I try to call the mobile phone from AsteriskNOW (later: “the world”), I
    see that in Asterisk’s log (“my own Asterisk”):

    == Using SIP RTP CoS mark 5
    [May 29 00:07:49] NOTICE[1106]: chan_sip.c:20163 handle_request_invite: Call
    from ‘00493511111111’ to extension ‘00493512222222’ rejected because
    extension not found.

    That’s very strange, since I call from Twinkle and it has the number “1234”…

    If I call my mobile phone using my VoIP-phone (connected on the same “my own Asterisk”) I get that:

    == Using SIP RTP CoS mark 5
    == Call from 00493511111111 to 00493512222222
    == Outgoing using pbxluca
    == Using SIP RTP CoS mark 5
    == Using SIP RTP CoS mark 5
    [May 29 00:09:25] WARNING[1106]: chan_sip.c:12800 check_auth: username
    mismatch, have <00493511111111>, digest has <00493512222222> [May 29
    00:09:25] NOTICE[1106]: chan_sip.c:20083 handle_request_invite: Failed to
    authenticate device “00493511111111”
    ;tag=as058adbf2 == Everyone is
    busy/congested at this time (1:0/1/0) == Spawn extension (myproxy,
    00493512222222, 9) exited non-zero on ‘SIP/00493511111111-00000004’

    Maybe this is the same problem, since I didn’t configured my own Asterisk to manage “internal calls” (since I don’t need to call my wife on VoIP… :D)

    And, last but not least, if I try to call from my mobile phone Twinkle I get this:

    == Using SIP RTP CoS mark 5
    == Call from 00493512222222 to 1234
    == Outgoing using pbxanika
    == Using SIP RTP CoS mark 5
    == Everyone is busy/congested at this time (1:0/1/0)
    == Spawn extension (myproxy, 1234, 15) exited non-zero on
    ‘SIP/00493512222222-00000006’

    And if I try to call my VoIP-phone I get that:

    == Using SIP RTP CoS mark 5
    == Call from 00493512222222 to 00493511111111
    == Outgoing using pbxanika
    == Using SIP RTP CoS mark 5
    == Using SIP RTP CoS mark 5
    [May 29 00:12:02] WARNING[1106]: chan_sip.c:12800 check_auth: username mismatch, have <00493512222222>, digest has <00493511111111>
    [May 29 00:12:02] NOTICE[1106]: chan_sip.c:20083 handle_request_invite: Failed to authenticate device “00493512222222” ;tag=as193c26b0
    == Everyone is busy/congested at this time (1:0/1/0)
    == Spawn extension (myproxy, 00493511111111, 15) exited non-zero on ‘SIP/00493512222222-0000000a’

    Maybe can these information help someone helping me?

    Thanks a lot!
    Luca Bertoncello
    (lucabert@lucabert.de)

  • Maybe shut off qualify for the peer? I think I tried twinkle a few years ago and it didna (yes didna) like the qualify packet. the sip options qualify packet is only needed to keep the UDP state tables in a firewall if the peer is remote

  • Zitat von Adrian Serafini :

    Well, the same happens with my wife’s phone…

    I’ll try later again…

    Regards Luca Bertoncello
    (lucabert@lucabert.de)