Debugging ARI apps and mixing bridge with DTMF events

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hello,

I've been using ARI for a few months to build some basic apps with some success - I definitely like the interface!

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.

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.

The testing app flow is very similar to some of the ari-py examples, and goes like this:

1 - Run the app using ari-py
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:
client.channels.originate(app='appname',appArgs='incoming',endpoint='PJSIP/<cellphone_1>@<working_dtmf_trunk>')
3 - In on_start in the app for the 'incoming' channel, put the channel into a bridge created with:
client.bridges.create(type='mixing,dtmf_events')
and then originate a channel to another phone using the other trunk set up with a different dtmf_mode:
client.channels.originate(app='appname',appArgs='outgoing',endpoint='PJSIP/<cellphone_2>@<bad_dtmf_trunk>')
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

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:

client.bridges.create(type='mixing')

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.

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.

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?

I am using Asterisk 12.6.0 compiled from source.  I would greatly appreciate any tips - thank you so much in advance.

Best,

Nick


_______________________________________________
asterisk-app-dev mailing list
asterisk-app-dev@xxxxxxxxxxxxxxxx
http://lists.digium.com/cgi-bin/mailman/listinfo/asterisk-app-dev

[Index of Archives]     [Asterisk SS7]     [Asterisk Announcements]     [Asterisk Users]     [PJ SIP]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Linux API]

  Powered by Linux