Merged revisions 93250 via svnmerge from
authorJoshua Colp <jcolp@digium.com>
Mon, 17 Dec 2007 18:07:26 +0000 (18:07 +0000)
committerJoshua Colp <jcolp@digium.com>
Mon, 17 Dec 2007 18:07:26 +0000 (18:07 +0000)
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r93250 | file | 2007-12-17 14:05:55 -0400 (Mon, 17 Dec 2007) | 6 lines

If a call is received with a called number IE containing nothing go to the 's' extension.
(closes issue #9099)
Reported by: kb1_kanobe2
Patches:
      20070906__9099.diff.txt uploaded by Corydon76 (license 14)

........

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

channels/chan_zap.c

index 6574bff..75a2360 100644 (file)
@@ -10142,8 +10142,13 @@ static void *pri_dchannel(void *vpri)
                                        else if (!ast_strlen_zero(e->ring.callednum)) {
                                                ast_copy_string(pri->pvts[chanpos]->exten, e->ring.callednum, sizeof(pri->pvts[chanpos]->exten));
                                                ast_copy_string(pri->pvts[chanpos]->dnid, e->ring.callednum, sizeof(pri->pvts[chanpos]->dnid));
-                                       } else
+                                       } else if (pri->overlapdial)
                                                pri->pvts[chanpos]->exten[0] = '\0';
+                                       else {
+                                               /* Some PRI circuits are set up to send _no_ digits.  Handle them as 's'. */
+                                               pri->pvts[chanpos]->exten[0] = 's';
+                                               pri->pvts[chanpos]->exten[1] = '\0';
+                                       }
                                        /* Set DNID on all incoming calls -- even immediate */
                                        if (!ast_strlen_zero(e->ring.callednum))
                                                ast_copy_string(pri->pvts[chanpos]->dnid, e->ring.callednum, sizeof(pri->pvts[chanpos]->dnid));