Doorbell name with virtual extension

Hi everyone! I am using a virtual extension to simulate a doorbell.
From SSH i am using this command.
“channel originate Local/200@from-internal extension 1000”
Basically I call from 1000 to 200 (ring group) and everything is fine.
The door activate a trigger with the command written above and works fine.
Only problem is the fact the call is from unknown and not from doorbell, the name of extension n 1000.
Can I do anything about it? maybe see on the phones call from doorbell.
Would be amazing, thanks for your help!

Virtual extensions are a FreePBX concept, not an Asterisk one. Ring groups are also not an Asterisk concept, although they are not a concept restricted to FreePBX. Nonetheless, ring group as a more restricted meaning in FreePBX than it does in general, and, I think, implies the use of the Queue application, with a ringall strategy.

Your problem actually relates to the use of originate, not to whether or not an extension corresponds directly to a phone. There is no caller ID because there is no incoming call. Also, the call to local/200 is made before any consideration is given to extension 1000.

Most forms of originate allow you to specify a caller ID, but I don’t think this has ever been added to the CLI version, as that isn’t really intended for automation. You can also set the caller ID in your local channel dialplan.

Given the strong hints that you are using FreePBX, you will probably have to ask the FreePBX people as to the best way of setting the caller ID from the dialplan, without subverting FreePBX itself.

The one time I needed something like this I did it using a call file.

see here for the syntax:

One note: make sure you create this file someplace else on the system then move it into the right folder which by default is /var/spool/asterisk/outgoing

For your example I might do something like

Callerid: “Door Phone”<1000>

How I did it was manually created the file how I needed it to look. NOT in the ./outgoing directory. Then inside my script ‘copied’ it to another name in that same folder. Then I took the copy and ‘moved’ it over to the /var/spool/asterisk/outgoing folder.

This series of steps is important because 1 call files get deleted once they are done so you should always move in a copy. 2. use mv on an already existing copy of the file rather then cp because on some systems cp will write out the file one line at a time so it will be read and disregarded as invalid by asterisk before the entire file is written. mv does not have this limitation.

Double check my syntax-- I haven’t needed that in a while and just pulled it off the top of my head.

The source directory for the mv needs to be on the same file system as the outgoing spool directory, otherwise it will be treated as cp and rm. I don’t know if FreePBX uses multiple filesystems when you use their standalone installer.

Also, although call files are normally the best way of doing originate, the reason for that is that they will retry a failed call, but a for a door phone, that is probably not desirable.

I am honest, I am quite noob on this things, it was an emergency tbh, If you need more precise info I can give you, but really I don’t know what to do right now.

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