VoIP Mailing List Archives
Mailing list archives for the VoIP community |
|
View previous topic :: View next topic |
Author |
Message |
cursor at telecomabmex... Guest
|
Posted: Wed Jul 13, 2016 4:49 pm Post subject: [asterisk-users] PJSIP defaults for endpoints when using rea |
|
|
Until Asterisk 11 I could use sip.conf to set defaults for all
phones (language, dtmf, vmexten, etc) and just leave many fields in the
database as NULL. What would be the proper way to do this for Asterisk
13 and PJSIP?
--
Telecomunicaciones Abiertas de México S.A. de C.V.
Carlos Chávez
+52 (55)9116-91161
--
_____________________________________________________________________
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
New to Asterisk? Join us for a live introductory webinar every Thurs:
http://www.asterisk.org/hello
asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
http://lists.digium.com/mailman/listinfo/asterisk-users |
|
Back to top |
|
|
annusfictus at gmail.com Guest
|
Posted: Thu Jul 14, 2016 7:18 am Post subject: [asterisk-users] PJSIP defaults for endpoints when using rea |
|
|
with templates.
Regards
El 13/07/2016 a las 23:49, Carlos Chavez escribió:
Quote: | Until Asterisk 11 I could use sip.conf to set defaults for all
phones (language, dtmf, vmexten, etc) and just leave many fields in
the database as NULL. What would be the proper way to do this for
Asterisk 13 and PJSIP?
|
--
_____________________________________________________________________
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
New to Asterisk? Join us for a live introductory webinar every Thurs:
http://www.asterisk.org/hello
asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
http://lists.digium.com/mailman/listinfo/asterisk-users |
|
Back to top |
|
|
jcolp at digium.com Guest
|
Posted: Thu Jul 14, 2016 7:21 am Post subject: [asterisk-users] PJSIP defaults for endpoints when using rea |
|
|
Carlos Chavez wrote:
Quote: | Until Asterisk 11 I could use sip.conf to set defaults for all phones
(language, dtmf, vmexten, etc) and just leave many fields in the
database as NULL. What would be the proper way to do this for Asterisk
13 and PJSIP?
|
Kia ora,
PJSIP doesn't have the ability in it to override built-in defaults for
everything. You have to specify it yourself for realtime. If using
config files then config file templates can be used to do this.
Cheers,
--
Joshua Colp
Digium, Inc. | Senior Software Developer
445 Jan Davis Drive NW - Huntsville, AL 35806 - US
Check us out at: www.digium.com & www.asterisk.org
--
_____________________________________________________________________
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
New to Asterisk? Join us for a live introductory webinar every Thurs:
http://www.asterisk.org/hello
asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
http://lists.digium.com/mailman/listinfo/asterisk-users |
|
Back to top |
|
|
asterisk_list at earth... Guest
|
Posted: Thu Jul 14, 2016 7:46 am Post subject: [asterisk-users] PJSIP defaults for endpoints when using rea |
|
|
On Thursday 14 Jul 2016, Joshua Colp wrote:
Quote: | Carlos Chavez wrote:
Quote: | Until Asterisk 11 I could use sip.conf to set defaults for all phones
(language, dtmf, vmexten, etc) and just leave many fields in the
database as NULL. What would be the proper way to do this for Asterisk
13 and PJSIP?
|
Kia ora,
PJSIP doesn't have the ability in it to override built-in defaults for
everything. You have to specify it yourself for realtime. If using
config files then config file templates can be used to do this.
|
If the database you are using is MariaDB or MySQL, then you should be able to
set default values for columns in the table definition. Then when you do an
INSERT into only some columns, the rest will be populated with the default
values.
To alter the structure of an already-created table, use something like
ALTER TABLE stuff CHANGE COLUMN foo foo VARCHAR(20) NOT NULL DEFAULT "wibble";
(Yes, the column name should be there twice: you might want to rename it, so
you have to specify an old and a new name even if the two are the same.)
You will then need to use something like
UPDATE stuff SET foo="wibble" WHERE foo IS NULL;
--
AJS
Note: Originating address only accepts e-mail from list! If replying off-
list, change address to asterisk1list at earthshod dot co dot uk .
--
_____________________________________________________________________
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
New to Asterisk? Join us for a live introductory webinar every Thurs:
http://www.asterisk.org/hello
asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
http://lists.digium.com/mailman/listinfo/asterisk-users |
|
Back to top |
|
|
gjoseph at digium.com Guest
|
Posted: Thu Jul 14, 2016 8:40 am Post subject: [asterisk-users] PJSIP defaults for endpoints when using rea |
|
|
On Thu, Jul 14, 2016 at 6:45 AM, A J Stiles <asterisk_list@earthshod.co.uk (asterisk_list@earthshod.co.uk)> wrote:
Quote: | On Thursday 14 Jul 2016, Joshua Colp wrote:
Quote: | Carlos Chavez wrote:
Quote: | Until Asterisk 11 I could use sip.conf to set defaults for all phones
(language, dtmf, vmexten, etc) and just leave many fields in the
database as NULL. What would be the proper way to do this for Asterisk
13 and PJSIP?
|
Kia ora,
PJSIP doesn't have the ability in it to override built-in defaults for
everything. You have to specify it yourself for realtime. If using
config files then config file templates can be used to do this.
|
If the database you are using is MariaDB or MySQL, then you should be able to
set default values for columns in the table definition. Then when you do an
INSERT into only some columns, the rest will be populated with the default
values.
To alter the structure of an already-created table, use something like
ALTER TABLE stuff CHANGE COLUMN foo foo VARCHAR(20) NOT NULL DEFAULT "wibble";
(Yes, the column name should be there twice: you might want to rename it, so
you have to specify an old and a new name even if the two are the same.)
You will then need to use something like
UPDATE stuff SET foo="wibble" WHERE foo IS NULL;
|
While this will work, your defaults may not survive the next time alembic is run to upgrade the database. It's rare but we do occasionally drop and re-create columns to change their types.
You could also play with insert triggers which are attached to the table instead of specific columns. These might be easier to manage.
--
George JosephDigium, Inc. | Software Developer
445 Jan Davis Drive NW - Huntsville, AL 35806 - US
Check us out at: www.digium.com & www.asterisk.org |
|
Back to top |
|
|
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group
|