Freepbx bulk extensions /add 1000 extensions in one shot

sometimes you have a fresh sever  and you are looking forward to create like 100 or 200 or even 1000 extensions on the freepbx server  in one operation .

say that you want to create all of those extensions with specific config like :

putting them in specific context
enable/disable recording
passwords length of those extension
enable/disable Voicemail
more and more  than that …….

all of us agree that this will be a painful job if you do it manually .


but ………

fortunately , freepbx do support that to be done automatically  and in 1 step using Bulk extension feature .

you can verify that below :


now the 1st trick we gonna do is :

we will create only 1 extension on the system and we will choose the settings that we will need for the other extensions that will be duplicated .

so lets create extension 100 with settings below :





now , we have that extension created and exist in the system :

localhost*CLI> sip show usersUsername                   Secret           Accountcode      Def.Context      ACL  Forcerport100                                       from-internal    Yes  Nolocalhost*CLI> sip show peersName/username             Host                                    Dyn Forcerport ACL Port     Status      Description100                       (Unspecified)                            D              A  0        UNKNOWN1 sip peers [Monitored: 0 online, 1 offline Unmonitored: 0 online, 0 offline]localhost*CLI>


now  after we created that extentsion, we will go  back to freepbx and go to Bulk extension panel and do “export extensions” as below :

once we have export done  , it will export a file as csv file and we can edit it using microsoft excell App.

if we open it , we will find a long options in that cvs file on a horizontal direction….but not all of those options make sense to us .
lets have a quick look @ it :


the Action column is Blank for now , we will discuss about it later on how will be get benefit form it.


as we see above , there is extensions # , pwd , CID …..etc.
for a moment , if i want to create i huge # of extensions i would  be more interested with extension # , pwd , CID , VM , Record Calls or not …..

so ……all what I’m gonna do right now is :

i will copy the most settings from the column that we exported so that it help us in the duplication process ….so follow me on the next print screen :





and the same options you copy paste for the others in the row …so all what you have to put in mind is the important tabs like i higlited in the yellow color in the pictures above …. other than that you can  copy paste it the same from the  other cells .


for a test i only configured up to 30 extensions form range 100-128 .

once you do all for the other cells in the cvs file .

we go to the action and put with it “add” and then we save that csv file .


now we go to freepbx again , Bulk extension and choose file , then Load that file .

the result should be like  below :


now lets verify the extension  that were added :


Verification From CLI console :

localhost*CLI> sip show peers

Name/username Host Dyn Forcerport ACL Port Status Description

100 (Unspecified) D A 0 UNKNOWN

101 (Unspecified) D A 0 UNKNOWN

102 (Unspecified) D A 0 UNKNOWN

103 (Unspecified) D A 0 UNKNOWN

104 (Unspecified) D A 0 UNKNOWN

105 (Unspecified) D A 0 UNKNOWN

106 (Unspecified) D A 0 UNKNOWN

107 (Unspecified) D A 0 UNKNOWN

108 (Unspecified) D A 0 UNKNOWN

109 (Unspecified) D A 0 UNKNOWN

110 (Unspecified) D A 0 UNKNOWN

111 (Unspecified) D A 0 UNKNOWN

112 (Unspecified) D A 0 UNKNOWN

113 (Unspecified) D A 0 UNKNOWN
114 (Unspecified) D A 0 UNKNOWN
115 (Unspecified) D A 0 UNKNOWN
116 (Unspecified) D A 0 UNKNOWN
117 (Unspecified) D A 0 UNKNOWN
118 (Unspecified) D A 0 UNKNOWN
119 (Unspecified) D A 0 UNKNOWN
120 (Unspecified) D A 0 UNKNOWN
121 (Unspecified) D A 0 UNKNOWN
122 (Unspecified) D A 0 UNKNOWN
123 (Unspecified) D A 0 UNKNOWN
124 (Unspecified) D A 0 UNKNOWN
125 (Unspecified) D A 0 UNKNOWN
126 (Unspecified) D A 0 UNKNOWN
127 (Unspecified) D A 0 UNKNOWN
128 (Unspecified) D A 0 UNKNOWN
29 sip peers [Monitored: 0 online, 29 offline Unmonitored: 0 online, 0 offline]