Hey,
Outgoing phones work perfect.
Incoming phones work perfect. For a while.
It's like after some time, the incoming calls are 'blocked'. My providers (WeePee) server says that the number isn't registered.
But when i trigger an outgoing call, the incoming calls are working again.
Is there somewhere a kind of timeout that needs to be retriggered?
HI brononius ,
is a bug registred on asterisk forum about this.
https://issues.asterisk.org/jira/browse/ASTERISK-19720
But no solution so far for the bug at asterisk... :(
Maybe i should create a small script that performs an outgoing call each time the server boots?
This way the line will be registred?
Okay, maybe not as it should be, but this is a temporary workaround... :-X
I've created a 'respond to event'.
Criteria
- Day of the week: 1,2,3,4,5,6,7
- Time of day: 6:55
Commands: Asterisk - PBX Application
- application: ring
- Number: 01990
This will automaticlly calls each day in the morning a number of my provider. The number gives me information about the latest caller.
I specially choose this number since it will automaticlly kill the call once it gave the information (+/- 10sec). And of course because it's a free number.
Of course, it would be nicer that it only calls once (if the line went down, if the server rebooted). But i couldn't figure out how i can trace that with 'respond to events'. So for the moment, a daily call should do it...
But if somebody could tell me how i could it elseway, glad...
I've improved this workaround a bit. No longer with 'timed event', but with a real service restart check:
Intro: When LinuxMCE is restarted, the SIP provider isn't regristed anymore. You need to place 1 outgoing call, and then it's solved. Of course, when you reload the router (=restart the linuxmce service), then you need to replace an outside phonecall.
Since it's a bit hard to keep this in mind for the rest of your life, i've added a kind of check script. This script is placed in the crontab, and checks each x-minutes if the service 'asterisk' has been restarted. If it isn't, it does nothing. If it is, i'll place a file into /var/spool/asterisk/outgoing and will call this number.
In this example below, change 0123456789 with your external number. I've put my own phonenumber in here. So it's just initate the call, and drops it after 1 second.
more /scripts/sys_call_outside_org.call
Channel: Local/0123456789@trusted
WaitTime: 1
Context: outgoing
Extension: 200
Priority: 1
more /scripts/sys_call_check.sh
#!/bin/bash
if tail -20 /var/log/asterisk/full | grep "chan_sip.c: SIP channel loading"
then
: # colon is a null and is required
#Run Script to launch an outgoing call
sudo /scripts/sys_call_launch.sh
#Add additional log files"
echo "[""$(date +%h)" "$(date +%d)" "$(date +%T)""]" "The service for Asterisk has been apparantly been restarted." >> /var/log/asterisk/full
echo "[""$(date +%h)" "$(date +%d)" "$(date +%T)""]" "The script '/script/sys_call_check.sh' launched a outgoing call" >> /var/log/asterisk/full
echo "[""$(date +%h)" "$(date +%d)" "$(date +%T)""]" "Systemcall was initiated." >> /var/log/asterisk/full
echo "[""$(date +%h)" "$(date +%d)" "$(date +%T)""]" "Systemcall was initiated..." >> /var/log/asterisk/full
echo "[""$(date +%h)" "$(date +%d)" "$(date +%T)""]" "Systemcall was initiated...." >> /var/log/asterisk/full
echo "[""$(date +%h)" "$(date +%d)" "$(date +%T)""]" "Systemcall was initiated....." >> /var/log/asterisk/full
echo "[""$(date +%h)" "$(date +%d)" "$(date +%T)""]" "Systemcall was initiated......" >> /var/log/asterisk/full
echo "[""$(date +%h)" "$(date +%d)" "$(date +%T)""]" "Systemcall was initiated......." >> /var/log/asterisk/full
echo "[""$(date +%h)" "$(date +%d)" "$(date +%T)""]" "Systemcall was initiated........" >> /var/log/asterisk/full
echo "[""$(date +%h)" "$(date +%d)" "$(date +%T)""]" "Systemcall was initiated........." >> /var/log/asterisk/full
echo "[""$(date +%h)" "$(date +%d)" "$(date +%T)""]" "Systemcall was initiated.........." >> /var/log/asterisk/full
echo "[""$(date +%h)" "$(date +%d)" "$(date +%T)""]" "Systemcall was initiated..........." >> /var/log/asterisk/full
echo "[""$(date +%h)" "$(date +%d)" "$(date +%T)""]" "Systemcall was initiated............" >> /var/log/asterisk/full
echo "[""$(date +%h)" "$(date +%d)" "$(date +%T)""]" "Systemcall was initiated............." >> /var/log/asterisk/full
echo "[""$(date +%h)" "$(date +%d)" "$(date +%T)""]" "Systemcall was initiated.............." >> /var/log/asterisk/full
echo "[""$(date +%h)" "$(date +%d)" "$(date +%T)""]" "Systemcall was initiated..............." >> /var/log/asterisk/full
echo "[""$(date +%h)" "$(date +%d)" "$(date +%T)""]" "Systemcall was initiated................" >> /var/log/asterisk/full
else
echo "[""$(date +%h)" "$(date +%d)" "$(date +%T)""]" "The script '/script/sys_call_check.sh' has nothing to do..." >> /var/log/asterisk/full
fi
if tail -100 /var/log/pluto/18_Asterisk.log | grep "Got a reload command from 0"
then
: # colon is a null and is required
#Run Script to launch an outgoing call
sudo /scripts/sys_call_launch.sh
#Add additional log files"
echo "[""$(date +%h)" "$(date +%d)" "$(date +%T)""]" "Asterisk has been apparantly been restarted by Linxumce." >> /var/log/asterisk/full
echo "[""$(date +%h)" "$(date +%d)" "$(date +%T)""]" "The script '/script/sys_call_check.sh' launched a outgoing call" >> /var/log/asterisk/full
echo "[""$(date +%h)" "$(date +%d)" "$(date +%T)""]" "The script '/script/sys_call_check.sh' launched a outgoing call" >> /var/log/pluto/18_Asterisk
.log
echo "[""$(date +%h)" "$(date +%d)" "$(date +%T)""]" "Systemcall was initiated." >> /var/log/pluto/18_Asterisk.log
echo "[""$(date +%h)" "$(date +%d)" "$(date +%T)""]" "Systemcall was initiated.." >> /var/log/pluto/18_Asterisk.log
echo "[""$(date +%h)" "$(date +%d)" "$(date +%T)""]" "Systemcall was initiated..." >> /var/log/pluto/18_Asterisk.log
echo "[""$(date +%h)" "$(date +%d)" "$(date +%T)""]" "Systemcall was initiated...." >> /var/log/pluto/18_Asterisk.log
echo "[""$(date +%h)" "$(date +%d)" "$(date +%T)""]" "Systemcall was initiated....." >> /var/log/pluto/18_Asterisk.log
echo "[""$(date +%h)" "$(date +%d)" "$(date +%T)""]" "Systemcall was initiated......" >> /var/log/pluto/18_Asterisk.log
echo "[""$(date +%h)" "$(date +%d)" "$(date +%T)""]" "Systemcall was initiated......." >> /var/log/pluto/18_Asterisk.log
echo "[""$(date +%h)" "$(date +%d)" "$(date +%T)""]" "Systemcall was initiated........" >> /var/log/pluto/18_Asterisk.log
echo "[""$(date +%h)" "$(date +%d)" "$(date +%T)""]" "Systemcall was initiated........." >> /var/log/pluto/18_Asterisk.log
echo "[""$(date +%h)" "$(date +%d)" "$(date +%T)""]" "Systemcall was initiated.........." >> /var/log/pluto/18_Asterisk.log
echo "[""$(date +%h)" "$(date +%d)" "$(date +%T)""]" "Systemcall was initiated..........." >> /var/log/pluto/18_Asterisk.log
echo "[""$(date +%h)" "$(date +%d)" "$(date +%T)""]" "Systemcall was initiated............" >> /var/log/pluto/18_Asterisk.log
echo "[""$(date +%h)" "$(date +%d)" "$(date +%T)""]" "Systemcall was initiated............." >> /var/log/pluto/18_Asterisk.log
echo "[""$(date +%h)" "$(date +%d)" "$(date +%T)""]" "Systemcall was initiated.............." >> /var/log/pluto/18_Asterisk.log
echo "[""$(date +%h)" "$(date +%d)" "$(date +%T)""]" "Systemcall was initiated..............." >> /var/log/pluto/18_Asterisk.log
echo "[""$(date +%h)" "$(date +%d)" "$(date +%T)""]" "Systemcall was initiated................" >> /var/log/pluto/18_Asterisk.log
echo "[""$(date +%h)" "$(date +%d)" "$(date +%T)""]" "Systemcall was initiated................." >> /var/log/pluto/18_Asterisk.log
echo "[""$(date +%h)" "$(date +%d)" "$(date +%T)""]" "Systemcall was initiated.................." >> /var/log/pluto/18_Asterisk.log
echo "[""$(date +%h)" "$(date +%d)" "$(date +%T)""]" "Systemcall was initiated..................." >> /var/log/pluto/18_Asterisk.log
echo "[""$(date +%h)" "$(date +%d)" "$(date +%T)""]" "Systemcall was initiated...................." >> /var/log/pluto/18_Asterisk.log
echo "[""$(date +%h)" "$(date +%d)" "$(date +%T)""]" "Systemcall was initiated....................." >> /var/log/pluto/18_Asterisk.log
echo "[""$(date +%h)" "$(date +%d)" "$(date +%T)""]" "Systemcall was initiated......................" >> /var/log/pluto/18_Asterisk.log
echo "[""$(date +%h)" "$(date +%d)" "$(date +%T)""]" "Systemcall was initiated......................." >> /var/log/pluto/18_Asterisk.log
echo "[""$(date +%h)" "$(date +%d)" "$(date +%T)""]" "Systemcall was initiated........................" >> /var/log/pluto/18_Asterisk.log
echo "[""$(date +%h)" "$(date +%d)" "$(date +%T)""]" "Systemcall was initiated........................." >> /var/log/pluto/18_Asterisk.log
echo "[""$(date +%h)" "$(date +%d)" "$(date +%T)""]" "Systemcall was initiated.........................." >> /var/log/pluto/18_Asterisk.log
echo "[""$(date +%h)" "$(date +%d)" "$(date +%T)""]" "Systemcall was initiated..........................." >> /var/log/pluto/18_Asterisk.log
echo "[""$(date +%h)" "$(date +%d)" "$(date +%T)""]" "Systemcall was initiated............................" >> /var/log/pluto/18_Asterisk.log
echo "[""$(date +%h)" "$(date +%d)" "$(date +%T)""]" "Systemcall was initiated............................." >> /var/log/pluto/18_Asterisk.log
echo "[""$(date +%h)" "$(date +%d)" "$(date +%T)""]" "Systemcall was initiated.............................." >> /var/log/pluto/18_Asterisk.log
else
echo "[""$(date +%h)" "$(date +%d)" "$(date +%T)""]" "The script '/script/sys_call_check.sh' has nothing to do..." >> /var/log/pluto/18_Asterisk.log
fi
more /scripts/sys_call_launch.sh
#!/bin/bash
sleep 60
cp /scripts/sys_call_outside_org.call /scripts/sys_call_outside.call
mv /scripts/sys_call_outside.call /var/spool/asterisk/outgoing/.
more /etc/crontab
<knip>
*/7 * * * * root /scripts/sys_call_check.sh &> /dev/null
</knip>
Comments to improve this more are of course welcome...