למאגר המידע של מסקיו

Maskyoo API 16

Maskyoo Methods related

Create Maskyoo

This function purpose is to set up a new maskyoo number in the system, including all functions & features that effects the user experience during the call • Please note! This may affect your rates, according to your commercial plan


/api/?service=create_maskyoo

Usage and SDK Samples


	curl -H "Authorization: Bearer < TOKEN_FROM_SYSTEM >" -X get "https://[MASKYOO_URL]/api/?service=create_maskyoo&maskyoo=&call_destination_phone=&active_status=&greeting_out=&greeting_in=&description=&email=&private_field1=&private_field2=&private_field3=&private_field4=&private_field5=&sms_destination_phone=&callback_url=&working_hours=&extenstion=&record_presantge=&ringback_tone=fonetone&callback_url_option=2&record_option=2&dial_option=1&dial_timeout_in_sec=50&out_of_time_destination_phone=972544224421&expose=1&disallow_callback=0&format="
	

using System.Net;
using System.Collections.Specialized;
namespace Examples.System.Net
{
    public class WebRequestPostExample
    {
        public static void Main ()
        {
			string url_query_string="https://[MASKYOO_URL]/api/?";
			using (var client = new WebClient())
			{
				var values = new NameValueCollection();
				values["service"] = "create_maskyoo";
				values["maskyoo"] = "";
				values["call_destination_phone"] = "972544224422";
				values["active_status"] = "1";
				values["greeting_out"] = "sound_for_caller";
				values["ringback_tone"] = "fonetone";
				values["greeting_in"] = "empty";
				values["description"] = "testit";
				values["email"] = "[email protected]";
				values["private_field1"] = "1";
				values["private_field2"] = "2";
				values["private_field3"] = "3";
				values["private_field4"] = "4";
				values["private_field5"] = "5";
				values["sms_destination_phone"] = "972544224422";
				values["callback_url"] = "";
				values["callback_url_option"] = "2";
				values["working_hours"] = "111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111";
				values["extenstion"] = "";
				values["record_presantge"] = "50";
				values["record_option"] = "2";
				values["dial_option"] = "1";
				values["dial_timeout_in_sec"] = "50";
				values["out_of_time_destination_phone"] = "972544224421";
				values["expose"] = "1";
				values["disallow_callback"] = "0";
				values["format"] = "json";

                client.Headers.Add("Authorization","Bearer < TOKEN_FROM_SYSTEM >");
				var response = client.UploadValues(url_query_string, values);

				var responseString = Encoding.Default.GetString(response);
				Console.WriteLine (responseString);
			}
        }
    }
}	
	

<?php
	$base_url="https://[MASKYOO_URL]/api/";
	$data = array(
		"service" => "create_maskyoo",
		"maskyoo" => "",
		"call_destination_phone" => "972544224422",
		"active_status" => "1",
		"greeting_out" => "sound_for_caller",
		"ringback_tone" => "fonetone",
		"greeting_in" => "empty",
		"description" => "testit",
		"email" => "[email protected]",
		"private_field1" => "1",
		"private_field2" => "2",
		"private_field3" => "3",
		"private_field4" => "4",
		"private_field5" => "5",
		"sms_destination_phone" => "972544224422",
		"callback_url" => "",
		"callback_url_option" => "2",
		"working_hours" => "111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111",
		"extenstion" => "",
		"record_presantge" => "50",
		"record_option" => "2",
		"dial_option" => "1",
		"dial_timeout_in_sec" => "50",
		"out_of_time_destination_phone" => "972544224421",
		"expose" => "1",
		"disallow_callback" => "0",
		"format" => "json",     
	);
	echo post_data($base_url, $data);

	function post_data($url, $data){
		$fields = '';
		foreach($data as $key => $value) { 
			$fields .= $key . '=' . $value . '&'; 
		}
		rtrim($fields, '&');
		$post = curl_init();
		curl_setopt($post, CURLOPT_URL, $url);
		curl_setopt($post, CURLOPT_POST, count($data));
		curl_setopt($post, CURLOPT_POSTFIELDS, $fields);
		curl_setopt($post, CURLOPT_RETURNTRANSFER, 1);
        curl_setopt($post, CURLOPT_HTTPHEADER, array("Authorization: Bearer < TOKEN_FROM_SYSTEM >"));
		$result = curl_exec($post);
		curl_close($post);
		return $result; 
	}
?>
	

Parameters

Query parameters
Name Description
maskyoo / prefix
call_destination_phone*
active_status*
greeting_out
ringback_tone
greeting_in
description*
email
private_field1
private_field2
private_field3
private_field4
private_field5
sms_destination_phone
callback_url
callback_url_option
working_hours
out_of_time_destination_phone
extenstion
record_presantge
record_option
dial_option
dial_timeout_in_sec
expose
disallow_callback
format

Responses

Status: 200 - Success response

Status: 4000 - error the description is empty or longer then 200 chars

Status: 4001 - error the call_destination_phone is not valid or empty or longer then 100 chars

Status: 4002 - error the private_field1 is longer then 254 chars

Status: 4003 - error the private_field2 is longer then 254 chars

Status: 4004 - error the private_field3 is longer then 254 chars

Status: 4005 - error the private_field4 is longer then 254 chars

Status: 4006 - error the private_field5 is longer then 254 chars

Status: 4007 - error the callback_url is longer then 255 chars

Status: 4008 - error maskyoo allocation failed

Status: 4009 - error maskyoo allocation failed

Status: 40010 - error callback url option is not valid

Status: 40011 - error the dial option is not valid

Status: 40012 - error the record_option is not valid

Status: 40013 - error the dial_timeout_in_sec is not valid

Status: 40014 - error the expose is not valid

Status: 40015 - error the disallow_callback is not valid, can be 0,1,2


Update Maskyoo

This function purpose is to allow editing all of the maskyoo numbers features, including call destination number, line operating hours, voice intros etc. • Please note! This function will apply immediately on all of the maskyoo number definitions and it is final"


/api/?service=update_maskyoo

Usage and SDK Samples


	curl -H "Authorization: Bearer < TOKEN_FROM_SYSTEM >" -X get "https://[MASKYOO_URL]/api/?service=update_maskyoo&maskyoo=&call_destination_phone=&description=&active_status=&greeting_out=&greeting_in=&email=&private_field1=&private_field2=&private_field3=&private_field4=&private_field5=&sms_destination_phone=&callback_url=&working_hours=&extenstion=&record_presantge=&ringback_tone=fonetone&callback_url_option=2&record_option=2&dial_option=1&dial_timeout_in_sec=50&out_of_time_destination_phone=972544224421&expose=1&disallow_callback=0&format="
	

using System.Net;
using System.Collections.Specialized;
namespace Examples.System.Net
{
    public class WebRequestPostExample
    {
        public static void Main ()
        {
			string url_query_string="https://[MASKYOO_URL]/api/?";
			using (var client = new WebClient())
			{
				var values = new NameValueCollection();
				values["service"] = "create_maskyoo";
				values["maskyoo"] = "";
				values["call_destination_phone"] = "972544224422";
				values["description"] = "testit";
				values["active_status"] = "1";
				values["greeting_out"] = "sound_for_caller";
				values["ringback_tone"] = "fonetone";
				values["greeting_in"] = "empty";
				values["email"] = "[email protected]";
				values["private_field1"] = "1";
				values["private_field2"] = "2";
				values["private_field3"] = "3";
				values["private_field4"] = "4";
				values["private_field5"] = "5";
				values["sms_destination_phone"] = "972544224422";
				values["callback_url"] = "";
				values["callback_url_option"] = "2";
				values["working_hours"] = "111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111";
				values["extenstion"] = "";
				values["record_presantge"] = "50";
				values["record_option"] = "2";
				values["dial_option"] = "1";
				values["dial_timeout_in_sec"] = "50";
				values["out_of_time_destination_phone"] = "972544224421";
				values["expose"] = "1";
				values["disallow_callback"] = "0";
				values["format"] = "json";

				client.Headers.Add("Authorization","Bearer < TOKEN_FROM_SYSTEM >");
                var response = client.UploadValues(url_query_string, values);

				var responseString = Encoding.Default.GetString(response);
				Console.WriteLine (responseString);
			}
        }
    }
}
	

<?php
	$base_url="https://[MASKYOO_URL]/api/";
	$data = array(
		"service" => "update_maskyoo",
		"maskyoo" => "972737373737",
		"call_destination_phone" => "972544224422",
		"description" => "testit",
		"active_status" => "1",
		"greeting_out" => "sound_for_caller",
		"ringback_tone" => "fonetone",
		"greeting_in" => "empty",
		"email" => "[email protected]",
		"private_field1" => "1",
		"private_field2" => "2",
		"private_field3" => "3",
		"private_field4" => "4",
		"private_field5" => "5",
		"sms_destination_phone" => "972544224422",
		"callback_url" => "",
		"callback_url_option" => "2",
		"working_hours" => "111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111",
		"extenstion" => "",
		"record_presantge" => "50",
		"record_option" => "2",
		"dial_option" => "1",
		"dial_timeout_in_sec" => "50",
		"out_of_time_destination_phone" => "972544224421",
		"expose" => "1",
		"disallow_callback" => "0",
		"format" => "json",     
	);
	echo post_data($base_url, $data);

	function post_data($url, $data){
		$fields = '';
		foreach($data as $key => $value) { 
			$fields .= $key . '=' . $value . '&'; 
		}
		rtrim($fields, '&');
		$post = curl_init();
		curl_setopt($post, CURLOPT_URL, $url);
		curl_setopt($post, CURLOPT_POST, count($data));
		curl_setopt($post, CURLOPT_POSTFIELDS, $fields);
		curl_setopt($post, CURLOPT_RETURNTRANSFER, 1);
        curl_setopt($post, CURLOPT_HTTPHEADER, array("Authorization: Bearer < TOKEN_FROM_SYSTEM >"));
		$result = curl_exec($post);
		curl_close($post);
		return $result; 
	}
?>
	

Parameters

Query parameters
Name Description
maskyoo*
call_destination_phone*
description*
active_status
greeting_out
ringback_tone
greeting_in
email
private_field1
private_field2
private_field3
private_field4
private_field5
sms_destination_phone
callback_url
callback_url_option
working_hours
out_of_time_destination_phone
extenstion
record_presantge
record_option
dial_option
dial_timeout_in_sec
expose
disallow_callback
format

Responses

Status: 200 - Success response

Status: 4010 - error the description is empty or longer then 200 chars

Status: 4011 - error maskyoo number can't be empty

Status: 4012 - error the call_destination_phone is not valid or empty or longer then 100 chars

Status: 4013 - error the private_field1 is longer then 254 chars

Status: 4014 - error the private_field2 is longer then 254 chars

Status: 4015 - error the private_field3 is longer then 254 chars

Status: 4016 - error the private_field4 is longer then 254 chars

Status: 4017 - error the private_field5 is longer then 254 chars

Status: 4018 - error the callback_url is longer then 255 chars

Status: 4019 - error the description is empty or longer then 200 chars

Status: 4020 - error update ddi_detail table

Status: 4021 - error update ddi table

Status: 4022 - error the callback_url_option is not valid

Status: 4023 - error the dial_option is not valid

Status: 4024 - error the record_option is not valid

Status: 4025 - error the dial_timeout_in_sec is not valid

Status: 4026 - error the expose is not valid

Status: 4027 - error the disallow_callback is not valid, can be 0,1,2


Get Maskyoo

This function purpose allows you to receive information about maskyoo number/s (limit to 10000)


/api/?service=get_maskyoo

Usage and SDK Samples


	curl -H "Authorization: Bearer < TOKEN_FROM_SYSTEM >" -X get "https://[MASKYOO_URL]/api/?service=get_maskyoo&maskyoo=&format="
	

using System.Net;
using System.Collections.Specialized;
namespace Examples.System.Net
{
    public class WebRequestPostExample
    {
        public static void Main ()
        {
			string url_query_string="https://[MASKYOO_URL]/api/?";
			using (var client = new WebClient())
			{
				var values = new NameValueCollection();
				values["service"] = "get_maskyoo";
				values["maskyoo"] = "972737373737";
				values["format"] = "json";

				client.Headers.Add("Authorization","Bearer < TOKEN_FROM_SYSTEM >");
                var response = client.UploadValues(url_query_string, values);

				var responseString = Encoding.Default.GetString(response);
				Console.WriteLine (responseString);
			}
        }
    }
}
	

<?php
	$base_url="https://[MASKYOO_URL]/api/";
	$data = array(
		"service" => "get_maskyoo",                 
		"maskyoo" => "972737373737",        			
		"format" => "json"      
	);
	echo post_data($base_url, $data);

	function post_data($url, $data){
		$fields = '';
		foreach($data as $key => $value) { 
			$fields .= $key . '=' . $value . '&'; 
		}
		rtrim($fields, '&');
		$post = curl_init();
		curl_setopt($post, CURLOPT_URL, $url);
		curl_setopt($post, CURLOPT_POST, count($data));
		curl_setopt($post, CURLOPT_POSTFIELDS, $fields);
		curl_setopt($post, CURLOPT_RETURNTRANSFER, 1);
        curl_setopt($post, CURLOPT_HTTPHEADER, array("Authorization: Bearer < TOKEN_FROM_SYSTEM >"));
		$result = curl_exec($post);
		curl_close($post);
		return $result; 
	}
?>
	

Parameters

Query parameters
Name Description
maskyoo
status
limit
page
format

Responses

Status: 200 - Success response

Status: 4031 - there is no result


Release Maskyoo

This function purpose is to allow a maskyoo number to be released/canceling a maskyoo number within the system and returning it to maskyoo • Please note! This may affect your rates, according to your commercial plan • Maskyoo will make an effort to allow you to reuse this number in the future, but cannot commit to it • Please note! Number releasing does not cancel the number calls history, but only deactivate the number from being used. After activating this function, calls cannot be made to this number anymore.


/api/?service=release_maskyoo

Usage and SDK Samples


	curl -H "Authorization: Bearer < TOKEN_FROM_SYSTEM >" -X get "https://[MASKYOO_URL]/api/?service=release_maskyoo&maskyoo=&format="
	

using System.Net;
using System.Collections.Specialized;
namespace Examples.System.Net
{
    public class WebRequestPostExample
    {
        public static void Main ()
        {
			string url_query_string="https://[MASKYOO_URL]/api/?";
			using (var client = new WebClient())
			{
				var values = new NameValueCollection();
                values["service"] = "release_maskyoo";
				values["maskyoo"] = "972737373737";
				values["format"] = "json";

				client.Headers.Add("Authorization","Bearer < TOKEN_FROM_SYSTEM >");
                var response = client.UploadValues(url_query_string, values);

				var responseString = Encoding.Default.GetString(response);
				Console.WriteLine (responseString);
			}
        }
    }
}
	

<?php
	$base_url="https://[MASKYOO_URL]/api/";
	$data = array(
		"service" => "release_maskyoo",                 
		"maskyoo" => "972737373737",        			
		"format" => "json"      
	);
	echo post_data($base_url, $data);

	function post_data($url, $data){
		$fields = '';
		foreach($data as $key => $value) { 
			$fields .= $key . '=' . $value . '&'; 
		}
		rtrim($fields, '&');
		$post = curl_init();
		curl_setopt($post, CURLOPT_URL, $url);
		curl_setopt($post, CURLOPT_POST, count($data));
		curl_setopt($post, CURLOPT_POSTFIELDS, $fields);
		curl_setopt($post, CURLOPT_RETURNTRANSFER, 1);
        curl_setopt($post, CURLOPT_HTTPHEADER, array("Authorization: Bearer < TOKEN_FROM_SYSTEM >"));
		$result = curl_exec($post);
		curl_close($post);
		return $result; 
	}
?>
	

Parameters

Query parameters
Name Description
maskyoo*
format

Responses

Status: 200 - Success response

Status: 4040 - error maskyoo number can't be empty

Status: 4041 - error the number xxxxxx not exist

Status: 4042 - error the maskyoo xxxxxx didnt release

Status: 4043 - error the number xxxxxx is not valid number


Get Available Maskyoo

This function retrive maskyoo number that is free for allocation.


/api/?service=get_available_maskyoo

Usage and SDK Samples


	curl -H "Authorization: Bearer < TOKEN_FROM_SYSTEM >" -X get "https://[MASKYOO_URL]/api/?service=get_available_maskyoo&format="
	

using System.Net;
using System.Collections.Specialized;
namespace Examples.System.Net
{
    public class WebRequestPostExample
    {
        public static void Main ()
        {
			string url_query_string="https://[MASKYOO_URL]/api/?";
			using (var client = new WebClient())
			{
				var values = new NameValueCollection();
                values["service"] = "get_available_maskyoo";
				values["format"] = "json";

				client.Headers.Add("Authorization","Bearer < TOKEN_FROM_SYSTEM >");
                var response = client.UploadValues(url_query_string, values);

				var responseString = Encoding.Default.GetString(response);
				Console.WriteLine (responseString);
			}
        }
    }
}
	

<?php
	$base_url="https://[MASKYOO_URL]/api/";
	$data = array(
		"service" => "get_available_maskyoo",                     			
		"format" => "json"      
	);
	echo post_data($base_url, $data);

	function post_data($url, $data){
		$fields = '';
		foreach($data as $key => $value) { 
			$fields .= $key . '=' . $value . '&'; 
		}
		rtrim($fields, '&');
		$post = curl_init();
		curl_setopt($post, CURLOPT_URL, $url);
		curl_setopt($post, CURLOPT_POST, count($data));
		curl_setopt($post, CURLOPT_POSTFIELDS, $fields);
		curl_setopt($post, CURLOPT_RETURNTRANSFER, 1);
        curl_setopt($post, CURLOPT_HTTPHEADER, array("Authorization: Bearer < TOKEN_FROM_SYSTEM >"));
		$result = curl_exec($post);
		curl_close($post);
		return $result; 
	}
?>
	

Parameters

Query parameters
Name Description
maskyoo
prefix
amount
format

Responses

Status: 200 - Success response

Status: 4050 - error no available maskyoo numbers

Status: 4051 - error no available maskyoo numbers with maskyoo prefix xxx


Create Maskyoo call

This function purpose is to create a call to the maskyoo number, and in case the call is connected, to seamlessly connect the call to the destination number which it is assigned to. This function usually allows a ""click to call"" service for one of the maskyoo numbers. • Please pay attention to the business days & hours limitation set up in the system while using this function • All maskyoo number definitions will apply as well while using this function "


/api/?service=create_maskyoo_call

Usage and SDK Samples


    curl -H "Authorization: Bearer < TOKEN_FROM_SYSTEM >" -X get "https://[MASKYOO_URL]/api/?service=create_maskyoo_call&destination=&maskyoo=&first_target=&format="
    

using System.Net;
using System.Collections.Specialized;
namespace Examples.System.Net
{
    public class WebRequestPostExample
    {
        public static void Main ()
        {
            string url_query_string="https://[MASKYOO_URL]/api/?";
            using (var client = new WebClient())
            {
                var values = new NameValueCollection();
                values["service"] = "create_maskyoo_call";
                values["destination"] = "972544224422";
                values["maskyoo"] = "972737373737";
                values["first_target"] = "destination";
                values["format"] = "json";

                client.Headers.Add("Authorization","Bearer < TOKEN_FROM_SYSTEM >");
                var response = client.UploadValues(url_query_string, values);

                var responseString = Encoding.Default.GetString(response);
                Console.WriteLine (responseString);
            }
        }
    }
}
    

<?php
    $base_url="https://[MASKYOO_URL]/api/";
    $data = array(
        "service" => "create_maskyoo_call",                 
        "destination" => "972544224422",                    
        "maskyoo" => "972737373737",
        "first_target" => "destination",
        "format" => "json"      
    );
    echo post_data($base_url, $data);

    function post_data($url, $data){
        $fields = '';
        foreach($data as $key => $value) { 
            $fields .= $key . '=' . $value . '&'; 
        }
        rtrim($fields, '&');
        $post = curl_init();
        curl_setopt($post, CURLOPT_URL, $url);
        curl_setopt($post, CURLOPT_POST, count($data));
        curl_setopt($post, CURLOPT_POSTFIELDS, $fields);
        curl_setopt($post, CURLOPT_RETURNTRANSFER, 1);
        curl_setopt($post, CURLOPT_HTTPHEADER, array("Authorization: Bearer < TOKEN_FROM_SYSTEM >"));
        $result = curl_exec($post);
        curl_close($post);
        return $result; 
    }
?>
    

Parameters

Query parameters
Name Description
destination*
maskyoo*
first_target
format

Responses

Status: 200 - Success response

Status: 3011 - error the maskyoo is either invalid or empty

Status: 3012 - error the phone number is either invalid or empty

Status: 3013 - error the destination is in blacklist

Status: 3014 - error the maskyoo number not active

Status: 3015 - error the connection to telecom host failed

Status: 3016 - error the maskyoo phone XXXXX not exist


Create Maskyoo call v2

This function purpose is to create a call to destination1 with caller id of maskyoo1 number, and in case the call is connected, to seamlessly connect the call to the destination2 number with caller id of maskyoo2 number(or maskyoo1 number if maskyoo2 not sent). This function allows a "click to call" service with caller id of the maskyoo numbers. • Please pay attention to the business days and hours limitation set up in the system while using this function • All maskyoo number definitions will apply as well while using this function


/api/?service=create_maskyoo_call_v2

Usage and SDK Samples


    curl -H "Authorization: Bearer < TOKEN_FROM_SYSTEM >" -X get "https://[MASKYOO_URL]/api/?service=create_maskyoo_call_v2&maskyoo1=&destination1=&maskyoo2=&destination2=&format="
    

using System.Net;
using System.Collections.Specialized;
namespace Examples.System.Net
{
    public class WebRequestPostExample
    {
        public static void Main ()
        {
            string url_query_string="https://[MASKYOO_URL]/api/?";
            using (var client = new WebClient())
            {
                var values = new NameValueCollection();
                values["service"] = "create_maskyoo_call_v2";
                values["maskyoo1"] = "972737373737";
                values["destination1"] = "972544224422";
                values["maskyoo2"] = "972737373737";
                values["destination2"] = "972544224422";
                values["format"] = "json";

                client.Headers.Add("Authorization","Bearer < TOKEN_FROM_SYSTEM >");
                var response = client.UploadValues(url_query_string, values);

                var responseString = Encoding.Default.GetString(response);
                Console.WriteLine (responseString);
            }
        }
    }
}
    

<?php
    $base_url="https://[MASKYOO_URL]/api/";
    $data = array(
        "service" => "create_maskyoo_call_v2",                 
        "maskyoo1" => "972737373737",
        "destination1" => "972544224422",                    
        "maskyoo2" => "972737373737",
        "destination2" => "972544224422",                    
        "format" => "json"      
    );
    echo post_data($base_url, $data);

    function post_data($url, $data){
        $fields = '';
        foreach($data as $key => $value) { 
            $fields .= $key . '=' . $value . '&'; 
        }
        rtrim($fields, '&');
        $post = curl_init();
        curl_setopt($post, CURLOPT_URL, $url);
        curl_setopt($post, CURLOPT_POST, count($data));
        curl_setopt($post, CURLOPT_POSTFIELDS, $fields);
        curl_setopt($post, CURLOPT_RETURNTRANSFER, 1);
        curl_setopt($post, CURLOPT_HTTPHEADER, array("Authorization: Bearer < TOKEN_FROM_SYSTEM >"));
        $result = curl_exec($post);
        curl_close($post);
        return $result; 
    }
?>
    

Parameters

Query parameters
Name Description
maskyoo1*
destination1*
maskyoo2
destination2*
format

Responses

Status: 200 - Success response

Status: 3031 - error the maskyoo is either invalid or empty

Status: 3032 - error destination1 or destination2 is either invalid or empty

Status: 3033 - error the destination1 is in blacklist

Status: 3038 - error the destination2 is in blacklist

Status: 3034 - error the maskyoo1 number not active

Status: 3037 - error the maskyoo2 number not active

Status: 3035 - error the connection to telecom host failed

Status: 3036 - error the maskyoo phone XXXXX not exist

Status: 3039 - error maskyoo1 OR maskyoo2 not working now see hours limition


Generated 2017-02-01 12:00:00