Using PJSIP and wanting to have multiple devices registered to the same extension?

The following are some hints to implement this.

As from the following post showing the set up of endpoints there is a section that defines a “contact/AOR” for the connection of a device to an endpoint.

To have multiple devices connected to the same endpoint there needs to be some configuration changes.

Under the Aor section for each of the endpoints in PJSIP.conf the max_contacts will need to change to the number of devices you want to have connected.

For example:

[6001]
type=aor
max_contacts=2

Once this been changed and asterisk reloaded. If you try to call the endpoint only one of the devices will ring, this will be the device that most recently registered.

The way to overcome this is to make changes to have the endpoint is dialled.

The extensions.conf file will need to be changed from exten => _6XXX,1,Dial(PJSIP/${EXTEN}) to exten => _6XXX,1,Dial(${PJSIP_DIAL_CONTACTS(${EXTEN})}).

What this does is dial all the contacts for the extension specified in a comma separated format such as:

Executing [6003@From-internal:X] Dial(“PJSIP/6001-00000050”, “PJSIP/6003/sip:[email protected]:61265;rinstance=4d4aca22ae70d7d2&PJSIP/6003/sip:[email protected]:49713;rinstance=dcc1d122a4d331d1,15,i”) in new stack