Update for sendingcomplete
[asterisk/asterisk.git] / channels / chan_zap.c
index 1c1e958..376d5e6 100755 (executable)
@@ -5607,10 +5607,10 @@ 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) {
+                                       /* If immediate=yes or call complete go to s|1 */
+                                       if (pri->pvt[chan]->immediate || e->ring.complete) {
                                                if (option_verbose > 2)
-                                                       ast_verbose(VERBOSE_PREFIX_3 "Going to extension s|1 because of immediate=yes\n");
+                                                       ast_verbose(VERBOSE_PREFIX_3 "Going to extension s|1 because of immediate=yes or Complete received\n");
                                                strcpy(pri->pvt[chan]->exten, "s");
                                        }
                                        /* Get called number */