We've Moved! Please visit our new and improved forum over at our new portal: https://portal.plumvoice.com/hc/en-us/community/topics

Record tag question

Questions and answers about IVR programming for Plum DEV

Moderators: admin, support

Post Reply
shanthint@paydq.com
Posts: 84
Joined: Wed Apr 04, 2007 4:58 pm

Record tag question

Post by shanthint@paydq.com »

Hello,

I am trying to record a part of conversation between the user and system.
I know i can record user response using record tag.
But is it possible to record the question and also the response.??


Thank you.

support
Posts: 3632
Joined: Mon Jun 02, 2003 3:47 pm
Location: Boston, MA
Contact:

IVR system does support call recording via the global proper

Post by support »

Hello,

Our IVR system does support call recording via the global property "recordcall". When this IVR property is set to true and in scope the IVR system will record the call into the variable session.callrecording which can be submitted in the same way as any other recording in the system.

Code: Select all

<?xml version="1.0"?>
<vxml version="2.0">
<property name="recordcall" value="true"/>
<form>
	<field name="field1" type="digits">
		<prompt>Please say some digits</prompt>
		<filled>
			<var name="callrecording" expr="session.callrecording"/>
			<sumbit next="save.php" namelist="field1 callrecording" method="post" enctype="multipart/form-data"/>
		</filled>
	</field>
</form>
This will record the call and then <submit> the call recording along with the data that was collected. The IVR system will continue to record the call until a page that does not set recordcall to true is reached (including a page that does not set it at all). When the IVR system transitions from recordcall disabled to recordcall enabled the previous call recording will be deleted and new data will be written in its place.

Regards,
Plum Support
Last edited by support on Wed Feb 24, 2010 5:46 pm, edited 4 times in total.

shanthint@paydq.com
Posts: 84
Joined: Wed Apr 04, 2007 4:58 pm

Post by shanthint@paydq.com »

Thank you very much. This is exactly what we need.
But in the previous emails regarding the record tags I saw that
plum voice does not support the feature to record the entire call. That's why I was not using record call property. I hope this will work now.

Thank you.

shanthint@paydq.com
Posts: 84
Joined: Wed Apr 04, 2007 4:58 pm

Post by shanthint@paydq.com »

I tried the same code. But it gives me
this error.
VXI::var_element(name="recording" expr = "session.callrecording")
received event: error.semantic .
It seems like it is not getting the session variable.Is that correct?
And also in the programmers' mannual, There are only three session variables setup by Plum voice. So will this work with session.callrecording?

Thank you.

support
Posts: 3632
Joined: Mon Jun 02, 2003 3:47 pm
Location: Boston, MA
Contact:

IVR system does support call recording via the global proper

Post by support »

Try eliminating the <assign> tag altogether:

Code: Select all

<?xml version="1.0"?>
<vxml version="2.0">
<property name="recordcall" value="true"/>
<form>
   <field name="field1" type="digits">
      <prompt>Please say some digits</prompt>
      <filled>
         <sumbit next="save.php" namelist="field1 callrecording" method="post" enctype="multipart/form-data"/>
      </filled>
   </field>
</form> 
This is a new IVR feature and accessing the callrecording via the global session variable is planned but currently unsupported. The special variable "callrecording" alone should work fine.
Last edited by support on Wed Jan 13, 2010 3:24 pm, edited 2 times in total.

shanthint@paydq.com
Posts: 84
Joined: Wed Apr 04, 2007 4:58 pm

Post by shanthint@paydq.com »

<?xml version="1.0"?>
<vxml version="2.0">
<property name="recordcall" value="true"/>
<form>
<field name="field1" type="digits">
<prompt>Please say some digits</prompt>
<filled>
<value expr="callrecording"/>
</filled>
</field>
</form>
</vxml>
This code is not working either. Is there any other way to do this?.
Am I doing anything wrong here??


Thank you.

support
Posts: 3632
Joined: Mon Jun 02, 2003 3:47 pm
Location: Boston, MA
Contact:

IVR system- can't play a call recording while recording

Post by support »

You can't play a call recording while it's still recording. And since you haven't left the VXML page yet, it's still recording.

Follow the IVR example that we sent earlier and submit the variable to another page for processing. If you want the caller to hear the call recording, you can use your page that accepts the submission to write the audio data to disk and then use an audio URL to point to it.
Last edited by support on Wed Dec 30, 2009 4:07 pm, edited 1 time in total.

shanthint@paydq.com
Posts: 84
Joined: Wed Apr 04, 2007 4:58 pm

Post by shanthint@paydq.com »

Hello,

Now I can save the wav file at server side. But I can not play it. I tried ti convert it using sox. It says Couldn't find RIFF header.
I think the recordcall is storing the audio as basic type. Is that Correct? If so, how can I set up type as audio/x-wav in the property tag?

Thank you.

support
Posts: 3632
Joined: Mon Jun 02, 2003 3:47 pm
Location: Boston, MA
Contact:

IVR link to using <record> tag

Post by support »

You set the encoding type within the IVR tag, <record>, by setting the "type" attribute to "audio/x-wav".
Last edited by support on Wed Feb 24, 2010 5:46 pm, edited 4 times in total.

shanthint@paydq.com
Posts: 84
Joined: Wed Apr 04, 2007 4:58 pm

Post by shanthint@paydq.com »

I know that I can set up the type in record tag.
But here I am trying to record whole page like whole conversation using <property name="recordcall" value="true" />. I am not even using record tag here.
Is that possible to set up the type in this case??

Thank you,

shanthint@paydq.com
Posts: 84
Joined: Wed Apr 04, 2007 4:58 pm

Post by shanthint@paydq.com »

Hello,

If I can not set up the type here, Can I somehow convert the basic audio file to wav? and also how should I save that file in server side I mean with what extension?
Any help is appreciated.

Thank you.

support
Posts: 3632
Joined: Mon Jun 02, 2003 3:47 pm
Location: Boston, MA
Contact:

IVR developer shows command to convert data with sox

Post by support »

Ooops. IVR developer error. You're right -- you can't set the encoding type for call recordings (which is distinctly different from recordings captured with the <record> tag). They will always be delivered as 8000Hz ulaw-encoded mono.

To convert the data with sox, you can use the following command:

Code: Select all

sox -t ul -r 8000 _raw_recording.ul _wav_recording.wav
Last edited by support on Wed Jan 13, 2010 3:25 pm, edited 2 times in total.

shanthint@paydq.com
Posts: 84
Joined: Wed Apr 04, 2007 4:58 pm

Post by shanthint@paydq.com »

Thank You guys.
It is working now.

Post Reply