Skip to content

Instantly share code, notes, and snippets.

@fagnersilva
Last active April 3, 2017 19:19
Show Gist options
  • Save fagnersilva/f70caa1a55cae5fd9330660704eb1de6 to your computer and use it in GitHub Desktop.
Save fagnersilva/f70caa1a55cae5fd9330660704eb1de6 to your computer and use it in GitHub Desktop.
sippeers_populating <PosrtgreSQL_9.5>
DELETE FROM sippeers;
INSERT INTO sippeers (id,name,host,type,context,permit,deny,secret,transport,dtmfmode,directmedia,nat,disallow,allow,progressinband,callerid,callcounter,qualify,qualifyfreq,allowtransfer)
SELECT
row_number() OVER (),
'7999'::integer + row_number() OVER () ,
'dynamic',
'friend',
'default',
'0.0.0.0',
'',
CONCAT(7999+ row_number() OVER ()) ,
'udp',
'rfc2833',
'no',
'no',
'all',
'ulaw,alaw',
'yes',
CONCAT('7999'::integer + row_number() OVER (), '<', '7999'::integer + row_number() OVER (), '>')
,'yes',
'yes',
'100',
'yes'
FROM information_schema.columns c
LIMIT 20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment