From version 2.1
edited by Simon Morlat
on 2019/04/12 12:12
To version 3.1
edited by Simon Morlat
on 2019/04/12 12:14
Change comment: There is no comment for this version

Summary

Details

Page properties
Content
... ... @@ -44,12 +44,12 @@
44 44  
45 45  = Activating contextual logs at run-time =
46 46  
47 -Since troubleshooting could be necessary at any time on a production system, but restarting the service to have the configuration taking into effect is not an option, it is possible to dynamically change the values of the contextual-log-filter and contextual-log-level properties. The change is temporary: the flexisip.conf configuration file is not modified and after a restart the values from flexisip.conf will be used.
47 +Since troubleshooting could be necessary at any time on a production system, but restarting the service to have the configuration taking into effect is not an option, it is possible to dynamically change the values of the contextual-log-filter and contextual-log-level properties. The change is temporary: the //flexisip.conf// configuration file is not modified and after a restart the values from //flexisip.conf// will be used.
48 48  
49 -To change these values, use the flexisip-cli.py tool (included in flexisip packages). In the following example, we setup a filter to enable logging of everything related to a REGISTER request coming from french phone numbers:
49 +To change these values, use the flexisip-cli.py tool (included in flexisip packages in ///opt/belledonne-communications/bin//). In the following example, we setup a filter to enable logging of everything related to a //REGISTER// request coming from french phone numbers:
50 50  
51 51  {{code language="sh"}}
52 -./scripts/flexisip_cli.py -s proxy CONFIG_SET global/contextual-log-filter request.method == \'REGISTER\' '&&' \(from.uri.user contains \'+33\'\)
52 +flexisip_cli.py -s proxy CONFIG_SET global/contextual-log-filter request.method == \'REGISTER\' '&&' \(from.uri.user contains \'+33\'\)
53 53  {{/code}}
54 54  
55 55  **Pay attention to the escaping:** indeed the shell is interpreting some of the operators used in flexisip's sip boolean expression language. In particular:
... ... @@ -58,7 +58,7 @@
58 58  * operators like '&&', '||' must be surrounded by single quotes to avoid the shell interpreter to process them.
59 59  * parenthesis must be preceded by '\' character.
60 60  
61 -To control that your sip boolean expression has correctly been passed to the server, the flexisip_cli.py displays the expression that was interpreted by the flexisip server:
61 +To control that your sip boolean expression has correctly been passed to the server, //flexisip_cli.py// displays the expression that was interpreted by the flexisip server:
62 62  
63 63  {{code}}
64 64  contextual-log-filter : request.method == 'REGISTER' && (from.uri.user contains '+33')