Forum Index

 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Using different items on different phone lines

 
Post new topic   Reply to topic     Forum Index -> Phlink scripters
View previous topic :: View next topic  
Author Message
Alberto
Site Admin


Joined: 06 Feb 2004
Posts: 1412
Location: Torino, Italy

PostPosted: Sun Jul 25, 2004 2:10 am    Post subject: Using different items on different phone lines Reply with quote

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
View user's profile Send private message
soko



Joined: 30 Dec 2005
Posts: 39
Location: Perth, WA, Australia

PostPosted: Thu Oct 26, 2006 8:07 pm    Post subject: manage 2 lines Reply with quote

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
View user's profile Send private message
Matteo
Site Admin


Joined: 04 Mar 2004
Posts: 128
Location: Torino, Italy

PostPosted: Sat Oct 28, 2006 4:20 am    Post subject: Reply with quote

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
View user's profile Send private message
jonct



Joined: 19 Jul 2004
Posts: 298

PostPosted: Thu Nov 02, 2006 7:36 am    Post subject: Reply with quote

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
View user's profile Send private message
Alberto
Site Admin


Joined: 06 Feb 2004
Posts: 1412
Location: Torino, Italy

PostPosted: Thu Nov 02, 2006 11:14 am    Post subject: Reply with quote

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
View user's profile Send private message
torqt



Joined: 10 Oct 2005
Posts: 24
Location: USA

PostPosted: Fri Dec 22, 2006 8:07 pm    Post subject: Reply with quote

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
View user's profile Send private message Visit poster's website
captcurrent



Joined: 29 Nov 2005
Posts: 68

PostPosted: Mon Jan 12, 2009 11:25 am    Post subject: script Reply with quote

which one to you need?
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic     Forum Index -> Phlink scripters All times are GMT - 8 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


This forum is intended for allowing the community of people interested in Ovolab products to share their ideas and suggestions. Customer support inquiries should be directed to our support email address.
The moderators reserve the right to remove any messages deemed inappropriate, at any time, for any reason.
Powered by phpBB © 2001-2008 phpBB Group