[Asterisk-Dev] IAX protocol - how do I transfer a call?
Mark Spencer
markster at digium.com
Thu Nov 20 08:06:31 MST 2003
there is an IAX_EVENT_TRANSFER which is a blind trasnfer and hten you can
also use TXREQ to handle supervised transfer.
IAX_COMMAND_TRANSFER just executes a blind transfer "send whoever i'm
talking to to extension foo". Note that there is no response, and
processing on the call should continue normally until a HANGUP is
received.
Supervised transfer is more complicated because (unlike SIP), IAX is
designed to be robust against NAT issues. Therefore, when you want to
natively connect to asterisk calls together, you send both sides a TXREQ
to both sides asking them to try to connect with their peers. They each
will send a TXCNT to try to see the other side. If they can see the other
side, it will send them a TXACC to say "yah i saw you", then it sends a
TXREADY back to the iax client trying to make the transfer. When both
sides have sent a TXREADY, a TXREL can be sent which causes them to go
ahead and talk directly to one another. In the mean time, and if for any
reason the sides can't see one another, the iax client in the middle must
continue to handle the transfer.
Mark
On Thu, 20 Nov 2003, Grzegorz Nosek wrote:
> 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
>
> _______________________________________________
> Asterisk-Dev mailing list
> Asterisk-Dev at lists.digium.com
> http://lists.digium.com/mailman/listinfo/asterisk-dev
>
More information about the asterisk-dev
mailing list