Skype - DotNet Daily Fact

Skype - DotNet Daily Fact

Skype allows registered users to communicate with each other through video calls and instant messaging. To keep your customers stay connected with the organization and to deliver quick answers for received enquiries, Skype allows instant messaging through which sending and receiving files are also made possible. The sample demonstrated below will guide you in screen scraping the web data. Here, you will see that the automated IVR on receiving an incoming chat message calls the web service to map the relevant information to the caller.

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 follows:

  • IVR waits for a chat message
  • When a chat message arrives, IVR displays the message
  • IVR maps the information from the web service and picks up the .Net fact for the day
  • Returns the .Net fact to the caller
Download the source file zip download for the Skype - DotNet Daily Fact

	
Display "Waiting for chat . . ."

MAIN:
	
	if !Skype.GetChatMessage()
		SleepEvent 
		goto MAIN
	endif
	
	
	Display  "Received message from " $SkypeChat.FROM_HANDLE " -> " $SkypeChat.BODY 
	
	
	$Fact = DailyFact.GetDailyFact()
	
	$Str = Format('The daily .Net Fact for today is "%s"', $Fact)
	
	
	Skype.SendChatMessage($SkypeChat.CHATNAME, $Str)
	goto MAIN	
	

ONHANGUP:
	hangup
	goto MAIN


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