]> git.ipfire.org Git - thirdparty/asterisk.git/commitdiff
overlap receiving: automatically send CALL PROCEEDING when dialplan starts
authorAlec L Davis <sivad.a@paradise.net.nz>
Sat, 27 Feb 2010 23:37:16 +0000 (23:37 +0000)
committerAlec L Davis <sivad.a@paradise.net.nz>
Sat, 27 Feb 2010 23:37:16 +0000 (23:37 +0000)
Following Q.931 5.2.4
When the user has determined that sufficient call information has been received the
user shall stop T302 and send CALL PROCEEDING to the network.

Previously timeouts were possible if the dialplan took a long time to issue any
response back to the network.

Verified that our local TELCO also does the same.

(issue #16789)
Reported by: alecdavis
Patches:
      overlap_receiving_trunk.diff.txt uploaded by alecdavis (license 585)
Tested by: alecdavis

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.6.1@249363 65c4cc65-6c06-0410-ace0-fbb531ad65f3

channels/chan_dahdi.c

index 738939bc9bf69933a8831db4ebc6e455322f0d39..51c436ca1c400ab363820ad424d1bb8676bed187 100644 (file)
@@ -6636,7 +6636,20 @@ static void *ss_thread(void *data)
                if (ast_exists_extension(chan, chan->context, exten, 1, p->cid_num)) {
                        /* Start the real PBX */
                        ast_copy_string(chan->exten, exten, sizeof(chan->exten));
-                       if (p->dsp) ast_dsp_digitreset(p->dsp);
+                       if (p->dsp) {
+                               ast_dsp_digitreset(p->dsp);
+                       }
+                       if (p->pri->overlapdial & DAHDI_OVERLAPDIAL_INCOMING) {
+                               if (p->pri->pri) {              
+                                       if (!pri_grab(p, p->pri)) {
+                                               pri_proceeding(p->pri->pri, p->call, PVT_TO_CHANNEL(p), 0);
+                                               p->proceeding = 1;
+                                               pri_rel(p->pri);
+                                       } else {
+                                               ast_log(LOG_WARNING, "Unable to grab PRI on span %d\n", p->span);
+                                       }
+                               }
+                       }
                        dahdi_enable_ec(p);
                        ast_setstate(chan, AST_STATE_RING);
                        res = ast_pbx_run(chan);