New phones aren't activated without reloading asterisk

All installation and configuration problems and questions

Moderators: gerski, enjay, williamconley, Op3r, Staydog, gardo, mflorell, MJCoate, mcargile, Kumba, Michael_N

New phones aren't activated without reloading asterisk

Postby bronson » Sat Jul 15, 2023 9:05 am

Hello,

According to the manual, after creating a new phone we should simply "Click the submit button to create this phone record. After one minute, the phone will be active in the system."

I log in to the server and do 'sip show peers' after one minute but new phones do not show up. In fact after several hours they still do not appear.

I tried doing "Reload dialplan on server" in the Vicidial admin and that also does not activate the new phones.

Whenever we create a new phone on the system, it does not get activated unless I log in to my server and do a 'core restart now' in asterisk.

We're using vici webphone.

My system specs:
ViciBox v.10.0.1 220503
Version: 2.14b0.5
SVN Version: 3612
DB Schema Version: 1662

How do I investigate the issue and fix it so that phones are activated automatically.

Thanks!
bronson
 
Posts: 95
Joined: Thu Oct 14, 2021 10:34 am

Re: New phones aren't activated without reloading asterisk

Postby martinch » Wed Aug 23, 2023 5:15 pm

Oh hey bronson,

It is a weird one. Have you debugged the keep alive by chance? There may be an error in there that may help.
Project Lead @ mDial -> https://github.com/TheBlode/mDial
martinch
 
Posts: 273
Joined: Thu Nov 15, 2018 9:14 am
Location: England, UK

Re: New phones aren't activated without reloading asterisk

Postby carpenox » Wed Aug 23, 2023 9:28 pm

It's a big on v10, add an entry to crontab by typing: crontab -e
Add this at the top:

* * * * * /usr/sbin/asterisk -rx 'sip reload'

Image

Chris
Alma Linux 9.3 | SVN Version: 3822 | DB Schema Version: 1711 | Asterisk 18.18.1
www.dialer.one -:- 1-833-DIALER-1 -:- https://linktr.ee/CyburDial -:- WhatsApp: +19549477572 -:- Skype: live:carpenox_3 | Discord: https://discord.gg/DVktk6smbh
carpenox
 
Posts: 2250
Joined: Wed Apr 08, 2020 2:02 am
Location: St Petersburg, FL

Re: New phones aren't activated without reloading asterisk

Postby bronson » Mon Aug 28, 2023 8:12 am

carpenox wrote:It's a big on v10, add an entry to crontab by typing: crontab -e
Add this at the top:

* * * * * /usr/sbin/asterisk -rx 'sip reload'

Image

Chris


Thanks!
bronson
 
Posts: 95
Joined: Thu Oct 14, 2021 10:34 am

Re: New phones aren't activated without reloading asterisk

Postby kashyapking » Tue Aug 29, 2023 1:56 pm

I dont think to do "sip reload" every minute is good idea, I suggest if you can watch on rebuild_conf_files field on servers table and if it is set to "Y" then you can do "module reload", so it will apply all latest changes to asterisk.
Vicibox10 | Version: 2.14b0.5 | SVN Version: 3743 | DB Schema Version: 1690 | Asterisk Version: 13.38.2-vici
visit us @ https://www.kingasterisk.com | skype: kingasterisk | wa @ +17864142610
kashyapking
 
Posts: 20
Joined: Fri Aug 18, 2023 11:32 am

Re: New phones aren't activated without reloading asterisk

Postby martinch » Sun Sep 03, 2023 2:34 pm

kashyapking makes a good point and that is the correct ViCiDial way of doing sip reload...although I'm not aware of any potential issues off the top of my head with running sip reload every minute via cron but yeah...potentially something could get messed up...I couldn't say but it shouldn't affect live calls though but yeah. Glad it's all sorted though.
Project Lead @ mDial -> https://github.com/TheBlode/mDial
martinch
 
Posts: 273
Joined: Thu Nov 15, 2018 9:14 am
Location: England, UK

Re: New phones aren't activated without reloading asterisk

Postby kashyapking » Thu Sep 07, 2023 3:06 am

martinch wrote:kashyapking makes a good point and that is the correct ViCiDial way of doing sip reload...although I'm not aware of any potential issues off the top of my head with running sip reload every minute via cron but yeah...potentially something could get messed up...I couldn't say but it shouldn't affect live calls though but yeah. Glad it's all sorted though.


Thanks, either we can make some small php script to check and reload sip or we can put command direct via mysql command prompt with cron and do reload, both methods are fine for checking and reload sip.
Vicibox10 | Version: 2.14b0.5 | SVN Version: 3743 | DB Schema Version: 1690 | Asterisk Version: 13.38.2-vici
visit us @ https://www.kingasterisk.com | skype: kingasterisk | wa @ +17864142610
kashyapking
 
Posts: 20
Joined: Fri Aug 18, 2023 11:32 am

Re: New phones aren't activated without reloading asterisk

Postby carpenox » Thu Sep 07, 2023 6:20 am

A PHP script isn't a bad idea, but the MySQL method would kind of be along the same lines as my cronjob. If 1 minute is to much just change the first * (asterisk) to 5 for every 5 minutes or adjust accordingly.

Chris
Alma Linux 9.3 | SVN Version: 3822 | DB Schema Version: 1711 | Asterisk 18.18.1
www.dialer.one -:- 1-833-DIALER-1 -:- https://linktr.ee/CyburDial -:- WhatsApp: +19549477572 -:- Skype: live:carpenox_3 | Discord: https://discord.gg/DVktk6smbh
carpenox
 
Posts: 2250
Joined: Wed Apr 08, 2020 2:02 am
Location: St Petersburg, FL

Re: New phones aren't activated without reloading asterisk

Postby martinch » Sun Sep 10, 2023 4:18 am

I sense some kind of Admin Utility that has a bunch of buttons to do ad-hoc stuff instantly?

  • Reload Configs
  • Restart Asterisk
  • Restart screens
  • etc

Maybe that's overkill but it's an idea that came to mind when reading this thread. Maybe I'll do a proof of concept and post it in Features to see if people vibe with it or not. :)

Either way you slice it, Chris' cronjob or The Reload Config option, you'll get your sips reloaded. :)
Project Lead @ mDial -> https://github.com/TheBlode/mDial
martinch
 
Posts: 273
Joined: Thu Nov 15, 2018 9:14 am
Location: England, UK

Re: New phones aren't activated without reloading asterisk

Postby ccabrera » Tue Sep 19, 2023 3:58 pm

@Bronson,

The problem you refer to usually happens when Asterisk isn't running inside its own screen process, and so the keepalive script can't trigger the reload properly. Maybe Asterisk is running because of the "service asterisk start" command instead of running inside its screen?
Christian Cabrera
Enlaza Comunicaciones - Vicidial Partner
Mexico City
ccabrera
 
Posts: 153
Joined: Fri Jan 14, 2011 7:53 pm
Location: Mexico City

Re: New phones aren't activated without reloading asterisk

Postby bronson » Mon Oct 02, 2023 6:19 am

ccabrera wrote:@Bronson,

The problem you refer to usually happens when Asterisk isn't running inside its own screen process, and so the keepalive script can't trigger the reload properly. Maybe Asterisk is running because of the "service asterisk start" command instead of running inside its screen?


How would I investigate this and resolve?
bronson
 
Posts: 95
Joined: Thu Oct 14, 2021 10:34 am

Re: New phones aren't activated without reloading asterisk

Postby RBecker » Mon Oct 02, 2023 12:03 pm

bronson wrote:
How would I investigate this and resolve?


Run "screen -r". You should get several things returned, one being asterisk and another being astshell. If those aren't listed, Asterisk is running outside of the screen. On ViciBox, you should be using "systemctl restart vicidial" to restart Asterisk and all associated screens.
Managed & Dedicated ViciDial Hosting | VoIP Trunking and Termination | https://www.dial-fusion.com/
Main Cluster: 21 Agent Servers | Dedicated DB and Separate Reports Server | 2 Web Servers | HAProxy Load Balancing | Dedicated Archive Server
RBecker
 
Posts: 42
Joined: Mon Aug 30, 2021 3:05 pm

Re: New phones aren't activated without reloading asterisk

Postby bronson » Wed Jan 10, 2024 4:42 pm

RBecker wrote:
bronson wrote:
How would I investigate this and resolve?


Run "screen -r". You should get several things returned, one being asterisk and another being astshell. If those aren't listed, Asterisk is running outside of the screen. On ViciBox, you should be using "systemctl restart vicidial" to restart Asterisk and all associated screens.


I ran "screen -r" and got this.

Code: Select all
vcc:~ # screen -r
There are several suitable screens on:
        9284.ASTemail   (Detached)
        19151.ASTVDadapt        (Detached)
        4657.ASTVDremote        (Detached)
        17034.ASTVDauto (Detached)
        17031.ASTlisten (Detached)
        17028.ASTsend   (Detached)
        17025.ASTupdate (Detached)
        14914.ASTVDadFILL       (Detached)
        14911.ASTfastlog        (Detached)
Type "screen [-d] -r [pid.]tty.host" to resume one of them.


I didn't see asterisk or astshell so I ran "systemctl restart vicidial" and it shows asterisk and astshell as detached.

Code: Select all
vcc:~ # screen -r
There are several suitable screens on:
        26549.asterisk  (Detached)
        26543.astshell20240110163818    (Detached)
        9284.ASTemail   (Detached)
        19151.ASTVDadapt        (Detached)
        14914.ASTVDadFILL       (Detached)
        14911.ASTfastlog        (Detached)
Type "screen [-d] -r [pid.]tty.host" to resume one of them.


Should this solve the issue?

Also, do I need to run "systemctl restart vicidial" every time I reboot?

Thanks!
bronson
 
Posts: 95
Joined: Thu Oct 14, 2021 10:34 am


Return to Support

Who is online

Users browsing this forum: No registered users and 235 guests