Remote BLF's using PJSIP
Â
This page will outline how to setup remote phone BLF's using PJSIP between two PBX's which will monitor the device state of remote phones.
Â
Asterisk Background
Â
Environment
Â
Set BLF's on Phones
Create a context=from-internal trunk on each PBX to route calls and to send the PUBLISH for device-states
Â
FreePBXÂ
PBXact
 Â
Â
FreePBX Config
Edit the pjsip.endpoint_custom.conf by adding the following data
[PBXact] type=endpoint  [PBXact-devicestate] type=outbound-publish server_uri=sip:FreePBX@10.39.96.5 event=asterisk-devicestate @body=application/dialog-info+xml @context=^users  [PBXact] type=asterisk-publication devicestate_publish=PBXact-devicestate mailboxstate_publish=PBXact-mwi device_state=yes mailbox_state=yes @body=application/dialog-info+xml @context=^users   [PBXact] type=inbound-publication event_asterisk-devicestate=PBXact event_asterisk-mwi=PBXact
Edit the extensions_custom.conf
[from-internal-custom] exten => _[47]xxx,hint,PJSIP/${EXTEN}&PJSIP/90${EXTEN}&PJSIP/99${EXTEN}&Custom:DND${EXTEN},CustomPresence:${EXTEN}Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â ; *** note that the dialplan is looking for extensions in the range of 4xxx or 7xxx
PBXAct Config
Edit the pjsip.endpoint_custom.conf by adding the following data
[FreePBX] type=endpoint  [FreePBX-devicestate] type=outbound-publish server_uri=sip:PBXact@10.39.96.4:5061 event=asterisk-devicestate @body=application/dialog-info+xml @context=^users  [FreePBX] type=asterisk-publication devicestate_publish=FreePBX-devicestate mailboxstate_publish=FreePBX-mwi device_state=yes mailbox_state=yes @body=application/dialog-info+xml @context=^users  [FreePBX] type=inbound-publication event_asterisk-devicestate=FreePBX event_asterisk-mwi=FreePBX
Â
Edit the extensions_custom.conf
To show hints from each PBX respectively you may enter the following
From the PBX CLI from the FreePBX: asterisk -rx 'core show hints'|grep -i (ext)
As you can see, FreePBX instance is watching extensions 7200 and 4100 from PBXact
When the user is on a call, BLF will change as well as the hintÂ
DND can also be monitored as well     Â
Â