Hello Everybody!
I’ve installed asterisk 1.6 in two server.
I have a remote asterisk box that register itself as an extension to a local box.
The remote box can place calls throgh the local box’s extensions with the Dial command, and
it can call-screening to the caller using the “M” option (Macro).
The remote box accepts incoming calls from the local box,
put them on hold, and then dial an extension to the local box.
When the called local party press the dtmf ‘1’, it answers the call from the remote party.
Remote asterisk create two sip channels, one for the remote caller and one for the local extension called,
then bridge them for the entire duration of the conversation.
I wonder if it’s possible to avoid the call bridging and arbitrary transfer or merge
the two channels, without hangup the called, when the called press the ‘1’ dtmf.
I’ve already tried the command “Transfer” that sends a SIP REFER and it works ok as a blind remote transfer,
but it seems it can’t be used to replace the active bridged channels.
Thanks…
Here is an example of the extensions.conf that i have in the remote asterisk box:
- “sip.conf”:
; incomings
context=from-asterisklocal
; section of the register command
register => user:pass@sip.asterisklocal.com:5060/user
; definition of the second asterisk box
[asterisklocal]
type=friend
username=user
secret=pass
host=sip.asterisklocal.com
port=5060
canreinvite=no
- “extensions.conf”:
; incoming calls
[from-asterisklocal]
exten => user,1,Answer()
exten => user,n,Dial(SIP/200@asterisklocal,10,M(callscreen))
exten => user,n,Hangup
; macro call-screening
[macro-callscreen]
exten => s,1,Answer()
exten => s,n,Background(transferer-number)
exten => 1,1,Set(MACRO_RESULT=) ; continue with the calls when the macro ends
exten => 2,1,Set(MACRO_RESULT=BUSY) ; signal BUSY and hangup the called