Log to queue_log when a SIP agent connects to Asterisk

At the moment my users connect to the PBX through only a SIP connection using softphones X-Lite / VOP Nano. And im wanting users to remain only having to do that to login, but im also wanting to log into queue_log when they do that. Is there a way to force SIP connections to be logged into queue_log?

We have already a custom script performing actions into the queue_log, and im wanting to add in agent login/logoff time into the log to add that functionality in.

Is it possible? Even a hacky way is ok for now… I just need time and agent id logged in.

Thanks :smile:

A hacky way would be to build a script that will stream the full log and look for the register/unregister messages,

or you can add to chan_sip.c the function that update the queue_log: ast_queue_log where sip changes status (will be easy to find by reading the ast_verbose in this file.

Unfortunately i cannot take the Asterisk server offline to recompile anything, and parsing the full log would be to slow, every day 100mb or so gets added to it, so its fairly big and spread across several rotations.

Is there a way to log only SIP events through the regular logger (not queue)? So i can at least reduce the amount of information it has to trudge through to parse the file.

Anyone have any other ideas?