Incoming line of extensions.conf

Hi guys,

I have a hard time understanding extensions.conf. I want to use a php callerid finder program that needs the line below to be inserted before Answer:

exten => your-number,1,System(/yourdirectory/./ ${CALLERIDNUM} ${CALLERIDNUM} ${CALLERIDNAME} > /yourdirectory/super_callerid_output.txt)

I have my inbound DID set to extension 400 so should I equate (your-number=400) and where exactly should I put this line in extensions.conf?


Any thoughts people?


Oh boy ;; no one responds here. Where can I find a guide for extensions.conf of FreePBX? Thanks

I think you may find people are a bit put off when you make a post, bump it from lack of response hours later and then again the next day. This tends to result in people ignoring your posts. Have a little patience when you ask for help. Also, you have articulated in your request in a fairly confusing manner which probably makes it hard for people to understand. Lastly, don’t mess with extensions.conf, it will get overwritten - anything you do should be done in a file like extensions_custom.conf.

If you are looking at looking up your callerid from a source other than those provided in the cidlookup module, you are probably best to send your incoming trunk to it’s own context, lookup the source there, and from there send it on its way to from-pstn.

Philippe Lindheimer - FreePBX Project Lead
http// - IRC #freepbx

Thanks for the response. I have the cidlookup module working already. This is a supplemental thing I am trying to do. If you check this url:

^^^^ you will understand what I am trying to do.

Here is a screen shot:

of the output (which has nothing to do with passing callerid to SIP phone or so as it simply writes an output file with the Caller ID info)


I tried adding the following line in extensions_custom.conf but it didn’t make any difference because the line is not read or maybe because incoming calls are set in extensions.conf.

exten => your-number,1,System(/yourdirectory/./ ${CALLERIDNUM} ${CALLERIDNUM} ${CALLERIDNAME} > /yourdirectory/super_callerid_output.txt)

I am still looking around on where to put this. If it was vanilla asterisk then it would have been easily inserted in extensions.conf.

extensions.conf includes extensions_custom.conf.

To see the flow of how things work review the [from-pstn] context in extensnsions.conf. that is where calls normally go first. You will see that it calls other contexts for processing, most importantly it calls one ending in -custom which will not exist unless you create it.

You should only edit and/or create files that end in _custom.conf As the others will be replaced or updatd at different times. extensions.conf is touched every upgrade, extensions_additional.conf is touched every time there is a change and is automaticly generated by freepbx.

As Philippe stated you are probably best creating a new context and then you need to change flow of the incoming to go to your new context first. Have your custom context when done go to from-pstn (see right about from-pstn for a working example).

Yes when you start it is confusing. FreePBX still has to follow all the rules of asterisk so understanding how asterisk works help a lot.