Skip to content

Instantly share code, notes, and snippets.

@dcode
Created November 30, 2021 15:23
  • Star 13 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Save dcode/b6f201a5ef2dbc722e4389cfa8f81efb to your computer and use it in GitHub Desktop.
How to setup a Grandstream phone as a device on UniFi Talk

How to setup Grandstream DP750 for Unifi Talk

I've seen several posts on Reddit and other forums that say "oh you can use a grandstream phone with UniFi Talk and it's flawless". Unfortunately, I am not a VoIP engineer so it was not intuitive to me, but I got it to work. Here's how.

For this writeup, I'm using a Grandstream DP750 DECT base with a DP720 DECT wireless handset. I really wanted a wireless phone for general use in my house, but Ubiquiti doesn't make one, so I wanted to find a way. My goal is to setup UniFi Talk for my home phone solution and share a single phone number with a UniFi wired phone that sits on my office desk. As far as I know, you have to get a UniFi phone to do the initial Talk setup (though, in my tinkering, I noticed it's using a PostgreSQL database, you could probably bypass the initial setup if you knew what you were doing). I'm also using a UDM-Pro for my gateway.

Assuming your UDM-Pro management interface is on 192.168.1.1, your base station should be assigned an IP on a VLAN that can access that endpoint. UniFi Talk (which is running FreeSWITCH) is listening only on that IP on TCP and UDP port 5060. There's also an external port for communicating with UniFi's VoIP provider of choice.

root@ubnt:/# netstat -plantu | grep freeswitch | grep -v ESTAB
tcp        0      0 192.168.1.1:5060        0.0.0.0:*               LISTEN      8212/freeswitch
tcp        0      0 192.168.1.1:5066        0.0.0.0:*               LISTEN      8212/freeswitch
tcp        0      0 X.X.X.X:59411           0.0.0.0:*               LISTEN      8212/freeswitch
tcp        0      0 127.0.0.1:8021          0.0.0.0:*               LISTEN      8212/freeswitch
tcp        0      0 192.168.1.1:7448        0.0.0.0:*               LISTEN      8212/freeswitch
udp        0      0 192.168.1.1:5060        0.0.0.0:*                           8212/freeswitch
udp        0      0 X.X.X.X:59411           0.0.0.0:*                           8212/freeswitch

Configuring Talk

Depending on how you want to manage your devices, you need to make sure you have a user for each device. This creates an extension. In my setup, I want my devices to have unique extensions, but share an external phone number. To do this, I assigned my Talk service number to a group, then put my UniFi phone extension and my new "Cordless Phone" user extension into the same group.

image

Last thing in the Talk web UI, we need to know which extension is assigned to the "Cordless Phone" account. Go to the account overview, and you'll see it shown there.

image

Several posts suggested that the SIP password for this account was actually listed on the "Manage" page of the account, but Ubiquiti must have removed that, as it is no longer there when I looked. To get the password, you'll have to SSH into the UDM-Pro. You can get that info from the main UDM-Pro settings page. Enable "SSH" and set a password using the button below the toggle.

image

You'll SSH in as root, using the password you just configured. Then we'll enter the UniFi-OS shell. Lastly, we'll enter a command to retrieve the SIP password for the phone account. Where I've entered 0003, you'll enter the extension for your account.

>_ ssh root@192.168.1.1
Welcome to UbiOS

By logging in, accessing, or using the Ubiquiti product, you
acknowledge that you have read and understood the Ubiquiti
License Agreement and agree to be bound by its terms.

root@192.168.1.1's password:
  ___ ___      .__________.__
 |   |   |____ |__\_  ____/__|
 |   |   /    \|  ||  __) |  |   (c) 2010-2021
 |   |  |   |  \  ||  \   |  |   Ubiquiti Inc.
 |______|___|  /__||__/   |__|
            |_/                  http://www.ui.com

      Welcome to UniFi Dream Machine!
# unifi-os shell
root@ubnt:/# fs_cli -x "user_data 0003@talk.com param password"
wM2B46sacGb4

Don't worry, that's not my actual password. Now we have all the info we need to configure the Grandstream device.

Configuring the Grandstream device

You'll log into the Grandstream device by browsing to the IP and logging in with the your credentials (default are admin/, where is a password on the bottom of the device). Across the top, go to "Profiles" -> "Profile 1" -> "General Settings". Here we'll configure a name for this profile and configure where the SIP server is. This will be your UDM-Pro management IP. I'm assuming the default of 192.168.1.1 here.

image

One last step, is to configure the SIP authentication. Go to "DECT" -> "SIP Account Settings" and configure "Account 1" with the numeric extension as the User ID and the password you retrieved earlier. You can give it a friendly name here that will show up on the screen of your phone. Once you've done that, click "Save and Apply".

image

If everything worked correctly (and I didn't skip a step in this documentation), after a few seconds you'll get green status indicators on the main "Status" page.

image

@mdjhnson
Copy link

I keep getting a "User Unknown" error on my Grandstream handset when accessing the voicemail. I can make and receive calls but I can't access the voicemail. Is there another setting?

@GarrisonGit
Copy link

I have setup phone so that it is able to dial out but for some reason when calling that number the phone does not ring or can not be called. Am I missing something. WP820 again can call any extensions and external numbers but when calling back it does not ring phone how do I assign the phone to a user?

@aldridgepk
Copy link

aldridgepk commented Aug 25, 2022 via email

@GarrisonGit
Copy link

Yeah I have done that. The phone works on outgoing calls and internal calls but it cannot be called. The phone does not ring?
Like how does the device "listen"? It does not seem to do anything when that number is called. Again all out going is fine.

@aldridgepk
Copy link

aldridgepk commented Aug 25, 2022 via email

@GarrisonGit
Copy link

No not stupid questions any help is appreciated. Again it is working. I did all the setup as above. However phone does not ring. It like the call is coming in but not engaging the phone or the phone is not connected to SIP server for incoming calls but does correctly for outgoing calls. I am thinking there is a setting some where that is not forwarding the call to the SIP phone.?? I have no idea. I thought if its working for outgoing it should be working for incoming?

@GarrisonGit
Copy link

Nevermind it just randomly started working????? Lets hope it stays working.

@aldridgepk
Copy link

aldridgepk commented Aug 25, 2022 via email

@aldridgepk
Copy link

aldridgepk commented Aug 25, 2022 via email

@katzman2021
Copy link

I'm not sure how or why, but I get no audio with my calls. All the settings are correct, the phone and base are working. This inbound and outbound calls. Kinda stumped

I'm using a Grandstream DP752 DECT base with a DP720 DECT wireless handset. Firmware 1.0.17.8

@nboskovic13
Copy link

Looks like that the latest update from Ubiquiti not allow anymore to use cordless phones/accounts created on this way without association of the Ubiquiti phone :(
When you try to dial direct extension of the cordless phone or even the group extension where that cordless account is the member of will give you the message that user is not reachable.

@kwilsonmg
Copy link

@dcode did this stop working for you? Curious what options are out there nowadays.

@alexsobiek
Copy link

alexsobiek commented Nov 28, 2023

It seems as if Ubiquiti has figured out a way to block calls to/from extensions that are not assigned to a Ubiquiti phone. If anyone has more info on this, please share but as of now, this no longer works.

I have found that if you assign an extension to a Ubiquiti phone, then connect your 3rd party phone, there's a chance it'll work temporarily. Each SIP registration has a TTL, so by registering the 3rd party phone AFTER you assign the extension to the Ubiquiti phone, you'll find yourself in the middle of the Ubiquiti's phone TTL until that expries and it re-registers itself.

Edit: this seems to only be an issue for incoming calls. It appears you can make as many outgoing calls to other extensions as you want from the 3rd party phone.

@hopfi2k
Copy link

hopfi2k commented Jan 27, 2024

Has anyone found already a way to continue using 3rd party phone with talk?

@dcode
Copy link
Author

dcode commented Jan 27, 2024 via email

@hopfi2k
Copy link

hopfi2k commented Jan 27, 2024

Thanks for insight, @dcode.

What I managed to test today is:

  • setup a user in Talk
  • get the user password in the UDM shell via ssh (e.g. fs_cli -x "user_data 0001@talk.com param password")
  • use this username/pass for a third party phone
  • assign a cdm touch phone to the same user in Talk

This works, both phones are can do in-/outgoing calls and both will ring in parallel on incoming calls (obviously). While not being an "elegant" solution, it works.

Looking forward for your finds when fiddling around with FreeSWITCH ;-)

@Mike-Blackwell
Copy link

@hopfi2k, I'm a little slow on the update could you clarify the following:

  1. use this username/pass for a third-party phone. I'm assuming your mean Username is the setup a user extension number? Also to use these within the third-party app?
  2. assign a cdm touch phone to the same user in Talk. What are you inferring via cdm, I currently only have two devices, one is an ATA and the other is a UTP-Touch. I'm assuming that whatever this said device is assigned to the new user extension. In other posts I see that once on gets the password for the extension that they delete it, IMHO it's a visual reminder that a 3rd party device in my case it's a YeaLink W60B.

@Mike-Blackwell
Copy link

Mike-Blackwell commented Feb 11, 2024

@aldridgepk how did you "I have mine assigned to a group. The group is set to ring two phones, one
UI Touch and the Grandstream."?

@tintinsp
Copy link

Hi
I added a Yealink to Unifi Talk and it works well, between extensions, outgoing calls, however when adding it to a GROUP it does not ring for incoming calls to the group. Does anyone have any recommendations? tks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment