New configuration (edited)

I use FreePBX and asterisk 13 on a hosted server and now trying to use similar setup on home network but running into trouble.
I installed fresh on desktop pc asterisk and FreePBX distro with OS. Once installed I reserved the local ip to the machine, disabled firewall options on router, set local ip of machine as DMZ, ports 5060-5160 forwarded to local ip of pbx. I have static ip and sip dot mydomain dot com pointed to outside ip.
From GUI I added two users and two extensions, at this point I expect soft phone app to connect but nothing. I configured trunks, incoming and out going routes, the hosted pbx works great, the pc pbx I still have not made connection from soft phone app, or calling did but call terminates the second first ring starts.
Am I wrong in think it should be working? Are there other configurations that were possibly set by the hosting provider I need to change or is this likely a different issue?

Your post is too vague to offer specific help.

Troubleshoot by starting with the simplest operations, with FreePBX firewall disabled.

From another machine on your home LAN, can you ping the PBX, get a command prompt with SSH (e.g. Putty on Windows) and access the FreePBX GUI? If not, you have a network problem unrelated to FreePBX.

Next, try to register to FreePBX from an IP phone, ATA, softphone or smartphone SIP app on your home LAN. With default settings on a recent FreePBX, pjsip uses port 5060 but chan_sip uses port 5160. Configure the client device to use the correct port. Some devices won’t work with the long secret (SIP password) generated by FreePBX; try setting a short one manually. Troubleshooting is usually easiest with a softphone, but consider using the same device that you successfully used with the hosted system.

If the device won’t register, what error is occurring (request timeout, authentication failure, etc.)? Once registered, try to get internal PBX applications to work, e.g. *43 echo test or *65 report extension number. Then, set up another extension and try to call between them. After you get that working, set up a trunk and an outbound route and debug outgoing calls. Finally, set up an inbound route and get incoming calls working.

If you need help, post details of your devices / services, configuration and any relevant logs.

What is a DMX server? If you mean DMZ, that’s a bad idea; forward the SIP and RTP ports instead. However, this is usually only required for external extensions and providers using IP authentication.

Thank you for responding so quickly. I edit my post in hopes to make more sense. I am using the same soft phone app (Zoiper) for testing the home PBX as well as regular use on the hosted PBX. Yes I am able to reach the GUI from local network and from the web.
DMZ is indeed what I meant, I set that while testing for network problems. I get the errors, “Failed to authenticate” and “No matching endpoint found”. It looks like it’s trying to register with pjsip, but I set everything up using chansip options.

[2018-03-17 23:03:37] NOTICE[20484] res_pjsip/pjsip_distributor.c: Request ‘REGISTER’ from ‘“myname” sip:[email protected];user=phone’ failed for ‘mystaticip:55009’ (callid: [email protected]) - No matching endpoint found
[2018-03-17 23:03:37] NOTICE[20484] res_pjsip/pjsip_distributor.c: Request ‘REGISTER’ from ‘“myname” sip:[email protected];user=phone’ failed for ‘mystaticip:55009’ (callid: [email protected]) - Failed to authenticate

In recent FreePBX versions, pjsip listens on port 5060 and chan_sip on port 5160. Assuming that you haven’t changed that, you have three easy options:

  1. Have your Zoiper connect to port 5160. Assuming Zoiper 5 for Windows, in Settings for the Account in question, change Domain to e.g. 192.168.1.123:5160 (replace 192.168.1.123 with the PBX IP address).
  2. Change the extension to a pjsip extension (which listens on port 5060 by default).
  3. In Asterisk SIP settings, change pjsip Port to Listen On to e.g. 5260, change Chan SIP Bind Port to 5060, then restart Asterisk (or reboot server).

Any of these should make your softphone connect to the port that your extension is using. Your choice should be based on which driver you’ll be using long term and whether you want a non-standard port.

I am using Zoiper beta for android, as well as zoiper 5 for windows.
I have tried with the local ip 192.168.1.X:5060 and 5160 and nothing. I made a test pjsip extension and nothing there either.
I also tried changing the sip settings like you listed and restarted asterisk, again no luck. Got any other ideas I can try out?

Some things to check:

For your initial testing, turn off FreePBX Firewall and any firewall you may have set up in the OS. At a root shell prompt, type
iptables -L
and you should see something like:
Chain INPUT (policy ACCEPT)
target prot opt source destination
Chain FORWARD (policy ACCEPT)
target prot opt source destination
Chain OUTPUT (policy ACCEPT)
target prot opt source destination

Next, don’t push your luck by using a domain name that points to your public IP; many routers (including high end ones like pfSense and Mikrotik) don’t handle ‘hairpinning’ (with default settings). Just put the LAN IP of the PBX (with :portnumber if other than 5060) in Zoiper’s Domain field.

If you still have trouble, enable SIP debugging. At the Asterisk command line, type
pjsip set logger on
(for pjsip) or
sip set debug on
(for chan_sip).

Then restart Zoiper and look at the Asterisk logs for REGISTER requests and any responses. Based on what you see we can debug further.

Ok, DMZ server-OFF,
SPI firewall=disabled,
FreePBX firewall=disabled

I ran iptables -L, I see Chain Forward and Output, but not Chain Input.
sip debugging returns command not found.

I attached asterisk logs below.

[2018-03-18 13:16:05] NOTICE[32133] chan_sip.c: Registration from ‘sip:test@mystaticip;user=phone’ failed for ‘mystaticip:55025’ - Wrong password
[2018-03-18 13:17:01] VERBOSE[32080] asterisk.c: Remote UNIX connection
[2018-03-18 13:17:01] VERBOSE[32679] asterisk.c: Remote UNIX connection disconnected
[2018-03-18 13:17:01] VERBOSE[32080] asterisk.c: Remote UNIX connection
[2018-03-18 13:17:01] VERBOSE[32681] asterisk.c: Remote UNIX connection disconnected
[2018-03-18 13:17:01] VERBOSE[32080] asterisk.c: Remote UNIX connection
[2018-03-18 13:17:01] VERBOSE[32683] asterisk.c: Remote UNIX connection disconnected
[2018-03-18 13:18:03] NOTICE[32133] chan_sip.c: Registration from ‘sip:[email protected];transport=UDP’ failed for ‘192.168.1.2:43115’ - Wrong password
[2018-03-18 13:27:01] VERBOSE[32133][C-00000000] netsock2.c: Using SIP RTP TOS bits 184
[2018-03-18 13:27:01] VERBOSE[32133][C-00000000] netsock2.c: Using SIP RTP CoS mark 5
[2018-03-18 13:27:01] VERBOSE[1106][C-00000000] pbx.c: Executing [0048825461168@from-sip-external:1] NoOp(“SIP/mystaticip-00000000”, “Received incoming SIP connection from unknown peer to 0048825461168”) in new stack
[2018-03-18 13:27:01] VERBOSE[1106][C-00000000] pbx.c: Executing [0048825461168@from-sip-external:2] Set(“SIP/mystaticip-00000000”, “DID=0048825461168”) in new stack
[2018-03-18 13:27:01] VERBOSE[1106][C-00000000] pbx.c: Executing [0048825461168@from-sip-external:3] Goto(“SIP/mystaticip-00000000”, “s,1”) in new stack
[2018-03-18 13:27:01] VERBOSE[1106][C-00000000] pbx_builtins.c: Goto (from-sip-external,s,1)
[2018-03-18 13:27:01] VERBOSE[1106][C-00000000] pbx.c: Executing [s@from-sip-external:1] GotoIf(“SIP/mystaticip-00000000”, “1?setlanguage:checkanon”) in new stack
[2018-03-18 13:27:01] VERBOSE[1106][C-00000000] pbx_builtins.c: Goto (from-sip-external,s,2)
[2018-03-18 13:27:01] VERBOSE[1106][C-00000000] pbx.c: Executing [s@from-sip-external:2] Set(“SIP/mystaticip-00000000”, “CHANNEL(language)=en”) in new stack
[2018-03-18 13:27:01] VERBOSE[1106][C-00000000] pbx.c: Executing [s@from-sip-external:3] GotoIf(“SIP/mystaticip-00000000”, “1?noanonymous”) in new stack
[2018-03-18 13:27:01] VERBOSE[1106][C-00000000] pbx_builtins.c: Goto (from-sip-external,s,5)
[2018-03-18 13:27:01] VERBOSE[1106][C-00000000] pbx.c: Executing [s@from-sip-external:5] Set(“SIP/mystaticip-00000000”, “TIMEOUT(absolute)=15”) in new stack
[2018-03-18 13:27:01] VERBOSE[1106][C-00000000] func_timeout.c: Channel will hangup at 2018-03-18 13:27:16.637 EDT.
[2018-03-18 13:27:01] VERBOSE[1106][C-00000000] pbx.c: Executing [s@from-sip-external:6] Log(“SIP/mystaticip-00000000”, “WARNING,“Rejecting unknown SIP connection from unknown-ip””) in new stack
[2018-03-18 13:27:01] WARNING[1106][C-00000000] Ext. s: “Rejecting unknown SIP connection from unknown-ip”
[2018-03-18 13:27:01] VERBOSE[1106][C-00000000] pbx.c: Executing [s@from-sip-external:7] Answer(“SIP/mystaticip-00000000”, “”) in new stack
[2018-03-18 13:27:01] VERBOSE[1106][C-00000000] pbx.c: Spawn extension (from-sip-external, s, 7) exited non-zero on ‘SIP/mystaticip-00000000’
[2018-03-18 13:27:01] VERBOSE[1106][C-00000000] pbx.c: Executing [h@from-sip-external:1] Hangup(“SIP/mystaticip-00000000”, “”) in new stack
[2018-03-18 13:27:01] VERBOSE[1106][C-00000000] pbx.c: Spawn extension (from-sip-external, h, 1) exited non-zero on ‘SIP/mystaticip-00000000’

Ok, I was able to get sip logging, below are the logs…

Packet timed out after 32001ms with no response
[2018-03-18 15:28:58] VERBOSE[32133] chan_sip.c:
<— SIP read from UDP:192.168.1.4:40929 —>
REGISTER sip:192.168.1.250;transport=UDP SIP/2.0
Via: SIP/2.0/UDP 192.168.1.4:40929;branch=z9hG4bK-524287-1—0bc38a2306df1e7c;rport
Max-Forwards: 70
Contact: sip:[email protected]:40929;rinstance=0dcf4560bce0eb26;transport=UDP
To: sip:[email protected];transport=UDP
From: sip:[email protected];transport=UDP;tag=848bf306
Call-ID: mUw7EB7KEe6ldBg6G7Yg1g…
CSeq: 1 REGISTER
Expires: 70
Allow: INVITE, ACK, CANCEL, BYE, NOTIFY, REFER, MESSAGE, OPTIONS, INFO, SUBSCRIBE
Supported: replaces, norefersub, extended-refer, timer, outbound, path, X-cisco-serviceuri
User-Agent: Zoiper rv2.8.70-mod
Allow-Events: presence, kpml, talk
Content-Length: 0

<------------->
[2018-03-18 15:28:58] VERBOSE[32133] chan_sip.c: — (14 headers 0 lines) —
[2018-03-18 15:28:58] VERBOSE[32133] chan_sip.c: Sending to 192.168.1.4:40929 (NAT)
[2018-03-18 15:28:58] VERBOSE[32133] chan_sip.c: Sending to 192.168.1.4:40929 (NAT)
[2018-03-18 15:28:58] VERBOSE[32133] chan_sip.c:
<— Transmitting (NAT) to 192.168.1.4:40929 —>
SIP/2.0 401 Unauthorized
Via: SIP/2.0/UDP 192.168.1.4:40929;branch=z9hG4bK-524287-1—0bc38a2306df1e7c;received=192.168.1.4;rport=40929
From: sip:[email protected];transport=UDP;tag=848bf306
To: sip:[email protected];transport=UDP;tag=as7f49f4ac
Call-ID: mUw7EB7KEe6ldBg6G7Yg1g…
CSeq: 1 REGISTER
Server: FPBX-14.0.1rc1.7(13.14.0)
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH, MESSAGE
Supported: replaces, timer
WWW-Authenticate: Digest algorithm=MD5, realm=“asterisk”, nonce=“1503cdc8”
Content-Length: 0

<------------>
[2018-03-18 15:28:58] VERBOSE[32133] chan_sip.c: Scheduling destruction of SIP dialog ‘mUw7EB7KEe6ldBg6G7Yg1g…’ in 32000 ms (Method: REGISTER)
[2018-03-18 15:28:58] VERBOSE[32133] chan_sip.c:
<— SIP read from UDP:192.168.1.4:40929 —>
REGISTER sip:192.168.1.250;transport=UDP SIP/2.0
Via: SIP/2.0/UDP 192.168.1.4:40929;branch=z9hG4bK-524287-1—0aa2af810a66663e;rport
Max-Forwards: 70
Contact: sip:[email protected]:40929;rinstance=0dcf4560bce0eb26;transport=UDP
To: sip:[email protected];transport=UDP
From: sip:[email protected];transport=UDP;tag=848bf306
Call-ID: mUw7EB7KEe6ldBg6G7Yg1g…
CSeq: 2 REGISTER
Expires: 70
Allow: INVITE, ACK, CANCEL, BYE, NOTIFY, REFER, MESSAGE, OPTIONS, INFO, SUBSCRIBE
Supported: replaces, norefersub, extended-refer, timer, outbound, path, X-cisco-serviceuri
User-Agent: Zoiper rv2.8.70-mod
Authorization: Digest username=“adamking”,realm=“asterisk”,nonce=“1503cdc8”,uri=“sip:192.168.1.250;transport=UDP”,response=“eb0827aacc0b48dcd04ce0e3c4eb0a52”,algorithm=MD5
Allow-Events: presence, kpml, talk
Content-Length: 0

<------------->
[2018-03-18 15:28:58] VERBOSE[32133] chan_sip.c: — (15 headers 0 lines) —
[2018-03-18 15:28:58] VERBOSE[32133] chan_sip.c: Sending to 192.168.1.4:40929 (NAT)
[2018-03-18 15:28:58] VERBOSE[32133] chan_sip.c:
<— Transmitting (NAT) to 192.168.1.4:40929 —>
SIP/2.0 403 Forbidden
Via: SIP/2.0/UDP 192.168.1.4:40929;branch=z9hG4bK-524287-1—0aa2af810a66663e;received=192.168.1.4;rport=40929
From: sip:[email protected];transport=UDP;tag=848bf306
To: sip:[email protected];transport=UDP;tag=as7f49f4ac
Call-ID: mUw7EB7KEe6ldBg6G7Yg1g…
CSeq: 2 REGISTER
Server: FPBX-14.0.1rc1.7(13.14.0)
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH, MESSAGE
Supported: replaces, timer
Content-Length: 0

<------------>
[2018-03-18 15:28:58] NOTICE[32133] chan_sip.c: Registration from ‘sip:[email protected];transport=UDP’ failed for ‘192.168.1.4:40929’ - Wrong password
[2018-03-18 15:28:58] VERBOSE[32133] chan_sip.c: Scheduling destruction of SIP dialog ‘mUw7EB7KEe6ldBg6G7Yg1g…’ in 32000 ms (Method: REGISTER)

In FreePBX, edit the extension in question. At the top of the screen, above the editing tabs (but below the menu buttons) you should see Extension: followed by the extension number (that you picked when you created the extension). In Zoiper account settings, in the SIP Credentials section, that extension number goes in the Username field. Copy what FreePBX shows for Secret for the extension and paste that into the Password field in Zoiper. Save settings, test and report results.

That did it. I can’t thank you enough. I have no idea why I have been using the name instead of the number. Thank you again!

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.