Skip to main content

Freeswitch-nanpa-project

About

This page desribes an effort to provide a US-standard configuration file for PBX vertical service codes.

The NANPA vertical service codes are [listed at(https://www.nationalnanpa.com/number_resource_info/vsc_assignments.html)

Click here to expand Table of Contents

nanpa.xml or us-vsc.xml //.

<--*00 - Inward Voice Activated Services (English)-->
<--*01 - Inward Voice Activated Services (French) -->
<--*02 - Deactivation/Activation of In-Session Activation (ISA)on a per line basis -->
<--*03 - Deactivation of In-Session Activation (ISA) on a per call basis -->
<--*2X - Reserved for expansion to 3digit VSCs -->
<--*228 - Over-the-Air Service Provisioning -->
<--*272 - Access Wireless Priority Service -->
<--*3X - Reserved for expansion to 3-digit VSCs -->
<--*40 - Change Forward-To Number for Customer Programmable Call Forwarding Busy Line -->
<--*41 - Six-Way Conference Calling Activation -->
<--*42 - Change Forward-To Number for Customer Programmable Call Forwarding Don't Answer -->
<--*43 - Drop last member of Six-Way Conference Call -->
<--*44 - Voice Activated Dialing -->
<--*45 - Voice Dialing Extended Dial Tone -->
<--*46 - French Voice Activated Network Control -->
<--*47 - Override Feature Authorization -->
<--*48 - Override Do Not Disturb -->
<--*49 - Long Distance Signal -->
<--*50 - Voice Activated Network Control -->
<--*51 - Who Called Me? -->
<--*52 - Single Line Variety Package (SVP) - Call Hold -->
<--*53 - Single Line Variety Package (SVP) - Distinctive Ring B -->
<--*55 - Single Line Variety Package (SVP) - Distinctive Ring D -->
<--*56 - Change Forward-To Number for ISDN Call Forwarding  -->
<--*57 - Customer Originated Trace  -->
<--*58 - ISDN MBKS Manual Exclusion Activation  -->
<--*59 - ISDN MBKS Manual Exclusion Deactivation -->
<--*60 - Selective Call Rejection Activation -->
<--*61 - Distinctive Ringing/Call Waiting Activation -->
<--*62 - Selective Call Waiting -->
<--*63 - Selective Call Forwarding Activation -->
<--*64 - Selective Call Acceptance Activation -->
<--*65 - Calling Number Delivery Activation -->
<--*66 - Automatic Callback Activation -->
<--*67 - Calling Number Delivery Blocking -->
<extension name="call_privacy">
<condition field="destination_number" expression="^67(\d+)$">
<action application="privacy" data="full"/>
<action application="set" data="sip_h_Privacy=id"/>
<action application="set" data="privacy=yes"/>
<action application="transfer" data="$1 XML default"/>
</condition>
</extension>
<--*68 - Call Forwarding Busy Line/Don't Answer Activation -->
<--*69 - Automatic Recall Activation -->
<extension name="call_return">
<condition field="destination_number" expression="^\*69$|^869$|^lcr$">
<action application="transfer" data="${db(select/${domain_name}-call_return/${caller_id_number})}"/>
</condition>
</extension>
<--*70 - Cancel Call Waiting -->
<--*71 - Usage Sensitive Three-way Calling -->
<--*72 - Call Forwarding Activation -->
<--*73 - Call Forwarding Deactivation -->
<--*74 - Speed Calling 8 - Change List -->
<--*75 - Speed Calling 30 - Change List -->
<--*76 - Advanced Call Waiting Deluxe -->
<--*77 - Anonymous Call Rejection Activation -->
<--*78 - DND on - Do Not Disturb Activation -->
<extension name="dnd-on" >
<condition field="destination_number" expression="^\*78$" >
<action application="pre_answer" />
<action application="db" data="insert/user-dnd/${sip_from_user}/1" />
<action application="playback" data="ivr/ivr-dnd_activated.wav" />
</condition>
</extension>


<!-- then direct the inbound calls during DND somewhere else, e.g. to VM -->
<condition field="${db(select/user-dnd/${destination_number})}" expression="^1$"/>
<--*79 - DND off - Do Not Disturb Deactivation -->
<extension name="dnd-off" >
<condition field="destination_number" expression="^\*79$" >
<action application="pre_answer" />
<action application="db" data="delete/user-dnd/${sip_from_user}" />
<action application="playback" data="ivr/ivr-dnd_cancelled.wav" />
</condition>
</extension>
<--*80 - Selective Call Rejection Deactivation  -->
<--*81 - Distinctive Ringing/Call Waiting Deactivation  -->
<--*82 - Line Blocking Deactivation -->
<--*83 - Selective Call Forwarding Deactivation -->
<--*84 - Selective Call Acceptance Deactivation -->
<--*85 - Calling Number Delivery Deactivation -->
<--*86 - Automatic Callback Deactivation -->
<--*87 - Anonymous Call Rejection Deactivation -->
<--*88 - Call Forwarding Busy Line/Don't Answer Deactivation -->
<--*89 - Automatic Recall Deactivation -->
<--*90 - Customer Programmable Call Forwarding Busy Line Activation -->
<--*91 - Customer Programmable Call Forwarding Busy Line Deactivation -->
<--*92 - Customer Programmable Call Forwarding Don't Answer Activation -->
<--*93 - Customer Programmable Call Forwarding Don't Answer Deactivation -->
<--*94 - Reserved For Local Assignment -->
<--*95 - Reserved For Local Assignment -->
<--*96 - Reserved For Local Assignment -->
<--*97 - VoiceMail No CID -->
<extension name="vmain2">
<condition field="destination_number" expression="^vmain2$|^\*97$|^\*4000$">
<action application="answer"/>
<action application="sleep" data="1000"/>
<action application="voicemail" data="check default ${domain_name}"/>
</condition>
</extension>
<--*98 - VoiceMail CID -->
<extension name="vmain">
<condition field="destination_number" expression="^vmain$|^\*98$">
<action application="answer"/>
<action application="sleep" data="1000"/>
<action application="voicemail" data="check default ${domain_name} ${sip_from_user}"/>
</condition>
</extension>
<--*99+exten 3/4/5 digit send call direct to exten voicemail -->
<extension name="send_to_voicemail_5digits">
<condition field="destination_number" expression="^\*99(\d{5})$">
<action application="answer"/>
<action application="sleep" data="1000"/>
<action application="set" data="dialed_extension=$1"/>
<action application="export" data="dialed_extension=$1"/>
<action application="voicemail" data="default ${domain_name} ${dialed_extension}"/>
</condition>
</extension>

<extension name="send_to_voicemail_4digits">
<condition field="destination_number" expression="^\*99(\d{4})$">
<action application="answer"/>
<action application="sleep" data="1000"/>
<action application="set" data="dialed_extension=$1"/>
<action application="export" data="dialed_extension=$1"/>
<action application="voicemail" data="default ${domain_name} ${dialed_extension}"/>
</condition>
</extension>

<extension name="send_to_voicemail_3digits">
<condition field="destination_number" expression="^\*99(\d{3})$">
<action application="answer"/>
<action application="sleep" data="1000"/>
<action application="set" data="dialed_extension=$1"/>
<action application="export" data="dialed_extension=$1"/>
<action application="voicemail" data="default ${domain_name} ${dialed_extension}"/>
</condition>
</extension>