Shared line Appearence support in Asterisk

Would like to know if Asterisk supports Shared line appearance?

Asterisk version:15.5
FreePBX version: 14

IP Phone-A - Line 1 Ext:3001

IP Phone-B - Line 1 Ext:3002
Line 2 Ext:3001

IP Phone-C - Line 1 Ext:3003


  1. IP Phone-C calls the extension-3001.
  2. Both IP Phone-A and IP Phone-B rings due to Shared Line Appearance.
  3. IP Phone-B picks up the call and IP Phone-A stops to ring.
  4. Call is established between IP Phone-A and IP Phone-C.

Please let me know if this scenario is supported in Asterisk(FreePBX). If yes, any leads in configuring this feature will help. Thanks.

Just separate the dialstrings for A and B with an ampersand in the parameters of Dial.

I believe FreePBX also supports this, but the user interface for configuring will be different, so you will have to ask on their forum.

In fact, this is one of the reasons why FreePBX’s use of the term extension is confusing, as they use it for A and B, whereas, as per your usage, Asterisk only uses it for 3001.

I’m not sure what you mean by this. In the example provided with FreePBX 3001, 3002 and 3003 would be extensions on the system. 3001 would be A, 3002 would be B and 3003 would be C. They would like that B also has A’s extension on their phone so they both can answer it. This is not an uncommon setup.

In most SIP systems the ability to have multiple devices registered or associated with a single account (or extension/peer/endpoint) is very very common. Asterisk has lacked in this until the introduction of PJSIP. So the answer in this case is that 3001 be a PJSIP based extension so that both A and B can have them as accounts on their phones.

And while doing Dial(SIP/3001&SIP/3002) will also work, it will also be based on the states of those two. So if B has 3002 DND’d or something they’ll never get the calls being dialed as they’ll be ignored. If they are just doing Dial(PJSIP/3001) then B will get dialed no matter what their personal extension state (3002) is.

In Asterisk only things that appear immediately after “=>” in extensions.conf are extensions. In particular, in a simple case, there may be no way of ringing just A or just B.

Some other PABXes (e.g. SL/1 (although it has since been renamed and may be obsolete), or even main network switches, like System X, use the terms directory number, for what Asterisk calls an extension, and equipment number for what appears after SIP/. The OP clearly understood this distinction, but failure to understand it often leads people to not using the full power of Asterisk.

Although it is a violation of best practice (because it makes it easy for attackers to guess the user part of the device authentication data), a lot of things take advantage of making the equipment number the same as the primary directory number, which means people fail to see the distinction. Suggested best practice is to use MAC addreses as equipment numbers.

When used with circuit switched devices, this confusion doesn’t arise as the equipment numbers are constrained by the hardware/DAHDI.

FreePBX, unfortunately, confuses directory and equipment numbers, in this way. I think they use the concept of a virtual extension to get themselves out of the limitations that this introduces.

This is an Asterisk (maybe even FreeSWITCH) thing. In the PBX world (SIP or not) people refer to their accounts as an Extension. Hence “If you know your party’s extension you may dial it at anytime” common recording in IVRs because to norms out there an extension is their phone. It is what you dial to reach a destination. Within Asterisk it is a completely different thing because an extension in the extensions.conf doesn’t have to be dialable, it can be called on internally without the users or anyone but the Admin knowing it exists.

However, in the general world of PBXes the concept of an Extension is any destination that is can be dialed by a caller or user and be connected to a user (phone) or an internal application (voicemail, etc). So while Asterisk can have user,bob,1 no regular user will ever grasp how “bob” is an extension because they can’t dial “bob” or they can but to them it means it’s 202 because that’s what “bob” would translate to on their keypad.

Asterisk, unfortunately in the SIP world, has the reputation like Cisco in the networking world (or even in SIP) which is it doesn’t 100% follow standards and there are the “Asterisk ways” of doing things. Chan_SIP was never fully or in some cases close to being RFC compliant. Even PJSIP is lacking some RFC compliance for some important things.

In all my years of using Asterisk I’ve always had something like Kamailio or another variation of a SIP Proxy/SBC that sat in front of Asterisk to help cover the gaps that Asterisk had and still has. Gaps that don’t exist on fully or more fully RFC compliant systems.

1 Like

When IP Phone-C calls the extension-3001, only one phone(IP Phone-A) is ringing. IP Phone-B does not ring. The extensions are configured as PJSIP extension in FreePBX. Is there any specific configuration that needs to be done in FreePBX to enable Shared line appearance?

No, FreePBX will Dial all the known contacts in the AOR record for the PJSIP endpoint. So if this is already a PJSIP endpoint and the phone isn’t receiving calls you need to look as to why.

You need to run ‘pjsip set logger on’ and look at the SIP messages. Is the INVITE being sent to that phone contact? Is a reply coming back?

Are the phones and the PBX one the same local network?

This is not the place to ask questions about FreePBX. The nearest equivalent is

Thanks will post it in FreePBX forum.

Can you please give some examples to modify the sla.conf and extensions.conf file to configure Shared Line Appearance in Asterisk?

Please note that I am new to Asterisk and I have tried the following to accomplish SLA configuration so any sample configuration inputs would help.Reloaded the core and dialplan after modifying the files however SLA is not working as expected.

Path: /etc/asterisk

exten => 3001,Dial(PJSIP/3001&PJSIP/3001)

File: sla.conf
type = trunk
device = Local/disa@3001_outbound

device = SIP/3001_phone1
trunk = 3001

device = SIP/3001_phone2
trunk = 3001

I’ve never used sla.conf. If you are using the ability of chan_pjsip to handle multiple concurrent registrations I doubt that would interact with sla.conf at all, and you would only include the one device, corresponding to the AOR, in the dial string.

For chan_sip, you might use SIP/3001_phone1&SIP/3002_phone2 assuming you had used those device names in sip.conf.

I have tried to modify the AORS of the file “/etc/asterisk/pjsip.endpoint.conf” to something like below and when 3001 is dialed from IP-Phone-C, IP-Phone-A receives two calls instead of
IP-Phone-A receiving one call and another call by IP-Phone-B.


If the AORS are modified like below then both IP-Phone-A and IP-Phone-B receives the call but both are on different extensions. When IP-Phone-A answers the call , IP-Phone-B stops to ring


This looks more like hunt group or ring group.

What are you doing? Did you not read anything on PJSIP?

An AOR can have MULTIPLE contacts associated with it. If you have an PJSIP endpoint and the AOR has 5 contacts in it when you do Dial(PJSIP/3001) all 5 contacts are called. If you do Dial(PJSIP/3001&PJSIP/3001) you’re doing nothing but opening two calls to all 5 contacts.

There should be no need to have multiple AORs associated with the endpoint unless you are doing some advanced call routing that is waaaaay outside the scope of FreePBX.

On plain Asterisk the function PJSIP_DIAL_CONTACTS will dial all the contacts associated with the endpoint, but as you re using FreePBX in case the FreePBX dial plan do not use it, you would need to check on the advance settings o alter the dial plan directly on the extensions _ override _ freepbx.conf file

I am not sure where or how to add the contacts to the endpoint in Asterisk.
Say suppose,
Extension 3001(IP Phone-A) has 2 contacts that is ,
Contact-1 = 3002(IP Phone-C) and
Contact-2=3001(IP Phone-B).
When (IP Phone-D) calls Extension 3001, Will both (IP Phone-A) and (IP Phone-B) ring?

Below is the details from PJSIP conf file,

callerid=3001 <3001>

If you’re using FreePBX you go into the Advanced tab and set the Max Contacts to the number of total contacts you want to have. they would all use the same user and password to register with.

If you’re just using Asterisk, you set the max_contacts in the aor section of the config.

Thanks for the details.

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