Asterisk ConfBridge

Home » Asterisk Users » Asterisk ConfBridge
Asterisk Users 3 Comments

This applicationĀ  enters the user into a specified conference bridge. The user can exit the conference by hangup only.
The join sound can be set using the CONFBRIDGE_JOIN_SOUND variable and the leave sound can be set using the CONFBRIDGE_LEAVE_SOUND variable. These can be unique to the caller. This application will not automatically answer the channel.

Syntax

ConfBridge([confno[,options]])

Arguments

  • confno – The conference number
  • options
    • a – Set admin mode.
    • A – Set marked mode.
    • c – Announce user(s) count on joining a conference.
    • m – Set initially muted.
    • M – Enable music on hold when the conference has a single caller. Optionally, specify a musiconhold class to use. If one is not provided, it will use the channel’s currently set music class, or default.
      • class
    • 1 – Do not play message when first person enters
    • s – Present menu (user or admin) when # is received (send to menu).
    • w – Wait until the marked user enters the conference.
    • q – Quiet mode (don’t play enter/leave sounds).

 

User provided sample:

[macro-confbridge-setup]

exten => s,1,Set(NUM=$[0${NUM} + 1]);
exten => s,n,Set(CONFNO=99${NUM})
exten => s,n,GotoIf(${DB_EXISTS(confbridge:${CONFNO})}?1)
exten => s,n,Set(DB(confbridge/${CONFNO})=1)

[foo]
exten => s,1,Macro(confbridge-setup)
exten => s,n,ConfBridge(${CONFNO})
exten => s,n,NoOp( ${DB_DELETE(confbridge/${CONFNO})} )
 

3 thoughts on - Asterisk ConfBridge

  • this seems to work:
    [macro-confbridge-setup]
    exten => s,1,Set(NUM=$[0${NUM} + 1]);
    exten => s,n,Set(CONFNO=99${NUM})
    exten => s,n,Set(CONFS=${SHELL(asterisk -rx “core show channels” | awk
    ‘/ConfBridge/ { print $2 }’ | awk -F@ ‘{ print $1 }’ | sort | uniq |
    grep ${CONFNO} )})
    exten => s,n,GotoIf($[“${CONFS}” = “${CONFNO}”]?1)
    exten => s,n,Noop(got a new conference# ${CONFNO})

    but there’s got to be a better way than spawning X shell commands for
    ‘asterisk -rx’, right ?

  • Note that ConfBridge in Asterisk 1.8 is nearly ‘experimental’, and it
    was almost completely rewritten for Asterisk 10. There is gained a lot
    more functionality, and much more flexible configuration system, and
    dialplan functions that allow access to the sorts of information you are
    looking for.

    In essence, I would suggest not spending too much time trying to work
    the Asterisk 1.8 version of ConfBridge into your dialplan/repertoire,
    unless you really need it. The version in Asterisk 10 is much, much better.