1. 如何在FSGUI中自动批量生成分机账户?:
  2. 宁卫通信
  3. 帮助中心
  4. FSGUI
  5. 如何在FSGUI中自动批量生成分机账户?

如何在FSGUI中自动批量生成分机账户?

可以用如下 postgresql的function来自动生成:


--DROP FUNCTION public.create_extensions();

CREATE OR REPLACE FUNCTION public.create_extensions()
  RETURNS integer AS $BODY$

    Declare extension_number integer;
    Declare count integer;
    Begin  
        extension_number := 1026;
    count := 0; while extension_number < 1500 loop
       INSERT INTO public.call_extension(
             extension_name, extension_number, callout_number, extension_type, 
            group_id, extension_pswd, extension_login_state, extension_reg_state, 
             is_allow_callout,  is_record, answer_without_state, 
            say_job_number)
        VALUES (CAST(extension_number AS TEXT), CAST(extension_number AS TEXT), ', 1, 8, 
            '1234', 'success', ', TRUE, 
            FALSE, TRUE,FALSE);
            extension_number := extension_number +1;
            count := count+1;
          end loop; return count;
    END; $BODY$
  LANGUAGE plpgsql VOLATILE
  COST 100;
ALTER FUNCTION public.create_extensions()
  OWNER TO postgres;

然后执行

SELECT public.create_extensions();

如有fsgui bug可以在www.6fok.com的fsgui bug节点提交