Mor retrieve peers
From Kolmisoft Wiki
Jump to navigationJump to search
MOR Retrieve Peers
Script mor_retrieve_peers is responsible for updating device status, server_id, and Asterisk version (shown in GUI). Every minute script is executed by cron.
In the case of proxy configuration, the device status is updated by another script 'opensips_device_status'.
Useful information
How to update a script
svn update /usr/src/mor/ami /usr/src/mor/ami/install.sh
Where to check logs
tail -n 50 /var/log/mor/ami_debug.log
How to execute the script manually
/usr/local/mor/mor_retrieve_peers
This will not generate output to the console, only to log file.
Troubleshooting
GUI device status is not updating
- 1. Execute script manually and check if device status is updated
- 2. If not, then check log file (/var/log/mor/ami_debug.log). If you see messages like "Received an error from asterisk: unable to retrieve entire response from server", then Asterisk recompile should fix this issue.
Script mor_retrieve_peers is crashing
- 1. Check if mor_retrieve_peers is the most recent version
svn update /usr/src/mor/ami
if mor_retrieve_peers.c file was updated, then it needs to be recompiled (see 'How to update script')
- 2. Try to execute the script manually
- 3. If the script is crashing when executed manually, use the command ulimit -c unlimited to enabled core dumps and execute script again. Now when the script is executed and crashes, the core dump is created in /usr/local/mor or current working directory. A core dump is usually named 'core.xxxx'. You can debug core dumps with GDB gdb /usr/local/mor/mor_retrieve_peers core.xxxx. GDB should display a line where the script crashed.
- 4. Check /var/log/messages for anything related to "mor_retrieve_peers"
- 5. Report this issue to support/developers