Jeff Davies Posted December 12, 2022 Report Posted December 12, 2022 Hi guys, We have recently been moved to a Tenant on a Vodia PBX with Vonex (Australia). We have written a .Net desktop application that users run on their computers, that allows them to dial their Yealink desk phone from the PC, by sending commands directly to their handset. We would like to be able to use LDAP or similar to query the PBX for information such as a list of users and their numbers, Address book entries and ideally, the local/internal IP of the handset registered to the account. Is anyone able to give us any information that might steer us in the direction of doing this please. Examples in VB.Net or C# would be fantastic. Thank you. Regards, Jeff Davies. Quote
mskenderian Posted December 12, 2022 Report Posted December 12, 2022 Have you seen the api docs? not sure if it has ldap related info. Quote
Jeff Davies Posted December 12, 2022 Author Report Posted December 12, 2022 Not really. I am aware that there is an API but haven't found the info. Do you have a link to them please? Thanks. Quote
mskenderian Posted December 13, 2022 Report Posted December 13, 2022 https://api.vodia.com/ its missing a lot of info, has not been updated in a while, but it will help while developing. also WireShark is your friend. Quote
Jeff Davies Posted December 13, 2022 Author Report Posted December 13, 2022 Thanks mskenderian. That will be a good start. Quote
Vodia PBX Posted December 21, 2022 Report Posted December 21, 2022 I would also stay away from LDAP. It is just a very limited protocol, compared to REST. I would less use Wireshark and more the Inspector of the we browser of your choice, where you can see how the browser pulls the information from the PBX. Usually its easier to understand than even the best API documentation if you are familiar with JSON and the REST idea. Quote
Jeff Davies Posted December 21, 2022 Author Report Posted December 21, 2022 Thanks Mr Vodia PBX. In case anyone else is interested, we did get LDAP going in a .Net Desktop app, based off the Powershell script below. We can get a list of Names (cn), Numbers(telephoneNumber) and Company with this. (Probably more.) We will look at extending functionality with the REST Api down the track. Thanks for your input. # Needs reference to .NET assembly used in the script. Add-Type -AssemblyName System.DirectoryServices.Protocols $username = '<YourPBXsURL.comcom\AccountNo>' $pwd = '<AccountsLDAPPasswprd>' $server = "<YourPBXsURL.comcom>" $port = "<YourPBXsLDAPPort" #Normally 389 $password = $pwd | ConvertTo-SecureString -asPlainText -Force # Top Level OU under which users are located $ldapSearchBase = "ou=people" # Filter to find the user we are connecting with $ldapSearchFilter = "(&(objectClass=*))" # Username and Password $ldapCredentials = New-Object System.Net.NetworkCredential($username,$password) # Create a Connection $ldapConnection = New-Object System.DirectoryServices.Protocols.LDAPConnection("$($server):$($port)",$ldapCredentials,"Basic") # Connect and Search $ldapTimeOut = new-timespan -Seconds 30 $ldapRequest = New-Object System.DirectoryServices.Protocols.SearchRequest($ldapSearchBase, $ldapSearchFilter, "OneLevel", $null) $ldapResponse = $ldapConnection.SendRequest($ldapRequest, $ldapTimeOut) $ldapResponse.Entries[0].Attributes Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.