How to bypass callerid?

Hi there!

I’va SPA3102 which is connected as extension and transfers callerid but freePBX generates extension this way -

[XXX]
deny=0.0.0.0/0.0.0.0
secret=XXX
dtmfmode=rfc2833
canreinvite=no
context=from-internal
host=dynamic
type=friend
nat=yes
port=5060
qualify=yes
callgroup=
pickupgroup=
dial=SIP/XXX
accountcode=
mailbox=XXX@device
permit=0.0.0.0/0.0.0.0
callerid=device
call-limit=50
faxdetect=no

where callerid is determined. If I delete this string everything works fine but this string is generated even then Outbound CID is empty What i should do to make FreePBX not generating callerid or how to bypass callerid which is transferred from the extension ?

If you want to have CallerID you must set that up in the Extension page.
FreePBX always put “callerid=device” in the sip_additional.conf.

To solve your “issue”, enter a valid CallerID for each extension in the Extension page.

I’m using 2.7.0.3. I haven’t setup CallerID on extension page and in this case i expect FreePBX not generating "callerid=device " in context config, but it generates and its overrides CID which is transfered from the device.

No, don’t create another extension.

Notice the - sign next to the peer. This instructs Asterisk to remove the config line from the peer you already created. It’s a setting override.

My sip.conf
[general]
#include sip_general_additional.conf
#include sip_general_custom.conf
#include sip_nat.conf
#include sip_registrations_custom.conf
#include sip_registrations.conf
#include sip_custom.conf
#include sip_additional.conf
#include sip_custom_post.conf

Yes, i did it -

102
callerid=device <102>

and reloaded asterisk configuration but nothing changed(

When i remove “callerid=device <102>” from sip_additional.conf it shows real caller id (after reloading configuration, but next FreePBX update overwrites this setting)

What version of FreePBX are you using?
If you setup CallerID on the extension page it will work. You dont mess with the .conf files. The CallerD is stored in astdb for each extension.

In /etc/asterisk/sip_custom_post.conf add this line:


[xxx](-)
callerid=device

Don’t forget to replace xxx with your peer name.

Run an ‘amportal restart’ or asterisk command ‘sip reload’ and you will be good to go.

It doesn’t work( i tried to create another extension in sip_custom_post.conf changing XXX to XXY but it creates incorrectly - device registers under this extension but when i try to call on it asterisk says that number is invalid (sip show peers shows extension XXY)