Service CoMagic + HTML form. Why not send the number via the API?

Made form callback - form
When you click on your form POPs up.
Next, work out the filter rooms.
But on clicking the button nothing happens...
And must transmit the number of in service comagic.ru

On the website they write the following:

To add the line:

Comagic.sitePhoneCall( {captcha_key: <ID of captcha>, captcha_val: <captcha solution>, phone: <phone number>}, callback);


Explanation:
captcha_key - the ID of the captcha. Parameter is required when the setting of the site States that show a captcha is necessary. When the setting of the site indicated that the captcha is not necessary to show, that the parameter is optional, but it can be specified
captcha_val is the solution of a captcha (what the visitor entered on the form). Parameter is required when the setting of the site States that show a captcha is necessary. When the setting of the site indicated that the captcha is not necessary to show, that the parameter is optional, but it can be specified
phone - the phone number of the visitor. Required parameter
callback(obj) to return the function result; object result is:
obj = {success: true||false, result: {status: XX}}
where: success=true if successful
success=false - not successful
result - returns the error code:
0 - all is well
1 - captcha solved wrong
2 - is not specified the script
3 - error platform
4 - exhausted the limit on the number of calls per minute
If you do not specify the callback parameter, the function will work similarly to the standard call from the banner (will show error). To obtain the captcha code (image verification code), use the following method:

Comagic.Captcha.get_captcha(callback);
callback{key: myKey, url: myURL}

myKey - the key captcha
myURL - address pictures


To shove
Comagic.sitePhoneCall( {captcha_key: <ID of captcha>, captcha_val: <captcha solution>, phone: <phone number>}, callback);

?
How to pass the room?
Tried to implement so, but something is not working...
What am I missing?
Never worked with the API and want to learn, but need an example or a tip.
July 9th 19 at 13:56

Find more questions by tags APIHTMLJavaScript