Members Login
Username 
 
Password 
    Remember Me  
Post Info TOPIC: Help on Click To Call


Member

Status: Offline
Posts: 9
Date: Aug 6, 2009
Help on Click To Call
Permalink   
 


Hi ,

I'm new to IfByPhone , i want to make a phone call to a US no and i'm using ASP.NET for this .I followed one of the documentation provided by IfByPhone that uses HttpWebRequest and HttpWebResponse object as enclosed below .

I'm afraid that this code doesn't work and would like to know if I'm missing anything in there like code or any configuration.


String strUrl = "https://secure.ifbyphone.com/clickto_getphone.php?key=XXXX&click_id=1234";
strUrl = strUrl + "&phone_to_call=" + txtNPA.Text + txtNNX.Text + txtLine.Text;
HttpWebRequest oWebRequest = (HttpWebRequest)WebRequest.Create(strUrl);
HttpWebResponse oWebResponse = (HttpWebResponse)oWebRequest.GetResponse();
StreamReader st = new StreamReader(oWebResponse.GetResponseStream());
String strRes = st.ReadToEnd();
lblMsg.Text = strRes;

When i try to execute this,it returns a response that is similar to Click to Call screen in the web site ,that contains an Image with the 3 text boxes and a Click to call button .Please,find the attached file to look into same .

Unable to get message like 'Success' or something .

Your help is appreciated .

Thanks ,

Krishna Prasad H




Attachments
__________________


Member

Status: Offline
Posts: 7
Date: Aug 6, 2009
Permalink   
 

Hi Krishna,

The code you posted is for displaying the default pop-up window that uses AJAX. If you would like to embed your own phone number form on your site you will need to create the boxes just as you did in the example picture you posted and then use Javascript / Ajax to grab those numbers and post them to Ifbyphone.

Here are some example files for both ASP and PHP that demonstrate exactly what you are trying to do.

There are two things you have to change in the Javascript code:

1) Your Public API Key
2) The Building Block ID of the Click to Call you are using

Both of these can be found by logging into your account and selecting Developer Tools --> Building Block IDs from the menu. In the asp_example.html file starting on line 61 is where you will need to insert these values.

Sincerely,
Dan Day



-- Edited by DDay on Thursday 6th of August 2009 09:18:32 AM

Attachments
__________________


Member

Status: Offline
Posts: 9
Date: Aug 7, 2009
Permalink   
 

Hi Dan ,

Thanks a lot . It worked great . Now , i have a new issue working with Survo Smart form .Basically, i have configured Survo with a response as XML and trying to pass a CSV file containing a list of phone nos to be called .But,this doesn't seem to work as it throws an exception "Unable to connect to remote server " .

Enclosed is the code :

String strURL = "https://secure.ifbyphone.com/click_to_xyz.php?app=cts
&acct=1111
&survo_id=1234
&key=XXXX
&type=1";
strURL = strURL + "&phone=" + @"C:\Users\krishna\Desktop\SurvoCallTest.csv";

Now,i'm creating a webrequest for this URL and i'm not getting proper response for the request made.I'm afraid if this is not the proper way to pass CSV or missing some parameters.Attached is the screenshot of the csv file.

Can you please help me on this ?

Thanks ,

Krishna Prasad H

Attachments
__________________


Member

Status: Offline
Posts: 7
Date: Aug 7, 2009
Permalink   
 

Hi Krishna,

In order to use a CSV file it needs to be accessible on the internet by our server . The path you gave is to a file on your local computer. The file needs to be uploaded to a server so it can be accessed by a URL such as:

http://www.example.com/phone_numbers.csv

The file name must end in .csv.

Sincerely,
Dan Day

__________________


Member

Status: Offline
Posts: 9
Date: Aug 28, 2009
Permalink   
 

Hi Dan ,

I tried passing csv file to the web service .But,some how it didn't work .I'm afraid if its a wrong way to pass parameters or something wrong in the csv format . Would like to get your support on this .

Please,find the enclosed code & also, attached CSV  screenshot

String strUrl = "https://secure.ifbyphone.com/click_to_xyz.php?app=cts
&acct=105271
&key=34234234
&survo_id =1234
&type=1";
strUrl = strUrl + "&phone=" + "http://eg.net/survocalltest.csv";


When i try to call  , i will get this error

"Phone number specified is invalid. Please check it and try again."


Thanks,

Krishna Prasad H


Attachments
__________________


Veteran Member

Status: Offline
Posts: 45
Date: Aug 28, 2009
Permalink   
 

Krishna, when I go to http://eg.net/survocalltest.csv I get a invalid page back. Is the CSV still hosted there?

__________________
-Phil Seguin
pseguin@ifbyphone.com


Member

Status: Offline
Posts: 9
Date: Aug 31, 2009
Permalink   
 

Hi Phil ,

http://ksenthil.net/SurvoCallTest.csv

Can you try this URL and let me know ??  I could get rid of that weird error .But, when i make a call to the numbers in the CSV  it throws "Specified Broadcast CSV file is improperly formatted: missing 'number' column" error .I'm sure this is something to do with CSV format that i'm using as input .

Please,find the attachment for the format of the CSV file .Kindly,let me know what's the rite format to be used .

Thanks ,

Krishna Prasad H

-- Edited by krishnaprasadh on Tuesday 1st of September 2009 12:53:12 AM

Attachments
__________________


Member

Status: Offline
Posts: 7
Date: Aug 31, 2009
Permalink   
 

Hi Krishna,

The file must be saved as a Microsoft Windows/DOS-formatted CSV file. Attached is your example file re-saved in the correct format.

--
Dan Day

Attachments
__________________
Page 1 of 1  sorted by
 
Quick Reply

Please log in to post quick replies.

Post to Digg Post to Del.icio.us


Create your own FREE Forum
Report Abuse
Powered by ActiveBoard