attendant transfer

本文详细介绍了Asterisk系统的配置方法,包括如何设置电话会议、拖放转移功能及特殊保持扩展等内容。通过具体实例展示了宏定义、上下文环境变量的应用等关键配置步骤。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

Hello. For my work very important to realize in fop attendant transfer
functionality.
Here is my confs:
op_server.cfg
[general]
..........................................................................
; meetme.conf
[rooms]
conf => 900
conf => 901
conf => 902
;
; extensions.conf
;[conferences]
;exten => 900,1,MeetMe(900)
;exten => 901,1,MeetMe(901)
;exten => 902,1,MeetMe(902)
;conference_context=conferences

; Meetme room numbers to use for barge in. The room number must match
; the extension number (see above).
barge_rooms=900-902

; When doing barge ins, you can make the 3rd party to start
; the meetme muted, so the other parties wont notice they are
; now being monitored
barge_muted=0

; Formatting of the callerid field
; where 'x' is a number
clid_format=(xxx)xxx-xxxx

; If you want not to show the callerid on the buttons, set this
; to one
clid_privacy=0

; To display the ip address of sip or iax peer inside the button
; set this to 1
show_ip=0

......................................................................
; If set to 1, you will transfer the linked channel instead
; of the current channel when you drag the icon on a button
reverse_transfer=0

; If enabled, it will not ask forthe  security code
; when performing a click to dial
clicktodial_insecure=0

; Enable select box with absolutetimeout for the call after
; a transfer is performed within the panel
transfer_timeout= "1,1 minute"

...........................................................
; Attendant transfers. If this parameters are uncomented, then
; barge in functionality will be replaced with attendant transfers
;
; You will need to specify special meetme extensions and another
; special hold extension. Attendant trasnfer will use the barge_rooms
; and conference_context specified above to handle the mixing via meetme
; The meetme extensions should add a priority 10 like this one:
;
;[conferences]
;exten => 901,1,Meetme(901|qMAx)
;exten => 901,2,Hangup
;exten => 901,10,Meetme(901|qMx)
;exten => 901,11,Hangup

;exten => 8765,1,MusicOnHold


attendant_hold_extension = 8765 attendant_hold_context = conferences

; When attendant transfer fails to originate the call to the destination
; you can specify a custom failure redirect with the parameter
; attendant_failure_redirect_to. For example, you can redirect
; the call to voicemail if the attendant fails. If this parameter is commented
; the call will be bridged back to the transferrer. In this example, if you
; try to transfer to extension 100 and it fails, the call will be transferred
; to 6100 instead (where you can have the voicemail app, or anything else,
; maybe a queue, etc).

;attendant_failure_redirect_to = 6${EXTEN}@${CONTEXT}

; You can have panel contexts with their own
; button layout and configuration. The following entry
; will create a context called sip with a different
; security code. In the online documentation you will
; find how to use contexts
;
;[sip]
;security_code=djdjdi43
;web_hostname=www.virtualwebserver.com
;flash_dir=/var/www/virtualwebserver/html/panel
;barge_rooms=800-802
;conference_context=otherconferences
;transfer_timeout="0,No timeout|60,1 minute"
;voicemail_extension=1000@xxxx
;language=es


op_buttons.cfg

[SIP/12]              ; Channel name
Position=1            ; Button number in the console
Label="Sawaa"        ; Text label for the button
Extension=12          ; Extension to reach that channel
Context=office          ; Context where that extension is defined
Icon=1                ; There are 6 icons available
No_Rectangle=0        ; Optional: If enabled, it will not draw the button


[SIP/14] ; Channel name Position=2 ; Button number in the console Label="Olegg" ; Text label for the button Extension=14 ; Extension to reach that channel Context=office ; Context where that extension is defined Icon=1 ; There are 6 icons available No_Rectangle=0 ; Optional: If enabled, it will not draw the button


[IAX2/vit_iax] ; Channel name Position=3 ; Button number in the console Label="Vitalyy" ; Text label for the button Extension=13 ; Extension to reach that channel Context=office ; Context where that extension is defined Icon=3 ; There are 6 icons available No_Rectangle=0 ; Optional: If enabled, it will not draw the button

[IAX2/dima_iax]              ; Channel name
Position=4            ; Button number in the console
Label="Dimaa"        ; Text label for the button
Extension=11          ; Extension to reach that channel
Context=office          ; Context where that extension is defined
Icon=3                ; There are 6 icons available
No_Rectangle=0        ; Optional: If enabled, it will not draw the button


[Zap/1] Position=10 Label="External" Extension=-1 Icon=4


and configs for asterisk:

extensions.conf

[macro-stdexten];
;
; Standard extension macro:
;   ${ARG1} - Extension  (we could have used ${MACRO_EXTEN} here as well
;   ${ARG2} - Device(s) to ring
exten => s,1,Dial(${ARG2},60,mtT)                  ; Ring the
interface, 20 seconds maximum
exten => s,2,Goto(s-${DIALSTATUS},1)            ; Jump based on status
(NOANSWER,BUSY,CHANUNAVAIL,CONGESTION,ANSWER)

exten => s-NOANSWER,1,playtones(busy)
exten => s-NOANSWER,2,busy(10)


exten => _s-.,1,Goto(s-NOANSWER,1) ; Treat anything else as no answer

exten => 8765,1,MusicOnHold


[office]; Наш локальный контекст. Правила набора внутри офиса.

;При наборе номера 11 вызываеться макрос stdexten в который передается
имя и номер звонящего.
exten => 11,1,GotoIf($["${EXTEN}" = "${CALLERIDNUM}"]?3)
exten => 11,2,Macro(stdexten,11,IAX2/dima_iax)
exten => 11,3,Hangup
;exten => IAX2/dima_iax,1,Goto(11|1)

exten => 12,1,GotoIf($["${EXTEN}" = "${CALLERIDNUM}"]?3)
exten => 12,2,Macro(stdexten,12,SIP/12)
exten => 12,3,Hangup
;exten => SIP/12,1,Goto(12|1)

exten => 13,1,GotoIf($["${EXTEN}" = "${CALLERIDNUM}"]?3)
exten => 13,2,Macro(stdexten,13,IAX2/vit_iax)
exten => 13,3,Hangup
;exten => IAX2/vit_iax,1,Goto(13|1)

exten => 14,1,GotoIf($["${EXTEN}" = "${CALLERIDNUM}"]?3)
;exten => 14,2,
exten => 14,2,Macro(stdexten,14,SIP/14)
exten => 14,3,Hangup
;exten => SIP/14,1,Goto(14|1)



exten => 901,1,Meetme(901|qMAx)
exten => 901,2,Hangup
exten => 901,10,Meetme(901|qMx)
exten => 901,11,Hangup

exten => 900,1,Meetme(900|qMAx)
exten => 900,2,Hangup
exten => 900,10,Meetme(900|qMx)
exten => 900,11,Hangup

exten => 902,1,Meetme(902|qMAx)
exten => 902,2,Hangup
exten => 902,10,Meetme(902|qMx)
exten => 902,11,Hangup

exten => 8765,1,MusicOnHold



include => parkedcalls
include => confs-dynamic
include => out-center
include => gorod
include => conferences

[confs-dynamic]
exten => 500, 1,MeetMe(|MD)


[generic-inc] exten => s,1,Wait(1) exten => s,2,Answer()


exten => i,1,Goto(s,4)


exten => s,3,Dial(SIP/14&SIP/12&IAX2/vit_iax&IAX2/dima_iax,,rt) exten => s,4,Hangup

exten => t,1,Goto(s,4)

[gorod]


exten => 99,1,Answer exten => 99,2,SIPDtmfMode(inband) exten => 99,3, Set(TIMEOUT(digit)=3) exten => 99,4,ChanIsAvail(ZAP/1|j) exten => 99,5,Playtones(dial) exten => 99,6,waitexten()

exten => _.,1,Dial(ZAP/1/${EXTEN},,tT)
exten => _.,2,Hangup



exten => 99,105,Playtones(busy)
exten => 99,106,Busy(10)


exten => h,1,Playtones(busy) exten => h,2,Busy(10)

exten => t,1,Playtones(busy)
exten => t,2,Busy(10)


exten => i,1,Playtones(busy) exten => i,2,Busy(10)



[conferences]


exten => 901,1,Meetme(901|qMAx) exten => 901,2,Hangup exten => 901,10,Meetme(901|qMx) exten => 901,11,Hangup

exten => 900,1,Meetme(900|qMAx)
exten => 900,2,Hangup
exten => 900,10,Meetme(900|qMx)
exten => 900,11,Hangup

exten => 902,1,Meetme(902|qMAx)
exten => 902,2,Hangup
exten => 902,10,Meetme(902|qMx)
exten => 902,11,Hangup

exten => 8765,1,MusicOnHold

include => office





With this configs attended transfer dont work:
To peform the attendant transfer, you have to drag the destination
phone into your own. Everything else will be fairly automatic:

1) You and the person you were talkin to are redirected into a
conference room
2) The person you were talking to is redirected to a special hold
extension
in step 2...peson is hangup.
I call from 12 to vit_iax, and try transfer call from vit_iax to 14;
Here the logs from asterisk:


-- Executing GotoIf("SIP/12-8126", "0?3") in new stack -- Executing Macro("SIP/12-8126", "stdexten|13|IAX2/vit_iax") in new stack -- Executing Dial("SIP/12-8126", "IAX2/vit_iax|60|mtT") in new stack -- Called vit_iax -- Started music on hold, class 'default', on SIP/12-8126 Sep 22 13:36:00 WARNING[19891]: interface.c:215 decodeMP3: Junk at the beginning of frame 49443303 -- Call accepted by 192.168.0.66 (format ulaw) -- Format for call is ulaw -- IAX2/vit_iax-3 is ringing -- IAX2/vit_iax-3 answered SIP/12-8126 -- Stopped music on hold on SIP/12-8126 == Spawn extension (macro-stdexten, s, -1) exited non-zero on 'SIP/12-8126' in macro 'stdexten' == Spawn extension (macro-stdexten, s, -1) exited non-zero on 'SIP/12-8126' == Auto fallthrough, channel 'SIP/12-8126' status is 'ANSWER' -- Executing MeetMe("IAX2/vit_iax-3", "900|qMAx") in new stack == Parsing '/etc/asterisk/meetme.conf': Found -- Created MeetMe conference 1023 for conference '900' -- Started music on hold, class 'default', on IAX2/vit_iax-3 Sep 22 13:36:06 WARNING[19895]: interface.c:215 decodeMP3: Junk at the beginning of frame 49443303 > Channel SIP/14-3cbe was answered. -- Executing MeetMe("SIP/14-3cbe", "900|qMAx") in new stack -- Stopped music on hold on IAX2/vit_iax-3 == Spawn extension (office, 900, 1) exited non-zero on 'IAX2/vit_iax-3' -- Executing PlayTones("IAX2/vit_iax-3", "busy") in new stack -- Executing Busy("IAX2/vit_iax-3", "10") in new stack == Spawn extension (office, h, 2) exited non-zero on 'IAX2/vit_iax-3' -- Started music on hold, class 'default', on SIP/14-3cbe Sep 22 13:36:13 WARNING[19901]: interface.c:215 decodeMP3: Junk at the beginning of frame 49443303 -- Hungup 'IAX2/vit_iax-3' == Manager 'brubus' logged off from 192.168.0.1 -- Stopped music on hold on SIP/14-3cbe -- Hungup 'Zap/pseudo-1818832623' == Spawn extension (office, 900, 1) exited non-zero on 'SIP/14-3cbe' -- Executing PlayTones("SIP/14-3cbe", "busy") in new stack -- Executing Busy("SIP/14-3cbe", "10") in new stack == Spawn extension (office, h, 2) exited non-zero on 'SIP/14-3cbe'

 
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值