login | register
Fri 09 of Jan, 2009 [00:12 UTC]

voip-info.org

Discuss [2] History

Asterisk manager Example: Transfer

Created by: flobi,Last modification on Mon 28 of May, 2007 [20:46 UTC] by vinceval

Asterisk Manager Example: Transfer

Transfer a call to another extension


Let's see what channels we actually have first:
SEND:
ACTION: Command
command: show channels

RECEIVE:
Response: Follows
Channel (Context Extension Pri ) State Appl. Data
SIP/x7065558529-8f54 (pms-x7065558529 1 ) Up Bridged Call SIP/127.180.254.109-44d00f80
SIP/127.180.254.109-44d00f80 (macro-dial_agi_ver.1.0.0 dial_command 1 ) Up Dial SIP/x7062618529
2 active channel(s)
--END COMMAND--

Okay, we'll transfer the first one.
SEND:
ACTION: Redirect
Channel: SIP/x7065558529-8f54
Context: default
Exten: 5558530
Priority: 1

RECEIVE:
Event: Newchannel
Channel: AsyncGoto/SIP/x7065558529-8f54
State: Up
CallerID:
Uniqueid: 1124983982.19260

Event: Rename
Oldname: SIP/x7065558529-8f54
Newname: SIP/x7065558529-8f54
Uniqueid: 1124983885.19259

Event: Rename
Oldname: AsyncGoto/SIP/x7065558529-8f54
Newname: SIP/x7065558529-8f54
Uniqueid: 1124983982.19260

Event: Rename
Oldname: SIP/x7065558529-8f54
Newname: AsyncGoto/SIP/x7065558529-8f54
Uniqueid: 1124983885.19259

Event: Newexten
Channel: SIP/x7065558529-8f54
Context: default
Extension: 5558530
Priority: 1
Application: SetVar
AppData: extension=5558530
Uniqueid: 1124983982.19260


Response: Success
Message: Redirect successful

Replace the Channel value with the channel to transfer, and the Exten value with the number to dial. Of course, you can also do this with ZAP or whatever you like.

Back


Comments

Comments Filter
222

333how identify if multi-channels?

by calmroad, Monday 10 of March, 2008 [12:09:21 UTC]
usually, most phone supports now multiple lines.
for example, 200 calls 300 and then 100 calls 300 while first call holds.
issuing "show channels verbose", we can see 2 channels with same ext. 300.
if user of 300 presses hold button and turns into connection with 200,
HOW we can identify which one is we use transfer?
222

333show channels

by igor25, Tuesday 20 of December, 2005 [17:28:39 UTC]
To have output as shown in show channels sample I have to send command as
command: show channels verbose