| View previous topic :: View next topic |
| Author |
Message |
Alberto Site Admin
Joined: 06 Feb 2004 Posts: 1412 Location: Torino, Italy
|
Posted: Sun Jul 25, 2004 2:10 am Post subject: Using different items on different phone lines |
|
|
If you have a multi-line Phlink setup, and you want to greet callers in different ways based on the phone line that the call is coming from, you can use the "location" property of the "terminal" class. That property basically identifies the USB port into which each telephone adapter is connected. Here is how to use it.
First, run this script from within Script Editor:
| Quote: | tell application "Ovolab Phlink"
location of terminal 1
end tell |
You will get, as a result, the location ID for line #1. Now, modify the script to ask for terminal 2, and run it again. You will get the location ID for line #2. Repeat this for every telephone adapter you have connected, and take note of these numbers.
Now, you will want to use different greetings based on such line ID. To access the line ID from a script, you should use the following syntax:
| Quote: | | location of terminal 1 of the_call |
For example, you could use the following "greeting" script:
| Quote: | on do_action given call:the_call
tell application "Ovolab Phlink"
-- Play the appropriate greeting
if the location of terminal 1 of the_call is 1234567 then
set my_greeting to ((the items folder as text) & "greeting-line-1.mp3")
else
set my_greeting to ((the items folder as text) & "greeting-line-2.mp3")
end if
tell the_call to play (my_greeting as alias)
end tell
end do_action |
If, instead, you wish to use totally distinct items folders for the two lines, you can create subfolders named "line 1" and "line 2" (and so on) inside your Phlink Items folder, and then use the following script as your "enter.scpt" for the main Phlink Items folder:
| Quote: | on do_action given call:the_call
tell application "Ovolab Phlink"
-- Jump to the appropriate subfolder
if the location of terminal 1 of the_call is 1234567 then
set my_subfolder to ((the items folder as text) & "line 1")
else
set my_subfolder to ((the items folder as text) & "line 2")
end if
tell the_call to go to (my_subfolder as alias) with greeting
end tell
end do_action |
-------------------------
[This script was automatically tagged for color coded syntax by Convert Script to Markup Code] |
|
| Back to top |
|
 |
soko
Joined: 30 Dec 2005 Posts: 39 Location: Perth, WA, Australia
|
Posted: Thu Oct 26, 2006 8:07 pm Post subject: manage 2 lines |
|
|
I got it working half way. the lines are recognised correctly and phlink jumpes to the correct subfolder. But then it doesn't execute the ring script but instead jumpes straight to the greeting. How can I have it running the ring script located in the subfolder. I need to different ring scripts for the 2 lines.
thanks for help
soko |
|
| Back to top |
|
 |
Matteo Site Admin
Joined: 04 Mar 2004 Posts: 128 Location: Torino, Italy
|
Posted: Sat Oct 28, 2006 4:20 am Post subject: |
|
|
Soko,
Please remember that the ring script is executed only when a call appears on the phone line, so if you have placed your ring script in a subfolder that is accessed by Phlink after answering the call, the ring.scpt won't be triggered.
Depending on what you need to do you may need to move or just rename your ring.scpt.
You may find helpful to take a look at the following link where you'll find a document describing all the hooks available, with information on when they are executed.
http://www.ovolab.com/phlink/resources.php#res11
Hope this helps, _________________ Matteo |
|
| Back to top |
|
 |
jonct
Joined: 19 Jul 2004 Posts: 298
|
Posted: Thu Nov 02, 2006 7:36 am Post subject: |
|
|
| Didn't we determine in this thread that this approach would work as a begin.scpt before one of the ring.scpts is chosen? |
|
| Back to top |
|
 |
Alberto Site Admin
Joined: 06 Feb 2004 Posts: 1412 Location: Torino, Italy
|
Posted: Thu Nov 02, 2006 11:14 am Post subject: |
|
|
| jonct wrote: | | Didn't we determine in this thread that this approach would work as a begin.scpt before one of the ring.scpts is chosen? |
Yes, that's correct. With Phlink 3, it's the best approach in fact.
Alberto. |
|
| Back to top |
|
 |
torqt
Joined: 10 Oct 2005 Posts: 24 Location: USA
|
Posted: Fri Dec 22, 2006 8:07 pm Post subject: |
|
|
I'm interested in having different greetings play when one of my two phone lines is called. In searching the scripts available under the resources page. I couldn't find a link to download the Multiline script.
There is a memo about the script but no link to download it.
Please let me know where I can download it.
Thanks,
Daniel |
|
| Back to top |
|
 |
captcurrent
Joined: 29 Nov 2005 Posts: 68
|
Posted: Mon Jan 12, 2009 11:25 am Post subject: script |
|
|
| which one to you need? |
|
| Back to top |
|
 |
|