Connecting Digium D40 phone to DPMA on a remote server


#1

I have a server housed at our main office. A satellite office 20 miles away has several D40 phones. I can connect the phones by adding a SIP account, but I can not get the phones to fetch a list of available extensions from my DPMA module.

Do I need to add a network entry in the DPMA module for that satellite location?


(Scott Griepentrog) #2

You should be able to use the menu 2 option on the boot menu of the phone to put in the IP address of the server (or the WAN IP that is port forwarded to it) and then get the available extension list and configure the phone. If the network entry was missing or wrong, it would only prevent phone functions like voicemail from working after it’s been configured.


#3

I have been trying that but can’t get it to fetch a list.

On boot I select settings>Digium Server Configuration.
Enter the WAN IP of the server
Enter the port

The phone constantly flashes back and forth “Contacting SIP Proxy@ip.ip.ip.ip:port” and “fetching user list from SIP proxy@ip.ip.ip.ip:port”. It will flash both those messages rapidly within a second and will do so for several minutes. But it never presents a user list.


(Scott Griepentrog) #4

What version of DPMA are you using? If it’s 2.3, do you have (or can add) an entry in /etc/asterisk/logger.conf to send the dpma log to a file (such as “dpma => dpma”) and then grab the contents of the log for when you’re having that problem?

I’d also recommend trying an alternate port (i.e. not 5060) as a means of possibly getting around any SIP ALG that could be interfering with the DPMA communication. You’d have to add an extra port to asterisk, or port forward the extra port on the nat if applicable.


#5

I am using DPMA version 2.1.1

I have tried forwarding port 5566 on my router and changing the mDNS Discovery Port under general settings in DPMA to 5566. Still can’t get the phone to contact the server. But now the phone just stays on “contacting SIP:proxy@ip.ip.ip.ip:5566”. It does not flash the “fetching user list…” message.

Does anything need to be added to the External Lines section in DPMA?


(Scott Griepentrog) #6

The network and external lines sections control elements of the configuration sent to the phone, but would not prevent you from initially connecting a phone to the server to get that configuration.

When the phone is “contacting proxy”, what’s it’s really doing is sending a SIP “MESSAGE” dialog to the server. Nominally this is on port 5060, and it’s using UDP. So it should be able to connect to the server in the same way that the phone can send a SIP REGISTER dialog and get logged in.

You can use conventional SIP debugging tools such as wireshark to try to see where it’s going wrong. There should be a MESSAGE from the phone to the server, followed by a 200 OK from the server to the phone, then a SIP MESSAGE from the server to the phone, and the phone responds with 200 OK, etc. back and forth like that.

Also, I’d recommend upgrading to 2.3 as there has been some significant improvements, including necessary fixes for support of firmware 2.0 and later on the phones. The 2.3 version also creates a separate logging channel, and improved diagnostic messages, that can help identify the problem. An upgrade of the phone firmware may also help, especially if it’s prior to 1.4.2. Make sure you don’t use 2.0 or later firmware with DPMA prior to 2.3 however.


#7

Now I’m really confused on what version I have. In the DPMA module it shows 2.1.1

but in my module admin it shows 2.11.3.

And looking at the information on the wiki, it only shows up to version 2.11.2.1

Are DPMA updates not pushed to my FreePBX module admin?


(Scott Griepentrog) #8

I can understand the confusion.

There are two pieces of code involved:

  1. The DPMA (aka Digium Phone Module for Asterisk) which is a compiled object module (res_digium_phone.so) that can be loaded into Asterisk to provide auto configuration of Digium phones. It is configured through res_digium_phone.conf.
  2. The “Digium Phones” module which is a PHP module for FreePBX, and provides a web interface tied-in to FreePBX that configures the DPMA.

The FreePBX module “Digum Phones” is auto updated along with the other PHP modules through the module administration.

The DPMA module binary has to be updated separately, usually through the command line. I don’t think FreePBX provides a web interface that allows you to do ‘yum update’ commands.

Depending on your version of FreePBX, you may be able to do a “yum update asteriskres_digium_phone” on the linux CLI to get a newer version installed.

However, while it might aid in diagnosing the problem, I honestly don’t think it’s going to solve it. Even in the 2.1.1 version you should have absolutely no problem getting the phone to connect across any network, provided that there is nothing interfering with the UDP SIP packets along the way.

Inothewords, if the phone can connect just fine on the local network, then there is no configuration change in DPMA that could be preventing it from working from any other network. There could be however:

  1. Firewall setting on the FreePBX server that denies UDP traffic from remote or specific IP addresses.
  2. Firewall on a NAT router blocking
  3. SIP ALG somewhere in the network

I recommend using wireshark or similar tools at both ends to see what packets are not getting through, and then track down why. I’d be very curious what would allow a SIP REGISTER through, but not a SIP MESSAGE.


#9

Thanks for all your help on this. I have tried (to the best of my ability) to check these things and am still having problems. I downloaded and attempted to understand wireshark, but I think it is over my head. I watched the logs on both connections while the phone was trying to configure and never saw anything that looked related. I also tried looking for “SIP Flows” but nothing was recorded.

I did confirm that SIP ALG has been disabled. It actually was enabled on the network my phone was on. After disabling the phone no longer bounced back and forth between “Contacting…” and “fetching user list…”

I turned off the router firewall on both the server and phone network, still didn’t work.

I have the Phone network IP whitelisted in my system admin intrusion detection.

I am getting the following in me Asterisk CLI log when the phone tries to connect. 192.168.1.133 is the local IP of the phone on the outside network.

[2016-03-16 10:10:22] NOTICE[2113]: phone_message.c:1228 prune_inactive: Pruning unauthenticated session for device at 'sip:192.168.1.133:5060;ob' due to inactivity.
[2016-03-16 10:10:22] NOTICE[2113]: phone_message.c:1228 prune_inactive: Pruning unauthenticated session for device at 'sip:192.168.1.133:5060;ob' due to inactivity.
[2016-03-16 10:10:22] NOTICE[2113]: phone_message.c:1228 prune_inactive: Pruning unauthenticated session for device at 'sip:192.168.1.133:5060;ob' due to inactivity.
[2016-03-16 10:10:22] NOTICE[2113]: phone_message.c:1228 prune_inactive: Pruning unauthenticated session for device at 'sip:192.168.1.133:5060;ob' due to inactivity.
[2016-03-16 10:10:22] NOTICE[2113]: phone_message.c:1228 prune_inactive: Pruning unauthenticated session for device at 'sip:192.168.1.133:5060;ob' due to inactivity.
[2016-03-16 10:10:22] NOTICE[2113]: phone_message.c:1228 prune_inactive: Pruning unauthenticated session for device at 'sip:192.168.1.133:5060;ob' due to inactivity.
[2016-03-16 10:10:22] NOTICE[2113]: phone_message.c:1228 prune_inactive: Pruning unauthenticated session for device at 'sip:192.168.1.133:5060;ob' due to inactivity.
[2016-03-16 10:10:22] NOTICE[2113]: phone_message.c:1228 prune_inactive: Pruning unauthenticated session for device at 'sip:192.168.1.133:5060;ob' due to inactivity.
[2016-03-16 10:10:22] NOTICE[2113]: phone_message.c:1228 prune_inactive: Pruning unauthenticated session for device at 'sip:192.168.1.133:5060;ob' due to inactivity.
[2016-03-16 10:10:37] NOTICE[2113]: phone_message.c:1228 prune_inactive: Pruning unauthenticated session for device at 'sip:192.168.1.133:5060;ob' due to inactivity.
[2016-03-16 10:10:37] NOTICE[2113]: phone_message.c:1228 prune_inactive: Pruning unauthenticated session for device at 'sip:192.168.1.133:5060;ob' due to inactivity.
[2016-03-16 10:10:37] NOTICE[2113]: phone_message.c:1228 prune_inactive: Pruning unauthenticated session for device at 'sip:192.168.1.133:5060;ob' due to inactivity.
[2016-03-16 10:10:37] NOTICE[2113]: phone_message.c:1228 prune_inactive: Pruning unauthenticated session for device at 'sip:192.168.1.133:5060;ob' due to inactivity.
[2016-03-16 10:10:37] NOTICE[2113]: phone_message.c:1228 prune_inactive: Pruning unauthenticated session for device at 'sip:192.168.1.133:5060;ob' due to inactivity.
[2016-03-16 10:10:37] NOTICE[2113]: phone_message.c:1228 prune_inactive: Pruning unauthenticated session for device at 'sip:192.168.1.133:5060;ob' due to inactivity.
[2016-03-16 10:10:37] NOTICE[2113]: phone_message.c:1228 prune_inactive: Pruning unauthenticated session for device at 'sip:192.168.1.133:5060;ob' due to inactivity.
[2016-03-16 10:10:37] NOTICE[2113]: phone_message.c:1228 prune_inactive: Pruning unauthenticated session for device at 'sip:192.168.1.133:5060;ob' due to inactivity.
[2016-03-16 10:10:37] NOTICE[2113]: phone_message.c:1228 prune_inactive: Pruning unauthenticated session for device at 'sip:192.168.1.133:5060;ob' due to inactivity.

As far as updating DPMA, I figured that may be the best bet in order to see those logs. But even after following the commands in the README file on the DPMA download it still didn’t update.

I really appreciate all the help. Some of this stuff is over my head, but I enjoy learning it.


(Scott Griepentrog) #10

I’m afraid I may not be able to give much more in the way of pointers to resolving the problem - I would recommend consulting a network expert that is familiar with wireshark to help you. Access to both locations would be needed to identify where the packets are getting lost or mangled. If you wanted to try it yourself, there are some good youtube videos on how to capture SIP with wireshark.

SIP ALG btw can be at any point in either network or inbetween. The ISP on either end may have it active on their own network, which is where switching to a uncommon port may work to avoid it.

The prune inactive messages just describe a normal connection timeout, where a particular phone hasn’t sent any requests for a period of time. This doesn’t affect the ability of the phone to make further requests later without issue. You can ignore it.

If you wanted to upgrade DPMA you can download it from http://downloads.digium.com/pub/telephony/res_digium_phone/ (make sure to select the correct Asterisk version and bit-ness) and manually install it. Instructions here: https://wiki.asterisk.org/wiki/display/DIGIUM/DPMA+Installation.


#11

Thanks for your help. I’ll try to get DPMA updated and try to learn more about Wireshark.


#12

I was able to get DPMA upgraded to 2.3. I’m trying to add an entry to send the DPMA to a log file. Pardon my ignorance, but is it just a matter of adding “dpma => dpma” to logger.conf? If so, where can I find the output of the log?


#13

Because of

head -5 /etc/asterisk/logger.conf

in general for creating extra log files, from bash do:-

echo “dpma => dpma” >> /etc/asterisk/logger_logfiles_custom.conf
rasterisk -x ‘logger reload’

and to watch it:-

tailf /var/log/asterisk/dpma


#14

Thank you for the help.

I ran the log, tried to configure the phone, and just got this log output

[2016-03-16 13:47:29] Asterisk 11.21.2 built by root @ jenkins-builder1.schmoozecom.net on a x86_64 running Linux on 2016-02-11 22:14:18 UTC
[2016-03-16 13:47:30] DPMA[6509] res_digium_phone.c: Host-ID: be:4d:42:75:49:c0:43:cf:39:43:5d:48:5d:cc:ff:38:3a:1d:6b:8e
[2016-03-16 13:47:30] DPMA[6509] res_digium_phone.c: Found license 'DPMA-xxxxxxxxxxxxxxx' 
[2016-03-16 13:47:30] DPMA[6509] res_digium_phone.c: Found license 'DPMA-xxxxxxxxxxxxxx1' 
[2016-03-16 13:47:30] DPMA[6509] res_digium_phone.c: Found total of 2 DPMA licenses
[2016-03-16 13:47:30] DPMA[6509] res_digium_phone.c: Could not load firmware package config file /var/www/html/digium_phones/digium_phones_firmware.conf
[2016-03-16 13:48:51] DPMA[2214] phone_message.c: Pruning unauthenticated session for device at 'sip:192.168.1.133:5060;ob' due to inactivity.

#15

I was thinking, there has to be some kind of a security mechanism in FreePBX or DPMA that allows the external phones to fetch a user list. Otherwise, anyone that knows my PBX WAN IP could connect any Digium phone to my system from anywhere by just entering the WAN IP, fetching the user list, and selecting a user. Correct?

I have researched Wireshark and feel that I am using it correctly, but it does not show any SIP traffic on any network.


(Kombi1) #16

Dear Scott,
I am trying to do the same thing and it all works, config loads and extensions are found. Just, other than when the phone is at the office, no calls can be made. A sip softphone on the same connection works, so no firewall issues.

/var/log/asterisk/dpma says “phone_request.c: No auth credentials found in phone msg”. Would you have an Idea where to look?

Cheers,
Konrad


(Scott Griepentrog) #17

Based on that message, I’d recommend consulting with Digium support. Something apparently went wrong with the message from the Digium phone to the DPMA module.