Bulk Handler Extension Import Bug

Hi all,

There seems to be an issue with the bulk handler module. When I try to import extensions, it skips the last line and imports the second last line twice.

To reproduce (latest freepbx):
-export all extensions
-edit last two lines of the file
-import that file

It’ll show in the preview that it’s modifying the second last entry twice, and does not change anything with the last entry.

What are you using to modify the file? A text file editor? Google sheets? Excel? Wondering if there is a file format issue or special characters and the importer is tripping up on it.

Have you tried deleting the extension out of the PBX, selecting apply config, and re-trying the upload? Shouldn’t have to, but it’s a good test to see if something got hung up in the PBX. I’ve seen this one before, unfortunately.

Are there any glaring errors if you open the CSV in Notepad++? If you append the file into google sheets minus the special character conversations, do all the columns line up properly? If they don’t, might be an issue with special characters, potentially.

Just a few ideas.

I mean, I can’t be 100% sure it’s not importing properly using the following methodology, but when I export extensions directly from bulk handler, and then try to import that file I just downloaded, the display bug where the last line is the same as the second last line happens.

I was using notepad++ to edit the file. Everything seems to line up fine when I look at it in excel. below is the full text of the file (the one I did not edit at all).

extension,password,name,voicemail,ringtimer,noanswer,recording,outboundcid,sipname,noanswer_cid,busy_cid,chanunavail_cid,noanswer_dest,busy_dest,chanunavail_dest,mohclass,id,tech,dial,devicetype,user,description,emergency_cid,hint_override,cwtone,recording_in_external,recording_out_external,recording_in_internal,recording_out_internal,recording_ondemand,recording_priority,answermode,intercom,cid_masquerade,concurrency_limit,devicedata,accountcode,aggregate_mwi,allow,avpf,bundle,callerid,context,defaultuser,device_state_busy_at,direct_media,disallow,dtmfmode,force_rport,icesupport,mailbox,match,max_audio_streams,max_contacts,max_video_streams,maximum_expiration,media_address,media_encryption,media_encryption_optimistic,media_use_received_transport,message_context,minimum_expiration,mwi_subscription,namedcallgroup,namedpickupgroup,outbound_auth,outbound_proxy,qualifyfreq,refer_blind_progress,remove_existing,rewrite_contact,rtcp_mux,rtp_symmetric,rtp_timeout,rtp_timeout_hold,secret,send_connected_line,sendrpid,sipdriver,timers,timers_min_se,transport,trustrpid,user_eq_phone,callwaiting_enable,findmefollow_strategy,findmefollow_grptime,findmefollow_grppre,findmefollow_grplist,findmefollow_annmsg_id,findmefollow_postdest,findmefollow_dring,findmefollow_needsconf,findmefollow_remotealert_id,findmefollow_toolate_id,findmefollow_ringing,findmefollow_pre_ring,findmefollow_voicemail,findmefollow_calendar_id,findmefollow_calendar_match,findmefollow_changecid,findmefollow_fixedcid,findmefollow_enabled,parkpro_pagegroup,voicemail_enable,voicemail_vmpwd,voicemail_email,voicemail_pager,voicemail_options,voicemail_same_exten,disable_star_voicemail,vmx_unavail_enabled,vmx_busy_enabled,vmx_temp_enabled,vmx_play_instructions,vmx_option_0_number,vmx_option_1_number,vmx_option_2_number
1234,,"import test",default,0,,,"""outgoing name"" <1234>",,,,,,,,default,1234,pjsip,PJSIP/1234,fixed,1234,"import test",,,disabled,dontcare,dontcare,dontcare,dontcare,disabled,10,disabled,enabled,1234,3,1234,,no,,no,no,"import test <1234>",from-internal,,0,yes,,rfc4733,yes,no,1234@device,,1,1,1,7200,,no,no,no,,60,auto,,,no,,60,yes,yes,yes,no,yes,0,0,20afa9d12cd09896775509e3cd1f167b,yes,pai,chan_pjsip,yes,90,,yes,no,ENABLED,ringallv2-prim,20,,1234,,"ext-local,1234,dest",,,,,Ring,5,default,,yes,default,,,1,yes,123456,[email protected],,attach=yes|saycid=no|envelope=yes|delete=no,yes,no,blocked,blocked,blocked,1,,,
1235,,"import test",default,0,,,"""outgoing name"" <1234>",,,,,,,,default,1235,pjsip,PJSIP/1235,fixed,1235,"import test",,,disabled,dontcare,dontcare,dontcare,dontcare,disabled,10,disabled,enabled,1235,3,1235,,no,,no,no,"import test <1235>",from-internal,,0,yes,,rfc4733,yes,no,1235@device,,1,2,1,7200,,no,no,no,,60,auto,,,no,,60,yes,no,yes,no,yes,0,0,220b050cb60fa52958958a5102a27c9e,yes,pai,chan_pjsip,yes,90,,yes,no,ENABLED,ringallv2-prim,20,,1235,,"ext-local,1235,dest",,,,,Ring,5,default,,yes,default,,,1,yes,1234,[email protected],,attach=no|saycid=no|envelope=no|delete=no,no,no,blocked,blocked,blocked,1,,,
1239,,"test ext",novm,0,,,"""outgoing name"" <1234>",,,,,,,,default,1239,pjsip,PJSIP/1239,fixed,1239,"test ext",,,disabled,dontcare,dontcare,dontcare,dontcare,disabled,10,disabled,enabled,1239,3,1239,,no,,no,no,"test ext <1239>",from-internal,,0,yes,,rfc4733,yes,no,1239@device,,1,1,1,7200,,no,no,no,,60,auto,,,no,,60,yes,yes,yes,no,yes,0,0,7e2118cdbec0f45d49855512c9acb4fd,yes,pai,chan_pjsip,yes,90,,yes,no,ENABLED,ringallv2-prim,20,,1239,,"ext-local,1239,dest",,,,,Ring,5,novm,,yes,default,,,,,,,,,,,,,,,,,

Here’s the bulk handler validation screen when I import the file, showing 1235 twice instead of 1239.

What version of FreePBX are you using?

The CSV format between versions is different.

This is a brand new install as of last week (using the Github script on a fresh install of Debian 12). Version 17.0.21

I was able to reproduce this on 17.0.21.2 using both your values and my own.

I’ve tried different CSVs, different values on the CSV, trimmed down / cleaned up versions of the CSV.

What’s really interesting is that my CSV contained ~200 records. When I imported the larger CSV, there were no issues. Anytime I trimmed the CSV down, the error popped up (last row got duped in the GUI).

Doesn’t help with your problem specifically, but it’s validated by others now.

I should have checked Github issues first. Someone’s already reported it. [bug]: Bulk Import Extensions · Issue #875 · FreePBX/issue-tracker · GitHub

1 Like