user3882060
user3882060

Reputation: 51

Why i can't able to call python or php code from vxml in asterisk

This is the vxml i wrote and called from asterisk dialplan

record.vxml

<?xml version="1.0" encoding="UTF-8"?>
<vxml version = "2.1">
<form id="top">
    <property name="inputmodes" value="dtmf"/>
    <property name="interdigittimeout" value="2s"/>
    <property name="timeout" value="4s"/>
    <record name="message" beep="true" maxtime="60s" dtmfterm="true">

    </record>
    <block>
        <submit next="asr.agi" enctype="multipart/form-data" method="get"/>
    </block>
</form>

~ in asr.agi file i am just writing on text file to check wheather vxml is calling the file or not. When i dial a number i am able to record my voice but asr.agi file is not able to write on text file both the files are in same directory.

this is my dialplan.

[from-twilio]
exten =>  _+1NXXXXXXXXX,1,Answer(200)
exten =>  _+1NXXXXXXXXX,n,Wait(1)
exten => 
_+1NXXXXXXXXX,n,Voximal(file:///home/ubuntu/voximal/recordAudio/record.vxml)

can anyone please help me. I am using voximal in asterisk.

Upvotes: 1

Views: 355

Answers (3)

Borja SIXTO
Borja SIXTO

Reputation: 119

The multipart/form encryption type is not supported by the GET method, you must use the POST method to generate this HTTP request.

To validate you Python script you can usa an HTML page (with the same request but attaching the file in an HTML/form). By this way you can be sure that you process the request and you have the rigths where you want to write your recording.

Upvotes: 1

Javier
Javier

Reputation: 345

According to https://wiki.voximal.com/doku.php?id=sttproviders:google , voximal supports Google Speech API, check this sample : https://github.com/voximal/voicexml-examples/tree/master/parrot. It must works once the Google API is enabled with a key paramter.

Upvotes: 0

arheops
arheops

Reputation: 15247

Maybe because no such feature in voximal

https://www.voip-info.org/wiki/view/Asterisk+Cmd+Voximal

Upvotes: 0

Related Questions