Re: [asterisk-users] Problem with the DB() function (Ira)

2019-03-03 Thread Stefan Viljoen
>So the new install is coming along. I hooked up the new box for a couple of 
>hours and got a bunch more problems worked out. And yet some still remain. I 
>have this subroutine I call occasionally:
>.
>.
>.
>Also, when I installed asterisk it did not set itself up to start when the 
>machine boots. Is there something else I need to do?  It's the most recent 
>Fedora.

If you're on the latest Fedora you're probably using systemd for init and 
startup / control of background functions.

On Centos7, to get Asterisk to start up with the system on boot I do the 
following as root:

# cd /etc/systemd/system

# vim asterisk.service

- In this file, then put

---

[Unit]
Description=Asterisk
After=network.target
After=network-online.target
After=startup.service
After=mysql.service
Wants=mysql.service

[Service]
Type=idle
User=root
Group=root
ExecStart=/usr/sbin/asterisk -f
ExecStop=/usr/sbin/asterisk -rx 'core stop now'
ExecReload=/usr/sbin/asterisk -rx 'core reload'
TimeoutSec=300

LimitCORE=infinity
LimitNOFILE=16384
Restart=always
RestartSec=5

[Install]
WantedBy=multi-user.target 

---

# systemctl enable asterisk.service

Now, on reboot, systemd should start up asterisk for you.

Hope this helps.

Stefan


-- 
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

Check out the new Asterisk community forum at: https://community.asterisk.org/

New to Asterisk? Start here:
  https://wiki.asterisk.org/wiki/display/AST/Getting+Started

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users

Re: [asterisk-users] Problem with the DB() function

2019-03-03 Thread Ira
Hello Jean-Denis,

Sunday, March 3, 2019, 11:28:02 AM, you wrote:

>> But the third line which should print those 80 characters back to the screen 
>> prints an empty string.  What might I be doing wrong. It's worked from 
>> version 2 or 3 through 13 but it seems to be broken in 16.

> This looks correct to me, and should be working with asterisk-16: could
> you paste the console output with verbose=3?

>> Also, when I installed asterisk it did not set itself up to start when the 
>> machine boots. Is there something else I need to do?  It's the most recent 
>> Fedora.

> The service manager in Fedora 29 is systemd: you probably need to
> install the unit file, see asterisk-16.2.1/contrib/systemd/

Thank you so much for the answer. I'm jumping on a plane in an hour and I'll 
let you know what I find out when I return.

The db() stuff is baffling. I wonder if when I copied over the old 
asterisk.conf it now tries to put the database in a folder that doesn't exist 
or it doesn't have permissions for. Another thing to check when I return.

-- Ira 


-- 
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

Check out the new Asterisk community forum at: https://community.asterisk.org/

New to Asterisk? Start here:
  https://wiki.asterisk.org/wiki/display/AST/Getting+Started

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users

Re: [asterisk-users] Problem with the DB() function

2019-03-03 Thread Jean-Denis Girard
Le 02/03/2019 à 18:10, Ira a écrit :
> exten => 1,1,set(DB(forwards/calls)=${home_in})
>same => n,set(DB(forwards/number)=1)
>same => n,verbose(${DB(forwards/calls)})
>same => n,return
> 
> I can see the code running on the console and it prints out the first line 
> with  ${home_in} replaced with the expected 80 or so characters that variable 
> contains.
> 
> But the third line which should print those 80 characters back to the screen 
> prints an empty string.  What might I be doing wrong. It's worked from 
> version 2 or 3 through 13 but it seems to be broken in 16.

This looks correct to me, and should be working with asterisk-16: could
you paste the console output with verbose=3?

> Also, when I installed asterisk it did not set itself up to start when the 
> machine boots. Is there something else I need to do?  It's the most recent 
> Fedora.

The service manager in Fedora 29 is systemd: you probably need to
install the unit file, see asterisk-16.2.1/contrib/systemd/


Best regards,
-- 
Jean-Denis Girard

SysNux   Systèmes   Linux   en   Polynésie  française
https://www.sysnux.pf/   Tél: +689 40.50.10.40 / GSM: +689 87.797.527



signature.asc
Description: OpenPGP digital signature
-- 
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

Check out the new Asterisk community forum at: https://community.asterisk.org/

New to Asterisk? Start here:
  https://wiki.asterisk.org/wiki/display/AST/Getting+Started

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users