Batch update outbound cid

I have four extensions (2000-2003) that support an autodialer. On a weekly basis we want to change the outbound callerid number for those four extensions. I would prefer to make this a batch process so that it doesn’t require someone using the Admin GUI.

I first tried using MySQL to update the outboundcid column of the users table. That didn’t work.

I tried putting the following in extensions_custom.conf

[autodialer outbound caller ID]
exten => _NNNNNNNNNN/2000,1,SET(CALLERID(num)=<9015551212>)

followed by an fwconsole reload. Needless to say, it did not work. I am new to Asterisk and would appreciate some guidance. Is extensions_custom.conf the place to put the override?

Don’t think this is where you want to go necessarily, the 2 places I would think to change this:

  1. You could change it on the outbound route, and just force those 4 to use a specific route.

I have ~700 extensions and need ~40 Emergency CID and ~ 400 external CID addresses, sounds like a nightmare, i know, but the bulk import has been a godsend for this task. you could do it there as well.

You could script a bulk handler import, call the file and run it.

Just my 2 cents.

Thank you much. I will look into the bulk import.

DV

OK, I scripted a SQL query that builds a csv in the proper format for bulk import. We have been struggling to get the CLI bulk updater to work all day long. We are using a shell script as follows:

#!/bin/bash
/usr/sbin/fwconsole bulkimport --type=“extensions” /tmp/extensions_bulk_import.csv -vvv >> /root/extensions1.log

/usr/sbin/fwconsole reload -v >> /var/log/extensions1.log -vvv >>/root/reload.log

rm /tmp/extensions_bulk_import.csv


We have tried untold iterations of the csv, including all columns from the export (with the action column first with edit), with and without headers, pared down to only the ones that are considered required, and on and on.

The most recent iteration is:
action,extension,name,outboundcid,tech,description,secret,callwaiting_enable,findmefollow_grplist,voicemail_enable,voicemail_vmpwd,voicemail_email,voicemail_options
edit,2004,autodialx,<9012026808>,sip,autodialx,cashvoip2004,ENABLED,2004,

we have tried with and without the angle brackets on the outboundcid. The log only says:
Importing bulk extensions

At NO TIME were any changes visible in FreePBX Administrator GUI under extensions.

What is the secret sauce that will make this work?

OK, this is resolved. Used query to update users table and fwconsole reload to apply the changes.

Closing

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.