Skype - Simple Chat

Skype - Simple Chat

Skype allows registered users to communicate with each other using text messaging. The application also supports its users to communicate with each other using voice chat or sms chat. This sample demonstrates the auto-attendant chat program via Skype which keeps the users connected with the organization through instant messaging services.

Download the evaluation version of Xtend IVR and install the telephony application in your system. Run the sample script from the Script Editor. Click here to refer the code.

After creating the script, you can run the script and it works as below:

  • IVR waits for a chat message
  • On receiving the chat message, IVR displays the corresponding message
  • IVR announces the received message to the sender with a prefix "You said"

Display "Waiting for chat . . ."

MAIN:
	
	if !Skype.GetChatMessage()
		SleepEvent 
		goto MAIN
	endif
	
	
	Display  "Received message from " $SkypeChat.FROM_HANDLE " -> " $SkypeChat.BODY 
	
	
	$Str = Format("You said: %s", $SkypeChat.BODY)
	Skype.SendChatMessage($SkypeChat.CHATNAME, $Str)
	goto MAIN	
	

ONHANGUP:
	hangup
	goto MAIN


ONSYSTEMERROR:
	log $error
	display $error
	if $debug 
		msgbox($error)
	endif
	hangup
	goto MAIN