powershell:将电话号码启动到默认voip程序

问题描述

我正在编写一个从get-aduser中提取多个客户端详细信息的程序

我抢到的一个属性是get-aduser.phonenumber

我在链接标签上正确显示了数字。

我的问题是我如何获得链接以拨号到计算机上的认voip程序。

  $ADUser = get-aduser $user -properties *
$script:PhoneNumber= $ADuser.PhoneNumber 
$PhoneLabel = New-Object System.Windows.Forms.LinkLabel
$PhoneLabel.Location = New-Object System.Drawing.Size(795,100)
$PhoneLabel.Size = New-Object System.Drawing.Size(300,20)
$PhoneLabel.LinkColor = "Blue"
$PhoneLabel.ActiveLinkColor = "RED"
$PhoneLabel.Text = ''
$Form.Controls.Add($PhoneLabel)

$PhoneLabel.text = $script:PhoneNumber
$PhoneLabel.add_Click({DialPhone})

function DialPhone
{
 # and im totaly lost at this point???????
}

任何帮助将不胜感激。

解决方法

我怀疑是否可以将任何东西称为“默认voip程序”,但是使用协议处理程序机制(tel:,callto:,sip:等)很流行。您必须参考软件电话文档和/或查看相关的注册表项。

其他选项是TAPI,但我想现在除公司范围的PABX系统外,它不那么受欢迎。

某些应用程序具有自定义界面(Skype:文本协议,WM_COPYDATA)。

,

您看过MicroSIP软电话吗?那也许可以做到这一点。

Command line
Call a number: microsip.exe number
Hang up all calls: microsip.exe /hangupall
Answer a call: microsip.exe /answer
Start minimized: microsip.exe /minimized
Exit: microsip.exe /exit

我不确定这是否会对您有所帮助。