Skip to end of metadata
Go to start of metadata

Intercom and Monitor

The Intercom and Monitor softkeys inside a contacts details have been replaced by the use of defined Smart BLF <action>s.  The older behavior of defining can_monitor and / or can_intercom has been deprecated.  For more information about using <action>s to achieve this functionality, please read the Smart BLF examples.

Dialplan example

The following presents a dialplan example of using the X-Digium-Call-Feature headers to handle Intercom and Monitor functionality.

exten => _[1-2]XX,1,NoOp()
same => n,GotoIf($["${PJSIP_HEADER(read,X-Digium-Call-Feature)}" = "feature_monitor"]?monitor:notmonitor)
same => n(notmonitor),GotoIf($["${PJSIP_HEADER(read,X-Digium-Call-Feature)}" = "feature_intercom"]?intercom:notintercom)
same => n,(intercom)Dial(PJSIP/${EXTEN},20,b(handler-intercom^addheader^1))
same => n,Hangup()
same => n(notintercom),Dial(PJSIP/${EXTEN},20)
same => n,Hangup()
same => n(monitor),ChanSpy(PJSIP/${EXTEN},q)
same => n,Hangup()

 
[handler-intercom]
exten => addheader,1,Set(PJSIP_HEADER(add,Alert-Info)=<intercom>)
same => n,Return()
  • No labels