Asterisk cmd Transfer

來源:互聯網
上載者:User
Transfer Synopsis

 Transfer caller to remote extension

Description

 Transfer([Tech/]dest[|options])

Requests the remote caller be transferred to a given extension.
If TECH (SIP, IAX2, LOCAL etc) is used, only an incoming call with the same channel technology will be transfered.
Note that for SIP, if you transfer before call is setup, a 302 redirect SIP message will be returned to the caller. It is possible to use 302 redirection to load-balance SIP calls among several servers. A patch that fixes a few bugs is here: patch 9483.

The result of the application will be reported in the TRANSFERSTATUS channel variable:

 SUCCESS      Transfer succeeded
 FAILURE      Transfer failed
 UNSUPPORTED  Transfer unsupported by channel driver

The option string many contain the following character:

 'j' — jump to n+101 priority if the channel transfer attempt fails

Olle in Jan 2006: Transfer() is currently the only way to issue an outbound SIP REFER in the dial plan.
The transfer() application sends a REFER, then totally ignores what is happening with the transfer. It does need a total rewrite for all VoIP channels and should propably be considered a bad hack (read more).

For older Asterisk versions that still support priority jumping (1.0, 1.2 if enabled): If the transfer was not supported or successful and there exists a priority n+101, then that priority will be taken next.

Question: Where - except for a SIP REFER - is this application of use, why not simply use Dial(), maybe together with a Local channel?

Answer: For example, a SIP provider offering DIDs, you want calls to go to a colo box and then be transfered to other locations rather then waiting for the DID provider to update routes, by using this you save headaches with 1 way audio due to tracking firewalls not being able to track asyncronious SIP and RTP paths, and call delay if you and the colo are in different countries. Downside to doing something like this is you incur a slightly increase call setup delay while the call is bounced between servers, but no one will ever notice since most people take a few rings to actually answer.
 

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.