[Asterisk-Dev] Transfer of variables in app_dial

Mike Sturdee sturdee at pathwaynet.com
Fri Apr 23 07:13:04 MST 2004


On Tue, 20 Apr 2004, Olle E. Johansson wrote:

> John Todd wrote:
> > At 6:15 PM +0200 on 4/20/04, Olle E. Johansson wrote:
> >
> >> In some cases, you want channel variables to be transferred from the
> >> caller to the callee.
> >> This works for VXML_URL but not for other channels.
> >>
> >> There's a patch that transfers all variables in
> >> http://bugs.digium.com/bug_view_page.php?bug_id=0000928
> >>
> >> I discussed this with Mark and we agreed upon a solution that we want
> >> feedback
> >> on:
> >>
> >> * Not transfer all variables by default (as in the current patch)
> >> * Transfer all variables that begin with "_" (underscore) once and
> >>   remove the underscore in the new channel leg
> >> * Transfer all variables that begin with "__" (two underscore)
> >>   without removing anything, making it stay even if the new leg
> >>   is transferred to a third leg
> >>
>
> > Hmmm... sounds like a very reasonable plan.  There are two concepts
> > here, of course: the transfer of values within Asterisk during a Local
> > transfer (which I think is already handled by using or not using the /n
> > option in Dial, IIRC) but then there is the more significant and vexing
> > problem of transferring values OUT of a particular server to a remote
> > server.
> >
> Well, this patch takes care of local transfers. To explain to other readers:
>
> When you exec dial() in the dial plan, you're in one call leg. Dial() opens
> another call leg to attach your call to some other device. We now have two
> call legs.
>
> The channel variables you set with setvar is local to the current call
> leg, the caller. Sometimes we want variables to be transferred to the other
> leg, the callee. This patch would handle that.
>
> John brings another topic up for discussion, actually transferring variable
> names and values over the link out of band to the other end. This would be
> very useful when clustering asterisk servers, transferring account codes
> and other variables.
>
> I need a solution like this to handle SIP 302 transfers, to be able to send a
> transfer back to the dial plan again.
>
> /Olle

One other thing that would be useful is the passing of variables from a
caller in a Queue to the agent. At this point, not even the Queue name
itself can be found in a variable, and a uniqueid that follows a call from
Incoming -> Zap -> AA -> Queue -> Agent -> Hangup would be very useful for
CDR purposes.

-Mike

==================================
Network Engineer
Pathway Internet Services
616.774.3131




More information about the asterisk-dev mailing list