[Home]

Summary:ASTERISK-02863: [patch] Override native transfers by a dialplan predefined extension
Reporter:ericbart (ericbart)Labels:
Date Opened:2004-11-20 14:25:50.000-0600Date Closed:2011-06-07 14:05:26
Priority:MajorRegression?No
Status:Closed/CompleteComponents:Core/General
Versions:Frequency of
Occurrence
Related
Issues:
Environment:Attachments:( 0) dialplanTransfer.diff
Description:This patch aims to customly override the # transfer or the native IAX transfer by a dialplan app. If the 'X' extension exists in the transferer's context, the tranfer operation is aborted, the bridged call goes on and the 'X' extension is launched. It's up to the 'X' app to unlink the call and make the transfer.

If the 'X' extension does not exist in the transferer's context, the tranfer occurs normally.

This patch also sends a # key when two consecutive #'s are pressed and the first one got catched as a transfer signal.

Other native transfers should be hijackable the same way. I did not work on this.

This solution should not arm existing transfer functions, it may provide a single pbx advanced transfer function for all channel technologies, this patch will be easily maintained if not getting in CVS.

****** ADDITIONAL INFORMATION ******

It also needs an application attached to the 'X' extension. This app could be internal to Asterisk or external.

I provide the external 'axra' program with the 'Transfer' app.
To be downloaded from :
http://byortek.com/asterisk/download

When using the The 'Transfer' app, you make the transfer as usual. You'll get connected to the "transferto" party. Hit # to hear a prompt. Hit 1, 2 or 3 to switch to transferee, transferto or to a conference. Hit # again as needed. If one party hangs up, there's an announcement and the call switch down to a normal call.
Comments:By: Olle Johansson (oej) 2004-11-20 14:55:01.000-0600

Is this patch disclaimed?

(Read the bug guidelines before reporting!)

By: ericbart (ericbart) 2004-11-20 16:49:05.000-0600

I just sent the disclaimer.

By: Brian West (bkw918) 2004-11-20 21:40:51.000-0600

Can you atleast explain this better?  Or provide a full working example?

bkw

By: ericbart (ericbart) 2004-11-21 03:43:54.000-0600

OK. I just hope my grammar won't reward me another -1 karma.  I'm just trying to add some value to the * project (and I did get a  patch in CVS. bug ASTERISK-718). I was feeling like being part of a community, now, this -1 just makes me feel like my mexican over-sensitive ass should go playing elsewhere :(

Suppose A is linked to B (A <-> B). B want to blind transfer A to C.

B will dial the C extension, Asterisk will check that extension and as soon as it's unique and valid, Asterisk will make the blind transfer. The idea of this patch is to hijack the blind transfer at this precise moment.

Instead of letting the blind transfer happen, this patch cancel it. Concurently it creates a local channel and use it to dial a predefined extension (X). This local channel holds within local variables: the A channel, the B channel and the C extension.

(If the predefined extension does not exist in the transferer's context, the default transfer is not hijacked, it goes on normally. So you can disable it for some or for all contexts.)

If the predefined extension exists, it will receive the local channel and should run an application that will unlink the call and make the transfer.

I believe that Asterisk really need an advanced pbx transfer. There was a good one by  anthm bug ASTERISK-2425 but Mark wanted another approach. I believe that this approach is flexible. Just let other people code a transfer application and choose the best, or provide many.

I don't know if other native transfers could be hijacked, but I succeeded for the IAX native blind transfer (as well as the # transfer). New channels could also make use of this dialplan transfer (the function called ast_pbx_transfer()).

The external application I provide is just a demo. It shows that the whole thing works. I'm not promoting it. It's like an agi. I guess that it'll be better to code a native asterisk application for the advanced transfer. You'll put it in the dialplan like this :
exten => X,1,AdvTransfer

Feel free to ask for more information on this. And Bravo for all of you * hackers, oej is making a wonderful work with the wiki.

edited on: 11-21-04 04:51

edited on: 11-21-04 04:53

By: Olle Johansson (oej) 2004-12-13 01:53:35.000-0600

Does this patch still apply? Anyone else interested in this patch? Time for action or closure...

---housekeeping

By: Brian West (bkw918) 2004-12-26 17:21:27.000-0600

No action..