Carlos Chavez
2016-Jul-13 21:49 UTC
[asterisk-users] PJSIP defaults for endpoints when using realtime
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
Annus Fictus
2016-Jul-14 12:18 UTC
[asterisk-users] PJSIP defaults for endpoints when using realtime
with templates. Regards El 13/07/2016 a las 23:49, Carlos Chavez escribi?:> 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? > >
Joshua Colp
2016-Jul-14 12:21 UTC
[asterisk-users] PJSIP defaults for endpoints when using realtime
Carlos Chavez wrote:> 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
A J Stiles
2016-Jul-14 12:45 UTC
[asterisk-users] PJSIP defaults for endpoints when using realtime
On Thursday 14 Jul 2016, Joshua Colp wrote:> Carlos Chavez wrote: > > 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 .