Extension not being obeyed using manager redirect

Hello,

I am facing issues redirecting a caller to an outside line (a cellphone) using the manager API and the redirect command. Here’s the flow:

Call comes in to the PBX and goes through the context “customer”, is put to queue and then answered by an agent. Console output looks something like this:

-- Executing [open@customers:4] NoOp("SIP/incoming-00000011", "Finish if_customers_17") in new stack -- Executing [open@customers:5] Queue("SIP/incoming-00000011", "customers,tr,6000") in new stack -- SIP/2001-00000012 connected line has changed. Saving it until answer for SIP/incoming-00000011 -- SIP/2001-00000012 is ringing -- SIP/2001-00000012 connected line has changed. Saving it until answer for SIP/incoming-00000011 -- SIP/2001-00000012 answered SIP/incoming-00000011

So far so good. Now the agent triggers the following command through the HTTP API:

http://localhost:8088/asterisk/mxml?action=redirect&channel=SIP/incoming-00000011&extension=99999999&context=transfer-test2&priority=1[/code]

By triggering this command one should think that the incoming channel will be redirected to extension 99999999 in the context transfer-test2. However, this is not what's happening. Instead, Asterisk tries to redirect the call to the extension "open" in transfer-test2. Granted, the call had been routed to the agent through an extension named "open" in the context "customers", but the above manager command clearly defines extension=99999999, so why wouldn't Asterisk obey this? Note that the manager returns "Success" on the redirect. Here is the console output:

[code]  == Spawn extension (transfer-test2, open, 1) exited non-zero on 'SIP/incoming-00000011'
[Dec 18 13:31:54] WARNING[1455]: pbx.c:4971 __ast_pbx_run: Channel 'SIP/incoming-00000011' sent into invalid extension 'open' in context 'transfer-test2', but no invalid handler

Any help appreciated!

Edit: Using Asterisk 1.8.8.0

Just a shot in the dark because I have never used the web interface.

Have you tried swapping the order of parameters to be … context, extension and priority instead of extension, context, priority?

Thanks for the suggestion!

Yes, I thought of that as well, but it didn’t change anything.

However, I just noticed that I had typed “extension” instead of “exten”, which is the proper syntax for the redirect command. Changing this solved my problem. Thanks again anyway.