Please note: These WebEx forums have replaced the earlier site forums. All the previous threads and posts have been replicated here, and if you subscribed to the previous forums, please re-subscribe. Thank you.
« Back to Meeting Listings

URL API: Enroll in meeting center - "Invalid Data Format" with phone #

Combination View Flat View Tree View
Threads [ Previous | Next ]
toggle
Hi,
 
we are using the URL API to do a blind register of users who who complete a form on our website. We used to pass first name, last name, email, and meeting id. Recently the hosts have requested that we send the phone and company name. Company name is no problem, but I am having a big problem with the phone number.
 
According to the documentation: PH: Optional. Attendee¿s country code, area code, phone number, and extension separated by commas. For example, ¿1,408,8675309,536¿. The default value is blank.
 
the phone number sent in any other format (or if blank) returns an Invalid Data Format error (ex. ?AT=RM&ST=FAIL&RS=InvalidDataFormat)
 
Does anyone know of a regular expression or some other piece of code that will convert the phone into the desired format? I've gotten close, but it still fails on certain conditions.
 
here is an example fo the URL we send to register for an meeting:
 
https://autotask.webex.com/autotask/m.php?AT=RM&MK=325016309&FN=Nick&LN=Youmans&EM=nyoumans@autotask.com&CY=Autotask&SA=NY&CI=United States&PH=555-555-55552&BU=http://varstreet.autotask.com/contact/thank_you.htm
 
Any help would be greatly appreciated.
 
thanks,
Nick

Hi Nick,
 
Are your  phone numbers always going to be in the 555-555-5555 format?  Will there ever be any international numbers? If they are always going to be in this format a string replace would probabley be the quickest way to switch the dashes to a comma.
 
Thank you
-Kingsley Lewis

Hi Kingsley,
 
Thanks for the reply.
 
unfortunately, there is no consistent formatting of the phone number. looking at the people who used a webex registration form for a previous meeting, the formatting could be almost anything...including international.
 
using a test phone of 1-(518) 555-1234 I was able to find a regular expression was to convert the phone to 1,518,555,1234. But if the user enters 15185551234, i recieve the same "Invalid Data Format" error.
 
Any ideas?
 
Thanks,
Nick

Hi Nick,

I think this is a pretty common web development issue. Some of my thoughts on this would be to do the majority of validation via client side.  Anytime the customer starts to type in anything other than a number or a "-" give them a little warning, or just remove the offending character. I only suggest allowing dashes because I personally like to see dashes when I put in my number Vs. only putting in only numbers. Once that is done you should end up with a string of numbers or a string of numbers and - .  On the back end you can probably come up with a few regex's or string manipulations to add the "," where the APIs expect them to be.  North American numbers shouldn't be too bad, this link may help with any regexs (http://en.wikipedia.org/wiki/North_American_Numbering_Plan).
 
Thank you
-Kingsley Lewis

Create a Cisco account today and gain access across all Cisco Collaboration Developer sites.

 

Follow the WebEx Developer program on Twitter for the latest industry and WebEx Meetings related information.