diff --git a/lib/base.js b/lib/base.js index 3b5cd70..18556ff 100644 --- a/lib/base.js +++ b/lib/base.js @@ -3,14 +3,14 @@ * */ Ask = function(choices, attempts, bargein, minConfidence, name, recognizer, required, say, timeout, voice, interdigitTimeout, sensitivity, speechCompleteTimeout, speechIncompleteTimeout) { - this.choices = (say.event !== null) ? choices : serializeProperty(choices); + this.choices = choices this.attempts = attempts; this.bargein = bargein; this.minConfidence = minConfidence; this.name = name; this.recognizer = recognizer; this.required = required; - this.say = (say.event !== null) ? say : serializeProperty(say); + this.say = say this.timeout = timeout; this.voice = voice; this.interdigitTimeout = interdigitTimeout; @@ -24,10 +24,10 @@ Call = function(to, answerOnMedia, channel, from, headers, name, network, record this.answerOnMedia = answerOnMedia; this.channel = channel; this.from = from; - this.headers = serializeProperty(headers); + this.headers = headers; this.name = name; this.network = network; - this.recording = (typeof(recording) == 'Object') ? serializeProperty(recording) : recording; + this.recording = recording; this.required = required; this.timeout = timeout; this.allowSignals = allowSignals; @@ -71,7 +71,7 @@ MachineDetection = function(introduction, voice){ } Message = function(say, to, answerOnMedia, channel, from, name, network, required, timeout, voice) { - this.say = serializeProperty(say); + this.say = say; this.to = to; this.answerOnMedia = answerOnMedia; this.channel = channel; @@ -88,7 +88,7 @@ On = function(event, name, next, required, say, ask, message, wait) { this.name = name; this.next = next; this.required = required; - this.say = (typeof(say) == 'Object') ? serializeProperty(say) : say; + this.say = say; this.ask = ask; this.message = message; this.wait = wait; @@ -98,7 +98,7 @@ Record = function(attempts, bargein, beep, choices, format, maxSilence, maxTime, this.attempts = attempts; this.bargein = bargein; this.beep = beep; - this.choices = serializeProperty(choices); + this.choices = choices this.format = format; this.maxSilence = maxSilence; this.maxTime = maxTime; @@ -106,9 +106,9 @@ Record = function(attempts, bargein, beep, choices, format, maxSilence, maxTime, this.minConfidence = minConfidence; this.name = name; this.required = required; - this.say = serializeProperty(say); + this.say = say this.timeout = timeout; - this.transcription = (typeof(transcription) == 'Object') ? serializeProperty(transcription) : transcription; + this.transcription = transcription; this.url = url; this.password = password; this.username = username; @@ -197,9 +197,9 @@ StopRecording = function() {}; Transfer = function(to, answerOnMedia, choices, from, headers, name, on, required, terminator, timeout, allowSignals, interdigitTimeout, ringRepeat, machineDetection) { this.to = to; this.answerOnMedia = answerOnMedia; - this.choices = serializeProperty(choices); + this.choices = choices; this.from = from; - this.headers = serializeProperty(headers); + this.headers = headers; this.name = name; if(typeof(on) == "Array"){ this.on = ""; @@ -210,7 +210,7 @@ Transfer = function(to, answerOnMedia, choices, from, headers, name, on, require } }else{ - this.on = (typeof(on) == 'Object') ? serializeProperty(on) : on; + this.on = on; } this.required = required; this.terminator = terminator;