stasis_channels.c: Don't set channel snapshot caller_dnid twice.
authorRichard Mudgett <rmudgett@digium.com>
Fri, 8 Dec 2017 18:04:25 +0000 (12:04 -0600)
committerRichard Mudgett <rmudgett@digium.com>
Mon, 11 Dec 2017 20:14:57 +0000 (14:14 -0600)
Change-Id: Ib8d45bbdfbda81e65045f6dff874d189b74e5471

main/stasis_channels.c

index b81dbe5..293db06 100644 (file)
@@ -236,22 +236,24 @@ struct ast_channel_snapshot *ast_channel_snapshot_create(struct ast_channel *cha
                S_COR(ast_channel_caller(chan)->id.name.valid, ast_channel_caller(chan)->id.name.str, ""));
        ast_string_field_set(snapshot, caller_number,
                S_COR(ast_channel_caller(chan)->id.number.valid, ast_channel_caller(chan)->id.number.str, ""));
-       ast_string_field_set(snapshot, caller_dnid, S_OR(ast_channel_dialed(chan)->number.str, ""));
        ast_string_field_set(snapshot, caller_subaddr,
                S_COR(ast_channel_caller(chan)->id.subaddress.valid, ast_channel_caller(chan)->id.subaddress.str, ""));
-       ast_string_field_set(snapshot, dialed_subaddr,
-               S_COR(ast_channel_dialed(chan)->subaddress.valid, ast_channel_dialed(chan)->subaddress.str, ""));
        ast_string_field_set(snapshot, caller_ani,
                S_COR(ast_channel_caller(chan)->ani.number.valid, ast_channel_caller(chan)->ani.number.str, ""));
+
        ast_string_field_set(snapshot, caller_rdnis,
                S_COR(ast_channel_redirecting(chan)->from.number.valid, ast_channel_redirecting(chan)->from.number.str, ""));
+
        ast_string_field_set(snapshot, caller_dnid,
                S_OR(ast_channel_dialed(chan)->number.str, ""));
+       ast_string_field_set(snapshot, dialed_subaddr,
+               S_COR(ast_channel_dialed(chan)->subaddress.valid, ast_channel_dialed(chan)->subaddress.str, ""));
 
        ast_string_field_set(snapshot, connected_name,
                S_COR(ast_channel_connected(chan)->id.name.valid, ast_channel_connected(chan)->id.name.str, ""));
        ast_string_field_set(snapshot, connected_number,
                S_COR(ast_channel_connected(chan)->id.number.valid, ast_channel_connected(chan)->id.number.str, ""));
+
        ast_string_field_set(snapshot, language, ast_channel_language(chan));
 
        if ((bridge = ast_channel_get_bridge(chan))) {