# How can I capture CLI log messages Asterisk 13 with PJSIP

**URL:** <https://community.asterisk.org/t/how-can-i-capture-cli-log-messages-asterisk-13-with-pjsip/83609>\
**Category:** Asterisk Support\
**Created:** [April 16, 2020, 2:29am UTC](https://community.asterisk.org/t/how-can-i-capture-cli-log-messages-asterisk-13-with-pjsip/83609 "2020-04-16T02:29:21Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![lmoraes](https://avatars.discourse-cdn.com/v4/letter/l/90ced4/32.png) [@lmoraes](https://community.asterisk.org/u/lmoraes)\
**Post date:** [April 16, 2020, 2:29am UTC](https://community.asterisk.org/t/how-can-i-capture-cli-log-messages-asterisk-13-with-pjsip/83609/1 "2020-04-16T02:29:21Z")

</div>

I am trying to save the data of CLI console captured when I access ‘asterisk -rvvv’ command.

I tried got it setting the verbose, debug and history log and nothing save the data of calls and connection in the file.

In this pic show what I would like to capture in the log messages.

 ![image](https://global.discourse-cdn.com/asterisk/original/2X/2/279bab921a4b1e557facee9ac65b1e97bec02aa3.png)

---

<div class="post-metadata">

**Author:** ![ambiorixg12](https://sea1.discourse-cdn.com/asterisk/user_avatar/community.asterisk.org/ambiorixg12/32/1887_2.png) [@ambiorixg12](https://community.asterisk.org/u/ambiorixg12)\
**Post date:** [April 16, 2020, 2:39am UTC](https://community.asterisk.org/t/how-can-i-capture-cli-log-messages-asterisk-13-with-pjsip/83609/2 "2020-04-16T02:39:20Z")

</div>

logs are saved on _/var/log/asterisk/full_ you can control what it is saved on /etc/asterisk/logger.conf

---

<div class="post-metadata">

**Author:** ![lmoraes](https://avatars.discourse-cdn.com/v4/letter/l/90ced4/32.png) [@lmoraes](https://community.asterisk.org/u/lmoraes)\
**Post date:** [April 16, 2020, 10:17am UTC](https://community.asterisk.org/t/how-can-i-capture-cli-log-messages-asterisk-13-with-pjsip/83609/3 "2020-04-16T10:17:37Z")

</div>

Thanks ambiorxg12 but I am with all this logs actived and didn’t log what I need, as example the calls flow logs neither when en endpoint become reachable/unreachable.

---

<div class="post-metadata">

**Author:** ![ambiorixg12](https://sea1.discourse-cdn.com/asterisk/user_avatar/community.asterisk.org/ambiorixg12/32/1887_2.png) [@ambiorixg12](https://community.asterisk.org/u/ambiorixg12)\
**Post date:** [April 16, 2020, 12:53pm UTC](https://community.asterisk.org/t/how-can-i-capture-cli-log-messages-asterisk-13-with-pjsip/83609/4 "2020-04-16T12:53:06Z")

</div>

> [@lmoraes](#):
>
> when en endpoint become reachable/unreachable.

That it is also logged , if Asterisk is told to do it

---

<div class="post-metadata">

**Author:** ![lmoraes](https://avatars.discourse-cdn.com/v4/letter/l/90ced4/32.png) [@lmoraes](https://community.asterisk.org/u/lmoraes)\
**Post date:** [April 16, 2020, 1:05pm UTC](https://community.asterisk.org/t/how-can-i-capture-cli-log-messages-asterisk-13-with-pjsip/83609/5 "2020-04-16T13:05:07Z")

</div>

There is no in my case because my logger.conf file show it:

debug =\> debug  
verbose =\> verbose  
console =\> notice,warning,error,debug  
messages =\> notice,warning,error  
full =\> notice,warning,error,verbose,dtmf,fax

“full” should log all these contents.

---

<div class="post-metadata">

**Author:** ![ambiorixg12](https://sea1.discourse-cdn.com/asterisk/user_avatar/community.asterisk.org/ambiorixg12/32/1887_2.png) [@ambiorixg12](https://community.asterisk.org/u/ambiorixg12)\
**Post date:** [April 16, 2020, 1:16pm UTC](https://community.asterisk.org/t/how-can-i-capture-cli-log-messages-asterisk-13-with-pjsip/83609/6 "2020-04-16T13:16:44Z")

</div>

logs are saved based on category of the warning for example

notice,  
warning,  
error  
Different to chan\_sip I see on pjsip the aor contact update seems to be only console message, If this is the case you could check if this action generate an AMI event and create your own log file based on that

---

<div class="post-metadata">

**Author:** ![lmoraes](https://avatars.discourse-cdn.com/v4/letter/l/90ced4/32.png) [@lmoraes](https://community.asterisk.org/u/lmoraes)\
**Post date:** [April 16, 2020, 3:06pm UTC](https://community.asterisk.org/t/how-can-i-capture-cli-log-messages-asterisk-13-with-pjsip/83609/7 "2020-04-16T15:06:28Z")

</div>

how you can see in my last messages it’s in a category, but I just send a part of the block.

The issue is that SIP messages are not logged.

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/asterisk/original/2X/4/475d0c889911cfb84ac4881ad6df8b523e3f9105.png) [@system](https://community.asterisk.org/u/system)\
**Post date:** [May 16, 2020, 3:06pm UTC](https://community.asterisk.org/t/how-can-i-capture-cli-log-messages-asterisk-13-with-pjsip/83609/8 "2020-05-16T15:06:37Z")

</div>

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.
