# Advanced use of &sflphone-client-kde;

## Hooks

An interesting feature of &sflphone; is the hook handle. Hooks designate some actions you can choose to trigger on a particular signal, especially when receiving or sending a call. The two useful hooks that are implemented in &sflphone; are the URL argument, and the phone number formatting.

### URL argument

This feature permits you to grab an URL sent in a particular header of the SIP or IAX message sent by Asterisk server, and execute it with the chosen browser command.

To configure it, go to the Hooks page of the configuration menu. Then check the SIP or/and IAX checkbox, if you want to enable hooks with SIP accounts or/and with IAX accounts. Then type the name of custom header that your Asterisk server inserts into the invite message for the SIP protocol (if you do not know the name of the custom header, ask the one who configured the Asterisk server). For IAX there is a common header for that, so you do not have to configure it. Then type the command of the browser you want to have the URL opened with, or leave x-www-browser for the default browser.

### Phone number formattings

This feature permits you to add the chosen prefix at the beginning of the phone number you are calling.

## Macros

Macros are used to automate some type of calls. The basic use case is to assign a phone number to a keyboard shortcut. To do so, a new macro have to be created in the configuration dialog "accessibility" section. It can then be assigned to a shortcut either in the dialog itself or in the dedicated shortcut dialog. It is also possible add a macro to the toolbar using the dedicated dialog.

Macros also support the "\n" escape sequence to emulate the effect of the "Enter" keyboard key and the "Pick up" button. The time between each keystroke is also configurable to match some PXB dial plan configuration (such as phone extensions or audio menu).

## Codecs

To communicate voice information, &sflphone; uses some codecs. You can choose which codec to use in the audio configuration panel.

In this panel you will see the codecs available on your system with all their parameters. &sflphone; will use the first activated one in the list. So you can change the order of the list, and activate/deactivate some ones, to change which one will be used. To do that, select a codec and click on the up/down arrows, or just check/uncheck the corresponding checkbox.

## Video

&sflphone; versions higher than 1.1.2 have built in support for video calls. This feature work mostly the same way as the audio codecs. An option as also available to disable video transmission.

During a video call, some display options are available to change the aspect ratio or rotate the video. By pressing the advanced settings button, it is also possible to switch from different camera, disable video, stream a file or share your screen(s). Sharing a file is also accessible by drag and dropping it on top of the video window.

Video devices settings can be configured from the configuration window "video" section.