Telephone system:Simple intercom

From Hackerspace ACKspace
Revision as of 10:59, 23 September 2012 by Xopr (talk | contribs) (moving telephone scripts to separate pages)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

dialplan snippet

Upon dialing *<number>, this snippet will create a conference for the caller, and will try for 5 seconds to add the callee as <number>_intercom which is an auto-answer line 2 setup on the cisco phones containing a sip image.

<extension name="extension-intercom">
    <condition field="destination_number" expression="^\*(1[09]\d\d)$" break="on-false">
        <action application="set" data="dialed_extension=$1"/>
        <action application="sleep" data="300"/>
    </condition>

    <condition>
        <action application="set" data="api_hangup_hook=conference 412 kick all"/>
        <action application="answer"/>
        <action application="export" data="sip_invite_params=intercom=true"/>
        <action application="export" data="sip_auto_answer=true"/>
        <action application="set" data="conference_auto_outcall_caller_id_name=$${effective_caller_id_name}"/>
        <action application="set" data="conference_auto_outcall_caller_id_number=$${effective_caller_id_number}"/>
        <action application="set" data="conference_auto_outcall_timeout=5"/>
        <action application="set" data="conference_auto_outcall_flags=mute"/>
        <action application="conference_set_auto_outcall" data="user/${dialed_extension}_intercom@${domain_name}"/>
        <action application="conference" data="412@intercom"/>

        <!-- Shouldn't be needed -->
        <action application="conference" data="412 kick all"/>
    </condition>
</extension>

todo

There is a auto_answer perl script that logs into the phone and changes the auto-answer setting: I might want to upload it here.