[Voiceglue] Passing called and calling party number via URL parameters
Archie Cobbs
archie at dellroad.org
Thu Jan 29 16:01:25 EST 2009
FYI,
Attached is a somewhat hacky patch I'm using to pass the calling and called
party numbers from voiceglue to the VXML script via URL parameters. This is
what Voxeo does and it's very convenient, because you can write apache
redirects, etc., based on this information before the VXML script even
starts.
I know nothing about perl so this is as far as I got. To be correct, the
patch should be completed to
1. More properly integrate the new URL parameters with any existing
parameters (i.e., change '?' to '&'); and
2. Properly URL-escape any funky characters in the parameter values.
It would be nice to get a completed version of this patch into the next
release.
Thanks,
-Archie
--
Archie L. Cobbs
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.voiceglue.org/pipermail/voiceglue/attachments/20090129/f354d3af/attachment.html
-------------- next part --------------
--- voiceglue_0.8.orig/voiceglue/voiceglue 2008-08-14 16:20:37.000000000 -0500
+++ voiceglue_0.8/voiceglue/voiceglue 2009-01-29 14:42:46.000000000 -0600
@@ -1082,7 +1082,7 @@
{
my ($ctmsg) = shift (@_);
my ($callid, $perl_fh, $c_fh, $fh_spec, $call_handle);
- my ($ok, $msg, $url, $dnis, $hangup_msg, $r);
+ my ($ok, $msg, $url, $dnis, $ani, $hangup_msg, $r);
## Refresh the DNIS->URL mapping if necessary
if (! (($ok, $msg) = parse_urlfile())[0])
@@ -1112,6 +1112,10 @@
return;
};
+ ## Append caller and calling party number as URL parameters XXX: URL-encode
+ $ani = $ctmsg->{Satc::ANI};
+ $url = $url . "?session.callerid=" . $ani . "&session.calledid=" . $dnis;
+
## Create a new descriptor pair to communicate with a new VXML thread
$perl_fh = "::PERL_VXML_" . $callid;
$c_fh = "::C_VXML_" . $callid;
More information about the Voiceglue
mailing list