Difference between revisions of "Get Asterisk CLI output for specific call"

From Kolmisoft Wiki
Jump to navigationJump to search
Line 5: Line 5:
3. asterisk -vvvvrx 'logger reload'
3. asterisk -vvvvrx 'logger reload'


4. Make a call, remember destination number you dialed
4. Make a call, remembering the destination number you dialed


5. cd /var/log/asterisk/
5. cd /var/log/asterisk/
Line 11: Line 11:
6. cat full | grep <DESTINATION NUMBER YOU DIALED BEFORE>
6. cat full | grep <DESTINATION NUMBER YOU DIALED BEFORE>


You can get a lot of output, look at last line which can look like this:
You can get a lot of output. Look at the last line, which may look like this:


  [Feb 26 16:12:14] NOTICE['''32733]''' app_mor.c: Localized destination: 37063042438 (cut: , add: )
  [Feb 26 16:12:14] NOTICE['''32733]''' app_mor.c: Localized destination: 37063042438 (cut: , add: )
Line 17: Line 17:
The most important part is in BOLD, and in this example it is: 32733]
The most important part is in BOLD, and in this example it is: 32733]


NOTE: that first brackets are not included! This is very important!
NOTE: First brackets are not included! This is very important!


7. Now do:  
7. Now do:  
Line 23: Line 23:
  cat messages | grep 32733]  
  cat messages | grep 32733]  


And you will get output of your call.
... and you will get output of your call.





Revision as of 11:02, 28 April 2010

1. Backup old log: mv /var/log/asterisk/full /var/log/asterisk/full_old

2. Enable full log in /etc/asterisk/logger.conf

3. asterisk -vvvvrx 'logger reload'

4. Make a call, remembering the destination number you dialed

5. cd /var/log/asterisk/

6. cat full | grep <DESTINATION NUMBER YOU DIALED BEFORE>

You can get a lot of output. Look at the last line, which may look like this:

[Feb 26 16:12:14] NOTICE[32733] app_mor.c: Localized destination: 37063042438 (cut: , add: )

The most important part is in BOLD, and in this example it is: 32733]

NOTE: First brackets are not included! This is very important!

7. Now do:

cat messages | grep 32733] 

... and you will get output of your call.




See also