Plivo SDK call Recording -
i getting error dont understand cannot find helpfull informations about:
no 'access-control-allow-origin' header present on requested resource. origin 'https:*******' therefore not allowed access. response had http status code 401.
function recordthecall() { var key = '*******************'; $.get( "https://api.plivo.com/v1/account/"+key+"/call/?status=live", function( data ) { var calluuid = data.call_uuid }); $.ajax({ url: "https://api.plivo.com/v1/account/"+key+"/call/"+calluuid+"/record/", type: "post", data: { 'auth_id': auth_id, 'call_uuid': calluuid }, datatype: "json", success: function (res) { alert(res); }, error: function(err) { alert(err); } }); }
call recording cannot accomplished web sdk directly. cannot use plivo api web browser using javascript because cross-domain ajax requests not allowed in browsers security reasons. has been explained in wikipedia article. there work arounds overcome this, browser dependent , hence might not work always. instead should use plivo xml/api in application.
Comments
Post a Comment