Peer 'XXX' is now UNREACHABLE!


#1

Hello,

I work with Asterisk 1.4.26.2 and I have phones at different locations and my asterisk server at another location. I have been having this problem for a while now. One of my Polycom phones can’t register with server. I have other Polycom phones (located somewhere else but registering to same server) with exact same config files that work fine. I also have analog phones on a PAP2T at the same location and they also work fine. The phone that does not register works for outgoing calls but cannot receive incoming calls. When I do a sip show peers I see the following:

241/241 64.254.255.105 D N 22835 UNREACHABLE

My sip.conf file goes like this:

[general]
t38pt_udptl = yes, fec, maxdatagram = 400
faxdetect = yes
context = default
allowoverlap = no
bindport = 5060
bindaddr = 0.0.0.0
srvlookup = yes
tos_sip = af31
tos_audio = ef
alwaysauthreject = yes

[241]
callerid = 241
username = 241
mailbox = 241@internal
context = countryhouse
type = friend
secret = xxxxxxxxx
host = dynamic
canreinvite = no
dtmfmode = rfc2833
disallow = all
allow = ulaw
subscribecontext = internal
call-limit = 10
qualify = 3000 (i tried different values)
language = en
callgroup = 1
pickupgroup = 1
nat = yes

I spent a lot of time going through forums with no success. If anyone has an idea I will appreciate your help.

Thank you,


#2

Can you please login and go into the CLI and attempt the call then copy and paste the results below?


#3

You should not be using nat=yes. Try using nat=route instead.

Why are you using qualify ? The phone is responsible for punching holes through the NAT.
You might also consider lowering the registration expiration maxexpiry/defaultexpiry parameters.


#4

Here, this is when I am trying to call from home (ext 200) to office (ext 241):

-- Executing [241@maison:1] Dial("SIP/200-b7331610", "Local/241@internal||twk") in new stack
-- Called 241@internal
-- Executing [241@internal:1] Macro("Local/241@internal-fb00,2", "dialext") in new stack
-- Executing [s@macro-dialext:1] GotoIf("Local/241@internal-fb00,2", "0?boitevoc|1") in new stack
-- Executing [s@macro-dialext:2] Set("Local/241@internal-fb00,2", "SIPADDHEADER01=Alert-Info:") in new stack
-- Executing [s@macro-dialext:3] Set("Local/241@internal-fb00,2", "GROUP(241)=OUTBOUND_GROUP") in new stack
-- Executing [s@macro-dialext:4] GotoIf("Local/241@internal-fb00,2", "0?s|106") in new stack
-- Executing [s@macro-dialext:5] Set("Local/241@internal-fb00,2", "GROUP(200)=OUTBOUND_GROUP") in new stack
-- Executing [s@macro-dialext:6] GotoIf("Local/241@internal-fb00,2", "0?dnd|1") in new stack
-- Executing [s@macro-dialext:7] GotoIf("Local/241@internal-fb00,2", "0?record|1") in new stack
-- Executing [s@macro-dialext:8] GotoIf("Local/241@internal-fb00,2", "0?record|1") in new stack
-- Executing [s@macro-dialext:9] Dial("Local/241@internal-fb00,2", "SIP/241|30|twk") in new stack

[Sep 28 23:41:04] WARNING[5458]: app_dial.c:1275 dial_exec_full: Unable to create channel of type ‘SIP’ (cause 20 - Unknown)
== Everyone is busy/congested at this time (1:0/0/1)
– Executing [s@macro-dialext:10] VoiceMail(“Local/241@internal-fb00,2”, “241@internal|sug(7)”) in new stack
– <Local/241@internal-fb00,2> Playing ‘vm-theperson’ (language ‘en’)
– Local/241@internal-fb00,1 answered SIP/200-b7331610
– <Local/241@internal-fb00,2> Playing ‘digits/2’ (language ‘en’)
– <Local/241@internal-fb00,2> Playing ‘digits/4’ (language ‘en’)
– <Local/241@internal-fb00,2> Playing ‘digits/1’ (language ‘en’)
– <Local/241@internal-fb00,2> Playing ‘vm-isunavail’ (language ‘en’)
– <Local/241@internal-fb00,2> Playing ‘beep’ (language ‘en’)
– Recording the message
– x=0, open writing: /var/spool/asterisk/voicemail/internal/241/tmp/nPQBib format: wav49, 0x8ac5058
– x=1, open writing: /var/spool/asterisk/voicemail/internal/241/tmp/nPQBib format: gsm, 0x8ae8ee0
– x=2, open writing: /var/spool/asterisk/voicemail/internal/241/tmp/nPQBib format: wav, 0x8af1cc8
– User hung up
== Spawn extension (maison, 241, 1) exited non-zero on ‘SIP/200-b7331610’
== Spawn extension (macro-dialext, s, 10) exited non-zero on ‘Local/241@internal-fb00,2’ in macro ‘dialext’
== Spawn extension (internal, 241, 1) exited non-zero on ‘Local/241@internal-fb00,2’

I also forgot to mention that the phone registers every hour but loses registration 66 seconds later.

[Sep 29 02:29:02] NOTICE[2664]: chan_sip.c:13107 handle_response_peerpoke: Peer ‘241’ is now Reachable. (55ms / 3000ms)
[Sep 29 02:30:08] NOTICE[2664]: chan_sip.c:16797 sip_poke_noanswer: Peer ‘241’ is now UNREACHABLE! Last qualify: 55


#5

[quote=“thor”]You should not be using nat=yes. Try using nat=route instead.
[/quote]

I tried but nothing changed. Thanks


#6

[quote]Why are you using qualify ? The phone is responsible for punching holes through the NAT.
You might also consider lowering the registration expiration maxexpiry/defaultexpiry parameters.[/quote]
When I am not using qualify, I get the same problem except the status shows unmonitored instead of unreachable. I am going to do some tests with eaxexpiry/defaultexpiry and post results.


#7

When this behavior is happening with this message:
app_dial.c:1275 dial_exec_full: Unable to create channel of type ‘SIP’ (cause 20 - Unknown)

Please run this command from inside the CLI and post the results:
sip show peer 241


#8
  • Name : 241
    Secret :
    MD5Secret :
    Context : chalet
    Subscr.Cont. : internal
    Language : en
    AMA flags : Unknown
    Transfer mode: open
    CallingPres : Presentation Allowed, Not Screened
    Callgroup : 1
    Pickupgroup : 1
    Mailbox : 240@internal
    VM Extension : asterisk
    LastMsgsSent : 29/0
    Call limit : 10
    Dynamic : Yes
    Callerid : “” <241>
    MaxCallBR : 384 kbps
    Expire : 3318
    Insecure : no
    Nat : Route (also tried yes but same result)
    ACL : No
    T38 pt UDPTL : No
    CanReinvite : No
    PromiscRedir : No
    User=Phone : No
    Video Support: No
    Trust RPID : No
    Send RPID : No
    Subscriptions: Yes
    Overlap dial : No
    DTMFmode : rfc2833
    LastMsg : 0
    ToHost :
    Addr->IP : 64.xxx.xxx.xxx Port 61140
    Defaddr->IP : 0.0.0.0 Port 5060
    Def. Username: chalet
    SIP Options : (none)
    Codecs : 0x4 (ulaw)
    Codec Order : (ulaw:20)
    Auto-Framing: No
    Status : UNREACHABLE
    Useragent : PolycomSoundPointIP-SPIP_330-UA/3.3.1.0769
    Reg. Contact : sip:241@192.168.xxx.xxx

#9

Please try this in your sip.conf then issue a “sip reload” from within Asterisk CLI

[241]
callerid = 241
username = 241
mailbox = 241@internal
context = countryhouse
type = friend
secret = xxxxxxxxx
host = dynamic
canreinvite = no
dtmfmode = rfc2833
disallow = all
allow = ulaw
subscribecontext = internal
call-limit = 10
qualify = yes
language = en
callgroup = 1
pickupgroup = 1
nat = yes
registersip = yes
insecure = port,invite


#10

I tried the sip config you sent me. Same thing happens except it registered for 63 seconds and then lost registration.

[Sep 29 18:12:59] NOTICE[2664]: chan_sip.c:13107 handle_response_peerpoke: Peer ‘241’ is now Reachable. (55ms / 2000ms)
[Sep 29 18:14:03] NOTICE[2664]: chan_sip.c:16797 sip_poke_noanswer: Peer ‘241’ is now UNREACHABLE! Last qualify: 55


#11

Is there a firewall in between? I have had similar issues with certain firewalls. If a firewall what model?


#12

There is a Cisco Valet Plus router. I tried opening ports for the phone with no better results. I even changed from a D-Link to a Cisco and same thing happens. Also I have a Linksys PAP2T running at the same location and it registers OK. Would’nt it be the same for this device if it was a firewall issue?


#13

set your phone to re-register every 60 seconds.


#14

That could work but I only have basic knowledge on Polycom config files. I tried before with no success. What command would you use ?


#15

Does it have something like a register time out on the phone? There should also be a web user interface where a GUI can be seen. What is the make and model of the phone?


#16

Polycom IP330 but I usually don’t use the GUI, I use config files on the server. I feel so stupid that I did not think of that. Thanks, I’ll keep you posted.