Summary:ASTERISK-01282: No DTMF before SIP CONNECT
Reporter:mh720 (mh720)Labels:
Date Opened:2004-03-24 14:00:43.000-0600Date Closed:2011-06-07 14:10:28
Versions:Frequency of
Any UA (tested snom/7960) > Asterisk > SER > cisco_pstn_gw

SIP Calls to 1-800-492-3344 (American Express) gets RTP audio for 30-45 seconds then timeout disconnects.  During the limited connection, DTMF digits pressed on UA are not passed from Asterisk towards the cisco_pstn_gw.  UA's connecting directly to ser > cisco_pstn_gw do not exhibit the same behavior, DMTF works before SIP CONNECT is received.

This seems to be something AMEX is doing to cut their costs,  no q.931 ISDN connect message is sent to the Cisco from the TDM PSTN until *after* their IVR hears a DTMF digit.  

Because the Cisco hasn't yet received q.931 CONNECT, no corresponding SIP CONNECT message is sent back to Asterisk.  Asterisk seems to not want to send rfc2833 until after a SIP CONNECT.

This bug should be repeatable by anyone with an Asterisk > cisco_pstn_gw setup, I've tested with PRI's from 3 different vendors on the cisco_pstn_gw, and the Q.931 ISDN CONNECT message is not presented until after the AMEX IVR picks up and starts speaking and you press a digit to select an option.  This has the effect of rendering calls to AMEX via Asterisk > cisco_pstn_gw impossible, yet calls from UA > cisco_pstn_gw work.


used cisco "debug isdn q931" command to confirm that no Q.931 ISDN CONNECT message is received until after keypress, and ngrep trace to see that no SIP CONNECT message is being sent, unless after a keypress.
Comments:By: Olle Johansson (oej) 2004-03-25 03:00:58.000-0600

Please be more detailed, there's no SIP CONNECT message - so I do not really understand what do you mean? Maybe also attach a SIP DEBUG output so we can see what happens.

If this is early media, we're in an interesting state. I don't know if we're allowed to send DTMF before the call is setup correctly, IE INVITE/200 OK/ACK.
I'm guessing wildly that the amex message is sent as early media here.

Test how it works via an IAX service like IAXtel to see if it behaves differently than going out on your Cisco gw. Just want to know if it works or not that way.

By: mh720 (mh720) 2004-03-25 10:53:01.000-0600

You are correct, I mis-stated the problem.  The Cisco gateway is not sending a the SIP OK to start the call, and eventually Asterisk gives up and times-out the call .  During this time, audio is coming from the PSTN, but I don't know if the RTP going back from Asterisk is ever being set up.  I'm just reporting the problem, seems like other phone numbers could likely exhibit this problem.  I initially also thought early media was somehow involved.

I have no facilities for IAX (no TDM directly on the Asterisk machine), I run a sip only asterisk implementation, so I'm not sure what you are asking me to do.  I'll be happy to set up whatever you need me to test, I just need some guidance.

By: twisted (twisted) 2004-03-25 11:25:19.000-0600

I attempted to duplicate this issue using direct iax2 to termination, sip to iax2 to termination, and can confirm that AMEX is using early media, but I was able to send dtmf to the line BEFORE the call was set up.. This was to perform the test oej was recommending.

By: Olle Johansson (oej) 2004-03-25 11:28:49.000-0600

Doesn't seem like a bug in Asterisk. If I'm wrong, find me or any bug marshal on the IRC channel (or by e-mail) and we'll reopen the bug report.

By: Olle Johansson (oej) 2004-03-25 11:39:22.000-0600

Please see bug ASTERISK-924 - seems like the same problem and it is tagged as "resolved" in there.

By: Olle Johansson (oej) 2004-03-25 11:39:50.000-0600

---just wanted to add that reference for the archives--