The Asterisk Manager Interface (AMI) allows a call setup using the "Originate" command. When the Asterisk system receives an "Originate" command via the AMI, the system first calls its own phone. The user must accept this call. The system then calls the destination number.
Unfortunately, the process described has bad side effects. The TAPI driver therefore supports direct call setup for some devices (IP Telephones / SoftPhones). Unfortunately, this type of control is not standardized, but specifically adapted to the phone model.
In the TAPI driver line configuration under [Parameters for TAPI-controlled call setup > Special devices] you can see which telephones are currently supported. If you are using one of the phones listed, please select it.
Especially supported IP phones
For some IP phones (e.g. Snom or Yealink) the TAPI driver contains special adjustments to trigger a CTI dialing via URL command directly in the phone.
Examples of specially supported phones:
- DECT phones are not supported
The actions Dial, Answer and Drop are sent directly via HTTP to the IP phone (the same way like via web browser).
Depending on the phone, the following are also supported: Hold, Consultation, Transfer and Toggle.
SoftPhones: X-Lite, X-Pro, eyeBeam, other SoftPhones
The dialed numbers can be sent directly to a SoftPhone via the command line.
The softphone must support "Dial" via command line. And the SoftPhone must run on the computer on which the "TAPI for Asterisk" driver is installed.
- Configuration: The path to the application must be specified under [Special device > Settings...].
Special Device "URL Control"
If you are using an IP telephone that supports CTI dialing via URL but is not listed under "Specific Device", you can use the "URL Control" entry if necessary. Under "Settings" enter the appropriate URL with placeholders.
Example for Yealink:
Special Device "Gemeinschaft"
This is the "Gemeinschaft" telephone system based on "FreeSwitch". In order for the TAPI driver to work at all with "Gemeinschaft", you need a special module that emulates the Asterisk Manager Interface.
If you set "Special device" to "Gemeinschaft" in the TAPI driver, you can send dialing commands via URL call directly to the system (comparable to Asterisk's "Originate" command).
[Special device] = "Standard" must be selected for all telephones that are not specifically supported by the TAPI driver (see above). The call setup is made via "Originate" command of the Asterisk Manager Interface.
AMI command "Originate" has the following relevant parameters:
- Channel: Your phone identifier within the telephone system. Examples:
- ParkPos/701 (ParkeeExten)
- *280 (example to observe Hint "*280")
- CallerID: The caller ID (own phone number/name) that should be displayed to the person being called.
- Context: Points to a section in the Asterisk dial plan. Such a section determines, among other things, how calls from internal extensions are to be processed. An incorrect context usually means that the originate command is not executed at all, because the own channel is not known in the "context".
- Use other Cannel: You can use this option then call setup (originate) needs to be executed to another channel. Default: Off
- Application example "Multi Device with PJSIP": If you enter "local/xxx" here (where xxx stands for the extension number - analogous to the entry under Channel), then all telephones of the extension should ring when dialing. The connection will then be established with the telephone you pick up.
- Special case: In connection with FreePBX 15 "local/xxx@from-internal" should be used.
Procedure: When the Asterisk system receives an "Originate" command via the AMI, the system first calls its own phone. The user must accept this call. The system then calls the destination number.
Unfortunately, the process described has bad side effects:
- Your own phone sees the call as "Incoming" and possibly with your own CallerID and logs it as such in the phone's internal call history.
- The user has to answer/confirm the call manually on the phone.
Some SIP-phones supports auto-answer via INVITE SIP-Header.
- Call-Info: Answer-After=0
- Alert-Info: ;info=alert-autoanswer
- Alert-Info: <sip:>;info=alert-autoanswer
- Alert-Info: <sip:domain>;info=alert-autoanswer
domain = Asterisk IP-Address
- snom phones: In Snom-Web configuration, set the "Intercom Policy" option to "always" or "only in idle" under [Advanced > Behavior]. See also:answer_after_policy
- Yealink: In the Yealink web configuration, you have to activate "Enable Intercom" under [Features > Intercom].
- Grandstream 2135: In the Grandstream web configuration, the option "Allow Auto Answer by Call-Info/Alert Info" should be set to "Yes" under [Account X > Call Settings].
- Grandstream 3240: In the Grandstream web configuration, set the option "AutoAnswer" to "Enable Intercom/Paging" in [Account X > Call Settings].
- Some phones also offer an option to generally accept all incoming calls.
Configuration in the TAPI driver:
- If your phone supports "auto-answer by call-info", you can activate the corresponding option in the TAPI driver under:
- [Asterisk Line - Configuration > Parameters for TAPI-controlled call setup > Special device = Standard > Settings > Hands-free mode via INVITE SIP header info].
The Originate parameter "CallerID" defines the caller ID (own phone number/name) that is to be displayed to the person being called.
The CallerID is build by the values "Your phone number" and "Your name" from the TAPI line configuration dialog.
Problem 1: External calls:
- The CallerID settings normally only affect Asterisk internally. If you call another internal extension, your name/phone number will be displayed according to the driver settings.
- In the case of external calls, the TAPI driver CallerID settings are normally ignored by the PBX system or by your telephone provider and overwritten with the values that officially belong to your telephone connection. Unfortunately, the TAPI driver cannot force any desired callerID number.
- If your company has several official telephone numbers, the CallerID telephone number may have to correspond exactly to one of these telephone numbers. Depending on your telephone provider or its configuration, customers will otherwise only see your calls with your master number or as anonymous (without a number).
Problem 2: The own telephone displays its own number/name, although you would expect that the destination number/name would be displayed when dialing.
- When the Asterisk system executes an "Originate" command, your own telephone is called first and the actual destination number is called after it has been accepted.
- From the point of view of the Asterisk system, these are two outgoing calls that are then connected internally. The Asterisk internally uses the same CallerID values for both calls.
- Solution 1 (for external calls):
- Under [CallerID > Settings] check the box: "Use the destination phone number for external connections."
- Please test whether the solution works for you. Depending on your phone provider, this may also result in the callee not seeing a number or not making the call.
- Unfortunately, this solution does not work for internal calls, otherwise the called party would see his own number.
- Solution 2:
- An adjustment in the Asterisk firmware can also fix the problem for internal and external calls.
- We created a patch for an older Asterisk version 1.4:
- The patch causes that the "Originate" command parameter "CallerID" is not sent to both participants (A=originator/TAPI User, Called=B), but only to the B subscriber. The participant A (TAPI User) instead gets the CallerID that was specified into "Originate/Exten" as destination number.
- So I see, when I - as TAPI user "10" - call the user "99" via CTI, in my phone display a call from "99", and when I pickup the phone and Asterisk setup the call, the "99" see my correct CallerID: "10".
- Patch for Asterisk 1.4:asterisk-1.4-exten-as-CLI-for-originator.diff
- In order to adapt this CallerID patch to your Asterisk version, basic knowledge of C programming is helpful. And such an adjustment is not easy.
- You would have to do the following:
- Understand the asterisk internal process of "Originate".
- You know how a patch works in principle and understand what the example patch is supposed to do.
- Then adjust your Asterisk source code accordingly.
- Create your own patch based on your old and new source code.