Come chiamare da Snow Leopard usando un centralino SIP... · Sep 22, 10:32 AM
Ecco come fare per telefonare con Snow Leopard via SIP:
0. X-Lite non funziona per ora con Snow Leopard! Pertanto…
1. Installare iSoftPhone da http://www.call4mac.com/isoftphone/download.html e configurare il provider SIP, login, account.
2. Mettere lo script allegato in: ~/Library/Address Book Plugin
3. Aprire Address Book e fare click col BOTTONE di SINISTRA sull’etichetta (ufficio, etc.), selezionare e chiamare.
In alternativa installare Telephone (spartano) http://code.google.com/p/telephone/ e modificare lo script di conseguenza nelle ultime righe, sostituendo “iSoftPhone” con “telephone”.
Funziona!
using terms from application "Address Book"
(* Lo script funziona con il centralino che prevede il prefisso 0 di uscita *)
on should enable action for aPerson with phoneNumber
return true
end should enable action
on action property
return "phone"
end action property
on adatta(phoneNumber)
set StrPrefisso to "0"
set StrToDial to value of phoneNumber as string
if StrToDial contains "+39" then
(* numero italiano con +39: lo tolgo*)
set StrToDial to StrPrefisso & (characters 4 through -1 of StrToDial)
else if StrToDial contains "+" then
(* numero straniero es. +41 1234567 a cui togliere il + e aggiungere 00 *)
set StrToDial to StrPrefisso & "00" & (characters 2 through -1 of StrToDial)
else
(* numero italiano senza + *)
set StrToDial to StrPrefisso & StrToDial
end if
return StrToDial
end adatta
on action title for aPerson with phoneNumber
return ("iSoftPhone - Chiama il n. " & adatta(phoneNumber))
end action title
on perform action for aPerson with phoneNumber
set StrToDial to adatta(phoneNumber) as string
with timeout of 30 seconds
tell application "iSoftPhone"
activate
dial StrToDial
end tell
end timeout
end perform action
end using terms from
— marco