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

Valid PHP-based grammar fails. Are GET-style URLs supported?

Questions and answers about IVR programming for Plum DEV

Moderators: admin, support

Post Reply
moshe
Posts: 66
Joined: Wed Aug 15, 2007 5:36 pm
Location: Chicago
Contact:

Valid PHP-based grammar fails. Are GET-style URLs supported?

Post by moshe »

The following URL creates a valid grammar: http://assassin.homeip.net:15338/~moshe ... iator=true
For some reason the I get an error:

Code: Select all

Error creating grammar
received event: error.grammar 
I have tested this grammar and it does work on other (non plumVoice) platforms.

I've run the URL through the SRGS+XML validator and have seen no errors, but that doesn't give me any insight because (IIRC) the SRGS+XML validator web tool only works on inline grammars and gives a false "pass" on independent grammar files.

Right now I'm starting to believe that the grammar element does not support PHP-based grammars or perhaps does not support GET-style URLs.

Any insight would be appreciated.

moshe
Posts: 66
Joined: Wed Aug 15, 2007 5:36 pm
Location: Chicago
Contact:

Not the PHP, but the grammar

Post by moshe »

I've just run some additional tests, and it's clear that the problem isn't with GET style prompts (so far). The problem is that this completely legal grammar doesn't parse.

The grammar validator passes the grammar URL, but then again I get "no errors" encountered even if I enter a bogus URL.

Aha! Figured it out after some errant synapses fired...

Code: Select all

<?xml version="1.0" encoding ="UTF-8"?>
doesn't work for grammars; the encoding attribute crashes the grammar parser! Use

Code: Select all

<?xml version="1.0" encoding ="UTF-8"?>
instead.

Post Reply