[Voiceglue] Using the vxml <transfer> tag
Rob Anderson
altogether.elsewhere at gmail.com
Wed Jul 14 10:55:26 UTC 2010
After a day and a half of trying to get the <transfer> tag to work with
Voiceglue I've come up with a fix that works for me. It requires a minor
monkey patch to the voiceglue code to get it to work.
The problem
A vxml transfer tag like this
<transfer dest='some phone number'></transfer>
just didn't work for me. The call immediately hangs up, and Asterisk
reports that it failed to spawn an extension, so I suspect that the problem
lies with my Asterisk installation.
I was also unable to get the TRANSFER command to work in any asterisk
dialplan, which tends to reinforce the above.
After much research I concluded that the TRANSFER command is a little flaky
and hard to understand. DIAL seemed easier to use, and always worked in my
dialplans.
However setting the following in voiceglue.conf
blind_xfer_method = dial
resulted in the error reported here:
http://www.voiceglue.org/pipermail/voiceglue/2009-December/000625.html
Note that I'm trying to transfer the call to an external phone number, which
may explain my problem. In a dialplan, executing DIAL(SIP/my external phone
number) fails as well. To get DIAL to call an external number I needed to
do this: DIAL(Local/some_phone_number at from-internal)
So I tried
<transfer dest="Local/some_phone_number at from-internal"></transfer>
but this failed, and Asterisk reported that we were trying to dial
"SIP/Local/some_phone_number at from-internal". So obviously Voiceglue is
trying to massage the URL a little - commenting out the following code in
voiceglue_0.12/vocieglue/voiceglue (or if you have already installed, in
/usr/bin/voiceglue) did the trick
## Generate the transfer command
$url = $ovximsg->{"url"};
# comment out these lines to allow Local/ to pass through unmolested
# if ($url =~ /^sip:/i)
# {
# $url =~ s/^sip:/sip\//i;
# }
# else
# {
# $url = "sip/" . $url;
# };
$satc_command = {Satc::MSGTYPE => Satc::TRANSFER,
Satc::CALLID => $callid,
Satc::URL => $url,
Satc::FLAG =>
(($::Blind_transfer_method eq "dial") ? 1 : 0)};
This would clearly break things like <transfer dest='1234'></transfer> so I
guess someone better at Perl than me could match the ^local pattern and
leave it alone instead.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.voiceglue.org/pipermail/voiceglue/attachments/20100714/8bbe81bf/attachment.html>
More information about the Voiceglue
mailing list