<div dir="ltr">Hello,<div><br></div><div>I've been using ARI for a few months to build some basic apps with some success - I definitely like the interface!<br><br></div><div>Lately I've run into an issue that I'm not sure how to solve, and I wanted to ask about best ways to debug.  I'm still a little new to Asterisk in general, so I apologize in advance if I'm missing something simple.<br><br></div><div>Right now I'm trying to build a simple app to test the registration of DTMF events over a specific trunk that doesn't use rfc4733 for dtmf_mode - they only support rfc2833 and sip-info.  I figured out by looking at the source of res/res_pjsip/pjsip_configuration.c that I can set dmtf_mode=info on my endpoint in pjsip.conf (I had trouble finding documentation on this - is there somewhere I can look for more info about dtmf_mode?), so I'm hoping that this will work for me.  I didn't see the option to use rfc2833 with pjsip.<br><br></div><div>The testing app flow is very similar to some of the ari-py examples, and goes like this:<br><br></div><div>1 - Run the app using ari-py<br></div><div>2 - Originate a call to my cell phone over a trunk that I know works with the default dtmf_mode, and send to the app:<br></div><div>client.channels.originate(app='appname',appArgs='incoming',endpoint='PJSIP/<cellphone_1>@<working_dtmf_trunk>')<br></div><div>3 - In on_start in the app for the 'incoming' channel, put the channel into a bridge created with:<br>client.bridges.create(type='mixing,dtmf_events')<br></div><div>and then originate a channel to another phone using the other trunk set up with a different dtmf_mode:<br>client.channels.originate(app='appname',appArgs='outgoing',endpoint='PJSIP/<cellphone_2>@<bad_dtmf_trunk>')<br></div><div>4 - In on_start in the app for the 'outgoing' channel I add the channel to the same mixing bridge, and register a function to the ChannelDtmfReceived event<br><br></div><div>Everything works fine if I send the 'outgoing' channel over <working_dtmf_trunk>:  the cellphones are connected successfully (I can hear audio from one to the other) and my function registered to ChannelDtmfReceived successfully gets triggered when I press keys on cellphone_2.  The cellphones are also successfully connected when using <bad_dtmf_trunk> for the 'outgoing' channel, when I use a bridge created with:<br></div><div><br>client.bridges.create(type='mixing')<br><br></div><div>Of course in this case the dtmf events are not captured.  Here's where I'm stuck: when I use 'mixing,dtmf_events' for the bridge to connect the 'outgoing' channel over <bad_dtmf_trunk>, the phones do not seem to be successfully connected.  The second cellphone rings and I can answer the call, but I can't hear audio between the phones and my  function registered to ChannelDtmfReceived is never triggered.<br><br></div><div>Am I missing something fundamental with what I'm trying to do here?  I'm happy to post my pjsip.conf if you think my issue might lie there.  If everything looks good I can try working with support at this specific trunk, but I want to make sure the issue isn't on my end before pursuing that.<br><br></div><div>Separately from the specifics of this example, what's the right way to debug these sorts of issues?  I've tried checking /var/log/asterisk/messages, setting up logs with cel_custom.conf, watching the CLI while I try to test  - I haven't yet found the right way to get any more visibility into why it's not working.  At this point I'm considering capturing packets to investigate it, but I feel like there must be a better way. Also, is there an easy way to dump to a log all events that flow through an ARI application, and not just ones I've registered functions to in the app itself?<br></div><div><br></div><div>I am using Asterisk 12.6.0 compiled from source.  I would greatly appreciate any tips - thank you so much in advance.<br><br></div><div>Best,<br></div><div><br></div><div>Nick<br></div><div><br><br></div>
</div>