[Asterisk-Dev] IAX protocol - how do I transfer a call?

Grzegorz Nosek blackfire at metal.art.pl
Thu Nov 20 05:32:50 MST 2003


Hello all

What is the process of transferring a call as seen from the IAX client
perspective? I can see the iax_transfer() call but don't know how to
use it.

To support IAX native transfer, is the procedure similar to the following:
 - establish a call (in/outbound) (say, customer->secretary, secretary
being our IAX client)
 - establish another one (secretary->boss)
 - for blind transfer:
 * wait for IAX_EVENT_ACCEPT (who provides the dialtone that customer
hears? customer's UA, asterisk, secretary, boss..?)
 - for supervised transfer:
 * wait for IAX_EVENT_ANSWER
 * talk with boss (customer put on hold)
 * still can switch back&forth between sessions (ask the customer
something? or am I overdoing it?)
 * if he refuses to take the call, hang up on him and return to customer

 - XXX: some voodoo happens here, with IAX_EVENT_TXREQ
(IAX_EVENT_TRANSFER?) as a starter

 - do I have to get the call from hold? (would be strange but who knows ;)
 - any authentication going on here? Is it the same call that we
established? Is it a new one (customer getting dialtone till the boss
answers or speaks to boss immediately)? Who has to authenticate to whom?
 - hang up on customer and destroy his session (or iax_transfer does
that already?)
 - the same for boss

I'd like to know for sure this is the correct way to implement it (and
certainly get to know the voodoo part) before I get to code it (I
still have some bugs to squash and hopefully
you-the-all-knowing-gurus-yes-you <g> will help me in the meantime).

BTW, I haven't seen much code related to transferring calls in
gnophone (IAX_EVENT_TRANSFER /* we have just been transferred */ seems
to result only in sending a new picture of the caller and there
doesn't seem to be a way to initiate a native transfer)

thanks very much in advance

Grzegorz Nosek




More information about the asterisk-dev mailing list