We've Moved! Please visit our new and improved forum over at our new portal: https://portal.plumvoice.com/hc/en-us/community/topics

ASP.Net Support

Questions and answers about IVR programming for Plum DEV

Moderators: admin, support

acadenilla
Posts: 55
Joined: Wed Oct 31, 2007 11:02 am

ASP.Net Support

Post by acadenilla »

Does the Plum Hosting Platform support an application that is VXML integrated with ASP.NET?

Thanks

Allan

support
Posts: 3632
Joined: Mon Jun 02, 2003 3:47 pm
Location: Boston, MA
Contact:

IVR platform support ASP.net

Post by support »

Hi,

Yes, the Plum IVR Hosting Platform supports IVR applications that are VXML integrated with ASP.NET, as long as the IVR application returns valid VXML.

Regards,
Plum Support
Last edited by support on Wed Feb 24, 2010 4:19 pm, edited 3 times in total.

acadenilla
Posts: 55
Joined: Wed Oct 31, 2007 11:02 am

Post by acadenilla »

Is there a link to documentations for this integration?

Allan

acadenilla
Posts: 55
Joined: Wed Oct 31, 2007 11:02 am

Post by acadenilla »

I was able to get my login page to work but when i tried to submit to a new page i keep getting this error

error 2123766365 4 [01/Nov/2007:11:37:23 -0400] 3927 000001;004;1193928607 HTTP/1.1 500 Internal Server Error - http://local28voice.braveline.com/Authenticate.aspx
error 2123766365 4 [01/Nov/2007:11:37:23 -0400] 3927 000001;004;1193928607 DocumentParser::FetchBuffer - could not open URL: Authenticate.aspx
error 2123766365 4 [01/Nov/2007:11:37:23 -0400] 3927 000001;004;1193928607 DocumentParser::FetchDocument - exiting with error result 2
error 2123766365 4 [01/Nov/2007:11:37:23 -0400] 3927 000001;004;1193928607 errno: 203 uri Authenticate.aspx

Here is a snippet of the page i am trying to load

<form id="frmAuthenticate">
<block>
<log expr="'************Authenticate Member**********'" label="trace:?level=VD_INFO"/>

<% if(Authenticated) {%>
<log expr="'MemberID:<%=CurrentMember.ID.ToString()%> authenticated'" label="trace:?level=VD_INFO"/>
<submit next="Welcome.aspx" method="post"></submit>
<% }

.................
</block>
</form>

it could be because of this <% if(Authenticated) {%>


I also noticed the it was not writing any of the logs to the database. Is there something i need to do in my end maybe open up a port to give plum hosting access for my application to run

documentation for ASP.net integration would be very helpful

Thanks

Allan

support
Posts: 3632
Joined: Mon Jun 02, 2003 3:47 pm
Location: Boston, MA
Contact:

IVR clarification for ASP.net support

Post by support »

Hi,

VXML is a standard web based technology, it uses HTTP GET/POST requests to send and receive data from any standard web server. As such there is no documentation about specifically "integrating" with an ASP.NET server. However, we are working on coming up with a simple IVR example that we will post as a followup in this thread.

As to the IVR error that you are getting, "HTTP/1.1 500 Internal Server Error" means that there is something broken within your IVR code. You can try to debug your IVR code either by looking at the last IVR log of your VXML or by looking at your page in a web browser.

Regards,
Plum Support
Last edited by support on Fri Feb 19, 2010 1:50 pm, edited 2 times in total.

acadenilla
Posts: 55
Joined: Wed Oct 31, 2007 11:02 am

Post by acadenilla »

Could it be because the code - behind the aspx pages is not executing?

That would explain why the applications does not log anything to the database

in the mean time i wait for your example

Allan

support
Posts: 3632
Joined: Mon Jun 02, 2003 3:47 pm
Location: Boston, MA
Contact:

IVR code to submit info from VXML doc to ASP doc

Post by support »

Hi,

Here is an IVR code example of how you can submit information from a VXML document to an ASP document:

collectinfo.vxml:

Code: Select all

<?xml version="1.0"?>
<vxml version="2.0">

<form>
  <field name="customerid" type="digits">
      <prompt>
        Please enter your customer identification number using your keypad.
      </prompt>
  </field>

  <field name="age" type="digits?minlength=1;maxlength=2">
      <prompt>
        Please enter your age using your keypad.
      </prompt>
  </field>

  <block>
    <prompt> Please wait while we process your information. </prompt>
    <submit namelist="customerid age" next="http://mightyserver.com/submit.aspx"/>
  </block>
</form>

</vxml>
submit.aspx:

Code: Select all

<%Response.ContentType = "text/xml"%>
<?xml version="1.0"?>

<%
dim customerid
dim age
customerid = Request.QueryString("customerid")
age = Request.QueryString("age")
%>

<vxml version="2.0">
	<form>
		<block>
			<prompt> Your customer identification number is <%Response.Write(customerid)%>. </prompt>
 			<prompt> Your age is <%Response.Write(age)%>. </prompt>
		</block>
	</form>
</vxml>
Hope this helps.

Regards,
Plum Support
Last edited by support on Tue Jan 12, 2010 1:45 pm, edited 2 times in total.

acadenilla
Posts: 55
Joined: Wed Oct 31, 2007 11:02 am

Post by acadenilla »

Thanks

using the <%Response.Write(variable)%> worked.

acadenilla
Posts: 55
Joined: Wed Oct 31, 2007 11:02 am

Post by acadenilla »

One more questions

How to retrieve the session variables?

I have tried the following in my code-behind

Code: Select all

string callSessionId = (Request["session.id"] != null) ? Request["session.id"] : null;
string callerid = (Request["session.telephone.ani"] != null) ? Request["session.telephone.ani"] : "CallerUnknown";
string calledId = (Request["session.telephone.dnis"] != null) ? Request["session.telephone.dnis"] : "CalledUnknown";
Thanks

Allan

support
Posts: 3632
Joined: Mon Jun 02, 2003 3:47 pm
Location: Boston, MA
Contact:

IVR code needed to understand issue with session variables

Post by support »

Hi,

Could you post the VXML here that's submitting these IVR session variables to your IVR code? This would help us better understand the IVR problem.

Regards,
Plum Support
Last edited by support on Fri Feb 19, 2010 1:51 pm, edited 2 times in total.

acadenilla
Posts: 55
Joined: Wed Oct 31, 2007 11:02 am

Post by acadenilla »

Here is the VXML

Code: Select all

<?xml version="1.0" encoding="UTF-8" ?>
<vxml version="2.0" application="AppRoot.vxml">	

<%@ Page Language="c#" Inherits="Braveline.WRS.Voice.Login" CodeFile="Login.aspx.cs" %>

<meta name="maintainer" content="<%=Braveline.WRS.BusinessObjects.Globals.IVR.IVRMaintainer%>" />

<form id="frmCheckLocal">
    <block>
        <log expr="'***************************************Check which local phone number belongs*********************************'" label="trace:?level=VD_INFO" />
        
        <% if( lawyerNum == true ) { %> 
        
            <audio src="audio/Prophecy/Welcome_Local28_ReferralHall_System_Prophecy.wav"  fetchhint="prefetch">
	            Welcome to the Local 28 Referral Hall System
	        </audio>
	    
	    <% } else { %>
	        
            <audio src="audio/Prophecy/DD_Welcome_Job_Referral_System_Prophecy.wav"  fetchhint="prefetch">
	            Welcome to the Job Referral System.
	        </audio>
	    
	    <% } %>

        
        <% if( MemberID != 0 ) { %>
            <goto next="#frmPinOnly"></goto>
        <% } else { %>
            <goto next="#frmLogin"></goto>
        <% } %>

    </block>
    

    <catch event="help" >
		<prompt>
			<audio src="audio/Prophecy/NoMatch_Prophecy.wav"  fetchhint="prefetch">
				We did not understand you.
			</audio>
		</prompt>
		<goto next="#frmCheckLocal"></goto>
	</catch>

</form>

    <form id="frmLogin">	
	    <property name="incompletetimeout" value="2s" />
	    
	    <block>
	        <log expr="'************Collecting Logon Information - SSN and PIN**********'" label="trace:?level=VD_INFO"/>
	    </block>
		
		<field name="ssn" type="digits?length=9">
			<prompt bargein="true">
			    <audio src="audio/Prophecy/DD_Please_Touchtone_or_Say_Your_9_SS_Prophecy.wav"  fetchhint="prefetch">
	                Please touch tone or say your 9 digits social security number now
	            </audio>
			 </prompt>
		</field>
				
		<field name="pin" type="digits?length=4">
			<prompt bargein="true">
			    <audio src="audio/Prophecy/DD_Please_Touchtone_or_Say_Your_4_PID_Prophecy.wav"  fetchhint="prefetch">
	                Please touch tone or say your 4 digits personal identification number now
	            </audio>
			</prompt>
		</field>
		
		<var name="unionName" expr="'None'"/>
		
		<filled namelist="ssn pin" mode="all">
		    <prompt bargein="false">
		        <audio src="audio/Prophecy/DD_Please_Stand_by_Prophecy.wav"  fetchhint="prefetch">
	                Please stand by while we access our records
	            </audio>
		    </prompt>
		    <submit next="Authenticate.aspx" method="post" namelist="ssn pin SessionID CallerID CalledID"></submit>
	    </filled>
	    

	    <catch event="help" >
		    <prompt>
			    <audio src="audio/Prophecy/NoMatch_Prophecy.wav"  fetchhint="prefetch">
				    We did not understand you.
			    </audio>
		    </prompt>
		    <reprompt/>
	    </catch>

	</form>
	
	<form id="frmPinOnly">
	    <property name="incompletetimeout" value="2s" />
	    
	    <block>
	        <log expr="'*************************************Phone Matches a Local 580 Member Checking Identity with PIN*********************'" label="trace:?level=VD_INFO" />
	    </block>
	    
	    <block>
	        <% if( CurrentMember != null ) { %>
	            <%=CurrentMember.FullName.ToString()%>
	        <% } %>
	        
	    </block>
	    
	    <field name="pin" type="digits?length=4">
			<prompt bargein="true">
			    <break time="200ms" />
			    <audio src="audio/Prophecy/DD_Please_Touchtone_or_Say_Your_4_PID_Prophecy.wav"  fetchhint="prefetch">
	                Please touch tone or say your 4 digits personal identification number now
	            </audio>
			</prompt>
		</field>
		
		
		<filled namelist="pin" mode="all">
		    <prompt bargein="false">
		        <audio src="audio/Prophecy/DD_Please_Stand_by_Prophecy.wav"  fetchhint="prefetch">
	                Please stand by while we access our records
	            </audio>
		    </prompt>
		    <submit next="Authenticate.aspx" method="post" namelist="pin SessionID CallerID CalledID"></submit>
	    </filled>	
	    
	    <catch event="help" >
		    <prompt>
			    <audio src="audio/Prophecy/NoMatch_Prophecy.wav"  fetchhint="prefetch">
				    We did not understand you.
			    </audio>
		    </prompt>
		    <reprompt/>
	    </catch>	
	</form>
</vxml>

The most important thing is the the code-behind

Code: Select all

protected void Page_Load(object sender, System.EventArgs e)
		{
            //Initialize call session with callerid and calledid on the first initial request
            //from the voice browser. 

            if (!Page.IsPostBack && Request["session.id"] != null )
            {

                LogNonAuthenticatedUser();
            }

            CurrentMember = MemberController.GetCurrentMember(MemberController.GetCallSessionID());         
		}

        protected void LogNonAuthenticatedUser()
        {

            string callSessionId = (Request["session.id"] != null) ? Request["session.id"] : null;
            string callerId = (Request["session.telephone.ani"] != null) ? Request["session.telephone.ani"] : null;
            string calledId =(Request["session.telephone.dnis"] != null ) ? Request["session.telephone.dnis"] : null;
            
            

            MemberID = 0;
            HttpCookie cookieCallSessionId = new HttpCookie("CallSessionID", callSessionId);
            Response.Cookies.Add(cookieCallSessionId);

            // Check if the callerid is from a Local 580 Member
            MemberID = MemberController.IsLocal580Member(callerId);
            if (MemberID > 0)
            {
                MemberController.InitializeMemberSessionData(callSessionId, callerId, calledId, MemberID, UnionName.Local580);
                MemberController.LogMemberCallActivity(callSessionId, "User: " + MemberID + " has called in");
                lawyerNum = false;
            }
            else
            {
                MemberController.InitializeMemberSessionData(callSessionId, callerId, calledId, MemberID, UnionName.None);
                MemberController.LogMemberCallActivity(callSessionId, "Beginning authentication");
                if (callerId.Substring(0, 6) == "212732")
                    lawyerNum = true;
                else
                    lawyerNum = false;
            }
        }

I am using these variables for logging into the database using this method " MemberController.LogMemberCallActivity()". I just need to be able to retrieve these sessions variables in my code-behind.

Thanks

Allan

support
Posts: 3632
Joined: Mon Jun 02, 2003 3:47 pm
Location: Boston, MA
Contact:

Submit variables to IVR app script to reference them

Post by support »

Hi,

Looking at your VXML code, I don't see where you are performing a <submit> for any of the IVR session variables (session.id, session.telephone.ani, session.telephone.dnis). You need to submit these variables to your IVR application script in order to reference them.

Regards,
Plum Support
Last edited by support on Fri Feb 19, 2010 1:51 pm, edited 3 times in total.

acadenilla
Posts: 55
Joined: Wed Oct 31, 2007 11:02 am

Post by acadenilla »

This is the first page of my application. Am I correct in that as soon as a caller dials into my application they will be assign a session.id, session.telephone.ani, and a session.telephone.dnis? There is no way to getting these values from Code-behind?

If i have to do a submit then what i am planning to do is create another page ( firstpage.aspx ). and the vxml would be very simple something like

Code: Select all

<?xml version="1.0"?>
<vxml version="2.0">

<form id="CallTransfer">

        <block>
               <submit next="Login.aspx" method="post" namelist="session.id session.telephone.ani session.telephone.dnis"></submit> 
        </block>
        
</form>


</vxml>
Then in my Login page code-behind i can grab those values with

string str = Request[session.id]

Would this be the best and most efficient solution

Thanks

Allan

support
Posts: 3632
Joined: Mon Jun 02, 2003 3:47 pm
Location: Boston, MA
Contact:

ASP.net support

Post by support »

Hi,

Yes, as soon as a caller dials into your IVR application, they will be assigned a session.id, session.telephone.ani, and session.telephone.dnis. You cannot get these values from your IVR code-behind. So, it is necessary to submit these variables if you want to use them in your ASP code.

As to your IVR example, that would appear to be an efficient solution to use the IVR session variables.

Regards,
Plum Support
Last edited by support on Fri Feb 19, 2010 1:52 pm, edited 2 times in total.

acadenilla
Posts: 55
Joined: Wed Oct 31, 2007 11:02 am

Post by acadenilla »

I created the extra page and it was able to give me the values. Not ideal in my opinion but it work nonetheless.

i do have a question about the session.telephone.dnis. Is there a way to get the local number associated with this. So intead of giving me 3214 i can get the number they dial 123-432-5643?


Allan

Post Reply