<div dir="ltr"><div>Thanks for your help.  This is all running on amazon AWS so perhaps I do have NAT issues. However, if that's the case I don't get why media flows when I don't add 'dtmf_events' to the bridge type, and why it works when I do have that bridge type with both sides using the working trunk.  Is it because asterisk detects different dtmf modes between the two outside endpoints and only then tries to have media flow through itself on our network?<br></div><div><br>Here's my pjsip.conf:<br><br>[simpletrans]<br>type=transport<br>protocol=udp<br>bind=0.0.0.0<br><br>[workingdtmftrunk]<br>type=auth<br>auth_type=userpass<br>password=<password><br>username=<username><br>realm=<a href="http://sip.flowroute.com">sip.flowroute.com</a><br><br>[workingdtmftrunk]<br>type=aor<br>contact=sip:<a href="http://sip.flowroute.com">sip.flowroute.com</a><br><br>[workingdtmftrunk]<br>type=registration<br>transport=simpletrans<br>outbound_auth=workingdtmftrunk<br>server_uri=sip:<a href="http://sip.flowroute.com">sip.flowroute.com</a><br>client_uri=sip:<username>@<a href="http://sip.flowroute.com">sip.flowroute.com</a><br>contact_user=<user><br>retry_interval=60<br><br>[workingdtmftrunk]<br>type=endpoint<br>context=inbound<br>disallow=all<br>allow=ulaw<br>allow=g729<br>transport=simpletrans<br>outbound_auth=workingdtmftrunk<br>aors=workingdtmftrunk<br><br>[workingdtmftrunk]<br>type=identify<br>endpoint=workingdtmftrunk<br>match=<a href="http://sip.flowroute.com">sip.flowroute.com</a><br><br>[baddtmftrunk]<br>type=aor<br>contact=sip:<ip><br><br>[baddtmftrunk]<br>type=endpoint<br>disallow=all<br>allow=ulaw<br>transport=simpletrans<br>aors=baddtmftrunk<br>dtmf_mode=info<br></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Thu, Oct 16, 2014 at 10:27 AM, Joshua Colp <span dir="ltr"><<a href="mailto:jcolp@digium.com" target="_blank">jcolp@digium.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Nick Horelik wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Hello,<br>
</blockquote>
<br>
Kia ora,<span class=""><br>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
I've been using ARI for a few months to build some basic apps with some<br>
success - I definitely like the interface!<br>
</blockquote>
<br></span>
Glad to hear it! If there's any improvements you can think of don't hesitate to make them known. It's important to get feedback from people actually using it.<span class=""><br>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Lately I've run into an issue that I'm not sure how to solve, and I<br>
wanted to ask about best ways to debug.  I'm still a little new to<br>
Asterisk in general, so I apologize in advance if I'm missing something<br>
simple.<br>
<br>
Right now I'm trying to build a simple app to test the registration of<br>
DTMF events over a specific trunk that doesn't use rfc4733 for dtmf_mode<br>
- they only support rfc2833 and sip-info.  I figured out by looking at<br>
the source of res/res_pjsip/pjsip_<u></u>configuration.c that I can set<br>
dmtf_mode=info on my endpoint in pjsip.conf (I had trouble finding<br>
documentation on this - is there somewhere I can look for more info<br>
about dtmf_mode?), so I'm hoping that this will work for me.  I didn't<br>
see the option to use rfc2833 with pjsip.<br>
</blockquote>
<br></span>
The rfc4733 option is rfc2833 pretty much, you can use that without any problem.<br>
<br>
<snip><span class=""><br>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
Everything works fine if I send the 'outgoing' channel over<br>
<working_dtmf_trunk>:  the cellphones are connected successfully (I can<br>
hear audio from one to the other) and my function registered to<br>
ChannelDtmfReceived successfully gets triggered when I press keys on<br>
cellphone_2.  The cellphones are also successfully connected when using<br>
<bad_dtmf_trunk> for the 'outgoing' channel, when I use a bridge created<br>
with:<br>
<br>
client.bridges.create(type='<u></u>mixing')<br>
<br>
Of course in this case the dtmf events are not captured.  Here's where<br>
I'm stuck: when I use 'mixing,dtmf_events' for the bridge to connect the<br>
'outgoing' channel over <bad_dtmf_trunk>, the phones do not seem to be<br>
successfully connected.  The second cellphone rings and I can answer the<br>
call, but I can't hear audio between the phones and my function<br>
registered to ChannelDtmfReceived is never triggered.<br>
<br>
Am I missing something fundamental with what I'm trying to do here?  I'm<br>
happy to post my pjsip.conf if you think my issue might lie there.  If<br>
everything looks good I can try working with support at this specific<br>
trunk, but I want to make sure the issue isn't on my end before pursuing<br>
that.<br>
</blockquote>
<br></span>
I don't think you are having an ARI problem, it sounds like you are having a NAT issue. Are you behind one by chance? For reliable media flow there's extra configuration and port forwarding that should occur. If it doesn't then you'll get exactly that behavior. In the working case Asterisk will, by default, have media flow directly between both sides which if they are both public and outside your network will have it work. Your pjsip.conf would also provide a better glimpse into the exact setup.<span class=""><br>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
Separately from the specifics of this example, what's the right way to<br>
debug these sorts of issues?  I've tried checking<br>
/var/log/asterisk/messages, setting up logs with cel_custom.conf,<br>
watching the CLI while I try to test - I haven't yet found the right way<br>
to get any more visibility into why it's not working.  At this point I'm<br>
considering capturing packets to investigate it, but I feel like there<br>
must be a better way. Also, is there an easy way to dump to a log all<br>
events that flow through an ARI application, and not just ones I've<br>
registered functions to in the app itself?<br>
</blockquote>
<br></span>
A packet capture and looking at the SIP signaling + SDP is the easiest way for no media flow scenarios.<br>
<br>
Cheers,<span class="HOEnZb"><font color="#888888"><br>
<br>
-- <br>
Joshua Colp<br>
Digium, Inc. | Senior Software Developer<br>
445 Jan Davis Drive NW - Huntsville, AL 35806 - US<br>
Check us out at: <a href="http://www.digium.com" target="_blank">www.digium.com</a> & <a href="http://www.asterisk.org" target="_blank">www.asterisk.org</a><br>
<br>
______________________________<u></u>_________________<br>
asterisk-app-dev mailing list<br>
<a href="mailto:asterisk-app-dev@lists.digium.com" target="_blank">asterisk-app-dev@lists.digium.<u></u>com</a><br>
<a href="http://lists.digium.com/cgi-bin/mailman/listinfo/asterisk-app-dev" target="_blank">http://lists.digium.com/cgi-<u></u>bin/mailman/listinfo/asterisk-<u></u>app-dev</a><br>
</font></span></blockquote></div><br><br clear="all"><br>-- <br>774.208.2168
</div>