powershell:将 phone 个号码启动到默认 voip 程序

powershell: launching phone numbers to default voip program

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

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

我在 link 标签上正确显示了号码。

我的问题是如何让 link 拨号到机器上的默认 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: 和许多其他)很流行。您必须参考软电话文档 and/or 查看相关的注册表项。

其他选项是 TAPI,但我想现在除了 company-wide 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

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