Jump to content
Tom Wellige

function IsCallTransferred

Recommended Posts

This post is taken from the Swyx Forum Archive (2007-2014) and was originally posted 12.08.2010 by me

 

This function returns True if the current call was transferred by another user to the script user, and is not a direct call to the script user.

Is uses the PBXScript.PreviousScripts collection to check if the call has been at any other user before reaching this call routing script.

To use the function within your call routing script just copy&paste it into the "Start" block and call it afterwards within an "Evaluate" block.

 

'----------------------------------------------------------------
' IsCallTransferred
'
' Checks if the current call was transferred to the current user,
' i.e. was in some other user's call routing before.
'
' Parameter:
'
' Return:
'	boolean
'----------------------------------------------------------------
Function IsCallTransferred
	PBXScript.OutputTrace "-------> IsCallTransferred()"
	PBXScript.OutputTrace "PBXScript.PreviousScripts.Count = " & PBXScript.PreviousScripts.Count

	Dim bReturn
	bReturn = (PBXScript.PreviousScripts.Count <> 0)
	IsCallTransferred = bReturn

	PBXScript.OutputTrace "bReturn = " & bReturn
	PBXScript.OutputTrace "<------- IsCallTransferred()"
End Function

 

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use and have taken note of our Privacy Policy.
We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.