[Freeswitch-users] DAHDI Dial 9 Receiving Setup Acknowledge

Ryan Wagoner rswagoner at gmail.com
Mon Sep 14 12:46:21 PDT 2009


I have a Toshiba PBX connected via a QSIG PRI to Asterisk. I can make
calls from the Toshiba to Asterisk and internal calls from Asterisk to
the Toshiba. What I can't do is make an call with an outside
destination from Asterisk to the Toshiba. The Toshiba is looking for 9
to grab an outside line then it expects to see the 10 digits. In the
FreePBX dial plan I use 9|. which sends 9 plus the 10 digit number.

Using Wireshark to look at the QSIG commands coming from a Sangoma
wanpipemon trace I see the following for an Asterisk to Toshiba
internal call.

Asterisk -> SETUP
Toshiba -> CALL PROCESSING
Toshiba -> CONNECT
Asterisk -> CONNECT ACKNOWLEDGE

However when trying to dial 9 + number I received the following

Asterisk -> SETUP
Toshiba -> SETUP ACKNOWLEDGE

Looking at http://tools.ietf.org/html/rfc4497 I see the following

   On receipt of a QSIG SETUP message containing no Sending complete
   information element and a number in the Called party number
   information element that the gateway cannot determine to be complete,
   the gateway SHALL send back a QSIG SETUP ACKNOWLEDGE message, start
   QSIG timer T302, and await further number digits.

   Otherwise, the gateway SHALL wait for more digits
   to arrive in QSIG INFORMATION messages.

Looking in the chan_dahdi.c code I see

                        case PRI_EVENT_SETUP_ACK:
                                chanpos = pri_find_principle(pri,
e->setup_ack.channel);
                                if (chanpos < 0) {
                                        ast_log(LOG_WARNING, "Received
SETUP_ACKNOWLEDGE on unconfigured channel %d/%d span %d\n",

PRI_SPAN(e->setup_ack.channel), PRI_CHANNEL(e->setup_ack.channel),
pri->span);
                                } else {
                                        chanpos =
pri_fixup_principle(pri, chanpos, e->setup_ack.call);
                                        if (chanpos > -1) {

ast_mutex_lock(&pri->pvts[chanpos]->lock);

pri->pvts[chanpos]->setup_ack = 1;
                                                /* Send any queued digits */
                                                for (x = 0;x <
strlen(pri->pvts[chanpos]->dialdest); x++) {
                                                        ast_debug(1,
"Sending pending digit '%c'\n", pri->pvts[chanpos]->dialdest[x]);

pri_information(pri->pri, pri->pvts[chanpos]->call,

pri->pvts[chanpos]->dialdest[x]);
                                                }

ast_mutex_unlock(&pri->pvts[chanpos]->lock);
                                        } else
                                                ast_log(LOG_WARNING,
"Unable to move channel %d!\n", e->setup_ack.channel);
                                }
                                break;

How do I get Asterisk to queue these digits so DAHDI can send them in
response to the SETUP ACKNOWLEDGE message. What should be happening is
Asterisk sends 9 via the SETUP message, waits for the SETUP
ACKNOWLEDGE, then send the 10 digits number via a INFORMATION message.

Ryan




More information about the FreeSWITCH-users mailing list