Merge "res_pjsip: Add option to force G.726 to be treated as AAL2 packed."
authorJoshua Colp <jcolp@digium.com>
Tue, 16 Jun 2015 12:51:30 +0000 (07:51 -0500)
committerGerrit Code Review <gerrit2@gerrit.digium.api>
Tue, 16 Jun 2015 12:51:30 +0000 (07:51 -0500)
funcs/func_pjsip_aor.c
main/cdr.c

index 41c15ff..835955e 100644 (file)
@@ -135,6 +135,8 @@ static int pjsip_aor_function_read(struct ast_channel *chan,
 
                        ast_str_append(buf, len, "%s", ast_sorcery_object_get_id(contact));
                        first = 0;
+
+                       ao2_ref(contact, -1);
                }
                ao2_iterator_destroy(&i);
        } else {
index c1fea78..8d7f53f 100644 (file)
@@ -915,6 +915,14 @@ static struct cdr_object *cdr_object_create_and_append(struct cdr_object *cdr)
        ast_string_field_set(new_cdr, context, cdr_last->context);
        ast_string_field_set(new_cdr, exten, cdr_last->exten);
 
+       /*
+        * If the current CDR says to disable all future ones,
+        * keep the disable chain going
+        */
+       if (ast_test_flag(&cdr_last->flags, AST_CDR_FLAG_DISABLE_ALL)) {
+               ast_set_flag(&new_cdr->flags, AST_CDR_FLAG_DISABLE_ALL);
+       }
+
        /* Copy over other Party A information */
        cdr_object_snapshot_copy(&new_cdr->party_a, &cdr_last->party_a);