Allow the use of immediate=yes with PRI
authorMartin Pycko <martinp@digium.com>
Thu, 8 May 2003 16:31:58 +0000 (16:31 +0000)
committerMartin Pycko <martinp@digium.com>
Thu, 8 May 2003 16:31:58 +0000 (16:31 +0000)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@981 65c4cc65-6c06-0410-ace0-fbb531ad65f3

channels/chan_zap.c

index 9036afa..53ac338 100755 (executable)
@@ -5547,8 +5547,11 @@ static void *pri_dchannel(void *vpri)
                                                        strcpy(pri->pvt[chan]->callerid, "");
                                                strncpy(pri->pvt[chan]->rdnis, e->ring.redirectingnum, sizeof(pri->pvt[chan]->rdnis));
                                        }
+                                       /* If immediate=yes go to s|1 */
+                                       if (pri->pvt[chan]->immediate)
+                                               strcpy(pri->pvt[chan]->exten, "s");
                                        /* Get called number */
-                                       if (strlen(e->ring.callednum)) {
+                                       else if (strlen(e->ring.callednum)) {
                                                strncpy(pri->pvt[chan]->exten, e->ring.callednum, sizeof(pri->pvt[chan]->exten)-1);
                                        } 
 #if 0