Moved AOC request code out of the middle of code parsing the dialed number.
authorRichard Mudgett <rmudgett@digium.com>
Mon, 7 Jun 2010 19:06:55 +0000 (19:06 +0000)
committerRichard Mudgett <rmudgett@digium.com>
Mon, 7 Jun 2010 19:06:55 +0000 (19:06 +0000)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@268734 65c4cc65-6c06-0410-ace0-fbb531ad65f3

channels/sig_pri.c

index e931403..09bd077 100644 (file)
@@ -5854,20 +5854,6 @@ int sig_pri_call(struct sig_pri_chan *p, struct ast_channel *ast, char *rdest, i
                }
                c++;
        }
-#if defined(HAVE_PRI_AOC_EVENTS)
-       if (ast_test_flag(&opts, OPT_AOC_REQUEST)
-               && !ast_strlen_zero(opt_args[OPT_ARG_AOC_REQUEST])) {
-               if (strchr(opt_args[OPT_ARG_AOC_REQUEST], 's')) {
-                       pri_sr_set_aoc_charging_request(sr, PRI_AOC_REQUEST_S);
-               }
-               if (strchr(opt_args[OPT_ARG_AOC_REQUEST], 'd')) {
-                       pri_sr_set_aoc_charging_request(sr, PRI_AOC_REQUEST_D);
-               }
-               if (strchr(opt_args[OPT_ARG_AOC_REQUEST], 'e')) {
-                       pri_sr_set_aoc_charging_request(sr, PRI_AOC_REQUEST_E);
-               }
-       }
-#endif /* defined(HAVE_PRI_AOC_EVENTS) */
 #if defined(HAVE_PRI_SETUP_KEYPAD)
        if (ast_test_flag(&opts, OPT_KEYPAD)
                && !ast_strlen_zero(opt_args[OPT_ARG_KEYPAD])) {
@@ -5892,12 +5878,25 @@ int sig_pri_call(struct sig_pri_chan *p, struct ast_channel *ast, char *rdest, i
                pri_sr_set_called_subaddress(sr, &subaddress);
        }
 #endif /* defined(HAVE_PRI_SUBADDR) */
-
 #if defined(HAVE_PRI_REVERSE_CHARGE)
        if (ast_test_flag(&opts, OPT_REVERSE_CHARGE)) {
                pri_sr_set_reversecharge(sr, PRI_REVERSECHARGE_REQUESTED);
        }
 #endif /* defined(HAVE_PRI_REVERSE_CHARGE) */
+#if defined(HAVE_PRI_AOC_EVENTS)
+       if (ast_test_flag(&opts, OPT_AOC_REQUEST)
+               && !ast_strlen_zero(opt_args[OPT_ARG_AOC_REQUEST])) {
+               if (strchr(opt_args[OPT_ARG_AOC_REQUEST], 's')) {
+                       pri_sr_set_aoc_charging_request(sr, PRI_AOC_REQUEST_S);
+               }
+               if (strchr(opt_args[OPT_ARG_AOC_REQUEST], 'd')) {
+                       pri_sr_set_aoc_charging_request(sr, PRI_AOC_REQUEST_D);
+               }
+               if (strchr(opt_args[OPT_ARG_AOC_REQUEST], 'e')) {
+                       pri_sr_set_aoc_charging_request(sr, PRI_AOC_REQUEST_E);
+               }
+       }
+#endif /* defined(HAVE_PRI_AOC_EVENTS) */
 
        ldp_strip = 0;
        prilocaldialplan = p->pri->localdialplan - 1;