@@ -1192,6 +1192,7 @@ static int verify_exec(struct ast_channel *chan, const char *data)
1192
1192
int curl , method , extendtrust , allowtoken , sanitychecks , threshold , blacklist_failopen ;
1193
1193
char name [AST_MAX_CONTEXT ], verifyrequest [PATH_MAX ], verifycontext [AST_MAX_CONTEXT ], local_var [AST_MAX_CONTEXT ], stirshaken_var [AST_MAX_CONTEXT ], remote_stirshaken_var [AST_MAX_CONTEXT ], remote_var [AST_MAX_CONTEXT ], via_remote_var [AST_MAX_CONTEXT ], token_remote_var [AST_MAX_CONTEXT ], validatetokenrequest [PATH_MAX ], code_good [PATH_MAX ], code_fail [PATH_MAX ], code_spoof [PATH_MAX ], exceptioncontext [PATH_MAX ], setinvars [PATH_MAX ], failgroup [PATH_MAX ], failureaction [PATH_MAX ], failurefile [PATH_MAX ], failurelocation [PATH_MAX ], successregex [PATH_MAX ], blacklist_endpoint [PATH_MAX ], loglevel [AST_MAX_CONTEXT ], logmsg [PATH_MAX ];
1194
1194
float blacklist_threshold ;
1195
+ char via [64 ] = { 0 };
1195
1196
1196
1197
AST_DECLARE_APP_ARGS (args ,
1197
1198
AST_APP_ARG (profile );
@@ -1397,7 +1398,6 @@ static int verify_exec(struct ast_channel *chan, const char *data)
1397
1398
}
1398
1399
} else { /* reverse */
1399
1400
char remote_result [64 ] = { 0 };
1400
- char via [64 ] = { 0 };
1401
1401
char peerip [50 ]; /* more than the max IP address size */
1402
1402
char * dialstring , * peer ;
1403
1403
char ip [50 ];
@@ -1559,11 +1559,19 @@ static int verify_exec(struct ast_channel *chan, const char *data)
1559
1559
}
1560
1560
success : /* only as a branch, if we fall through to here, that doesn't necessarily mean success */
1561
1561
verify_set_var (chan , local_var , vresult );
1562
- ast_verb (3 , "Verification result for %s (%s) is '%s' (SUCCESS)\n" , callerid , name , vresult ? vresult : "(null)" );
1562
+ if (viaverify ) {
1563
+ ast_verb (3 , "Verification result for %s (%s, via %s) is '%s' (SUCCESS)\n" , callerid , name , via , vresult ? vresult : "(null)" );
1564
+ } else {
1565
+ ast_verb (3 , "Verification result for %s (%s) is '%s' (SUCCESS)\n" , callerid , name , vresult ? vresult : "(null)" );
1566
+ }
1563
1567
goto done ;
1564
1568
fail :
1565
1569
verify_set_var (chan , local_var , viaverify ? code_spoof : code_fail );
1566
- ast_verb (3 , "Verification result for %s (%s) is '%s' (FAILURE)\n" , callerid , name , viaverify ? (* code_spoof ? code_spoof : "(null)" ) : (* code_fail ? code_fail : "(null)" ));
1570
+ if (viaverify ) {
1571
+ ast_verb (3 , "Verification result for %s (%s, via %s) is '%s' (FAILURE)\n" , callerid , name , via , viaverify ? (* code_spoof ? code_spoof : "(null)" ) : (* code_fail ? code_fail : "(null)" ));
1572
+ } else {
1573
+ ast_verb (3 , "Verification result for %s (%s) is '%s' (FAILURE)\n" , callerid , name , viaverify ? (* code_spoof ? code_spoof : "(null)" ) : (* code_fail ? code_fail : "(null)" ));
1574
+ }
1567
1575
}
1568
1576
1569
1577
done :
0 commit comments