THEROMPSTER2000
asked on
Asterisk DTMF Read digits and dial.
I need to create a listener for asterisk. Basically, only during an active call, the agent can transfer to a predefined number by pressing * or # or any
DTMF tone.
Basically if during a call the agent presses * it will transfer them to a specific number i have predefined.
What i have so far is in the code box.
I would assume it would be something like :
exten => 10,1,Read(digit,,1)
exten => if digit is * then dial (SIP/context/number)
i just dont know the syntax.
DTMF tone.
Basically if during a call the agent presses * it will transfer them to a specific number i have predefined.
What i have so far is in the code box.
I would assume it would be something like :
exten => 10,1,Read(digit,,1)
exten => if digit is * then dial (SIP/context/number)
i just dont know the syntax.
exten => 100,1,Read(digit,,1)
exten => 100,2,Dial(${digit})
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Ok this is what i have in features.conf
transferdigittimeout => 6
[featuremap]
blindxfer=##
atxfer=*2
automon=*1
disconnect=**
how can i do what you mean with the transfer_context, where would i do that?
transferdigittimeout => 6
[featuremap]
blindxfer=##
atxfer=*2
automon=*1
disconnect=**
how can i do what you mean with the transfer_context, where would i do that?
First, you would need to create a new context in the dial plan. Call it, say, [mytransfers]
Then you would set the transfer_context in a step just before the Dial command that sets up the original call. For example:
exten => 123,n,Set(__TRANSFER_CONTE XT=mytrans fers)
exten => 123,n,Dial(...,t)
While the call is active, the execution of the steps in your dial plan is effectively paused, waiting for the Dial command to complete (i.e. it won't return from the Dial command and execute more steps if the call has been established successfully). However, if a caller presses ## or *2 your dial plan should resume execution in the context [mytransfers]. If you want the trigger to be a single key press then edit the blindxfer or atxfer parameters in features.conf.
Then you would set the transfer_context in a step just before the Dial command that sets up the original call. For example:
exten => 123,n,Set(__TRANSFER_CONTE
exten => 123,n,Dial(...,t)
While the call is active, the execution of the steps in your dial plan is effectively paused, waiting for the Dial command to complete (i.e. it won't return from the Dial command and execute more steps if the call has been established successfully). However, if a caller presses ## or *2 your dial plan should resume execution in the context [mytransfers]. If you want the trigger to be a single key press then edit the blindxfer or atxfer parameters in features.conf.
ASKER
Thank you very much your answer guided me in the right direction.
exten => 10,1,Answer()
exten => 10,n,Read(DIALEDDIGIT||1)
exten => 10,n,GotoIf("${DIALEDDIGIT
exten => dialmy,1,Dial(SIP/context/