Код: Выделить всё
[incoming]
exten => 1,1,Set(__FOO=${CHANNEL})
exten => 1,n,Dial(SIP/200,30,G(g100^go^1))
[g100]
exten => go,1,Goto(play_customer,1)
exten => go,n,Goto(play_operator,1)
exten => play_customer,1,Noop(${FOO})
exten => play_customer,n,Wait(200)
exten => play_customer,n,Hangup()
exten => play_customer,n(play),Playback(hello-world)
exten => play_customer,n,Playback(hello-world)
exten => play_customer,n,Noop(${SHARED(operator)})
exten => play_customer,n,Bridge(${SHARED(operator)})
exten =>play_operator,1,Noop(${FOO})
exten =>play_operator,n,Playback(good-evening)
exten =>play_operator,n,Set(SHARED(operator,${FOO})=${CHANNEL})
exten =>play_operator,n,ChannelRedirect(${FOO},g100,play_customer,play)
exten =>play_operator,n,Wait(200)
exten =>play_operator,n,Hangup()