powershellvoipdialing

powershell: launching phone numbers to default voip program


I am writing a program that pulls multiple client details from get-aduser

one property i grab is get-aduser.phonenumber

I am displaying the number correctly to a link label.

my question is how do i get the link to dial to the default voip program on the machine.

  $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???????
}

any help would greatly be appreciated.


Solution

  • I doubt if anything can be called "default voip program", but using protocol handler mechanism (tel:, callto:, sip: and many others) is popular. You have to refer to softphone documentation and/or look at related registry entries.

    Other option is TAPI, but I guess it is less popular these days except for company-wide PABX systems.

    Some applications have custom interfaces (Skype: text protocol, WM_COPYDATA).