BRIEF DESCRIPTION: Unable to detect DTMF tones over SIP INFO or rfc4733(pjsip channel driver) and receive information in websocket.
ASTERISK: 20.5.2
CONFIGURATION: We have Asterisk configured to run with ARI(http/websocket) channels. We wish to create a context for routing calls to specific endpoints to a dial plan where we can detect DTMF tones on either channel(two-way) using WAITEXTEN(). To do this, based on the Asterisk Documentation we have configured the dial plan as below to Answer() the call, Store the incoming Channel_ID, Dial() the target extension, Store the outgoing Channel_ID, Bridge() the 2 Channel_IDs and then Waitexten(300). We wish to force this call to be bridged over either ‘native_rtp’ or ‘simple_bridging’ as we understand both these modes puts Asterisk in the Media path(RTP) or Signaling path(SIP INFO) and would then enable use to detect DTMF tones. The test SIP client we are using supports rfc2833 or SIP INFO. We have pjsip channel drivers managing SIP so, we elected to enable dtmf_mode=info and also configured direct_media=no in pjsip.conf.
Our objective is to bridge calls(using contexts and dial plans) through Asterisk and then have Asterisk detect ChannelDTMFReceived and post the event in the ARI websocket connection. We can listen for these events and react as desired.
ADDITIONAL: We tested IVRDemo and it detects DTMF tones just fine.
REQUEST: Can someone advise us based on out configuration below, what we could be doing wrong? Thanks in advance.
SNAPSHOT: ( Dialplan)
exten => 3000,1,NoOp(Starting call handling for extension 1234) ;just log a message that call has been initiated
same => n,Answer() ;Answer the incoming call
same => n,Set(CALLER_CHANNEL=${CHANNEL(channel)});Save the caller’s channel ID
;same => n,Dial(Local/2500@default)
same => n,Dial(PJSIP/user2) ;
same => 2500,1,NoOp(Redirecting the call to extension no. 2500) ; If the call to the target SIP channel is answered, create a bridge and add both the channels
same => n,GotoIf($[“${DIALSTATUS}” = “ANSWER”]?bridge:hangup)
same => n(bridge),NoOp(Creating native RTP bridge)
same => n,Set(CHANNEL(bothways)=yes) ;Set both-ways audio if needed
same => n,Bridge(${CALLER_CHANNEL},${CHANNEL(channel)}) ;Bridge the two channels
same => n,Noop( Channels joined Bridge) ;
same => n,Stasis(bridge-dtmf); Start the Stasis application
same => n,WaitExten(60) ;listen for DTMF tones for 5 minutes
same => n,Noop( Wait Exten executed) ; Handle DTMF inputs to destroy the bridge
same => 0,1,NoOp(Received DTMF 0, destroying bridge);log received DTMF ‘1’, destroying bridge
same => 0,n,Hangup(); Hang up after destroying the bridge ;
same => i,1,NoOp(Invalid DTMF, hanging up)
same => i,n,Hangup(); Hangup handling
same => 1(hangup),NoOp(Call was not answered or ended); log call was unanswered
same => n,Hangup();clean up resources