设为首页收藏本站

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 943|回复: 2

DID based routing with trixbox / freePBX / pbxinaflash

[复制链接]
发表于 2010-12-14 08:46:45 | 显示全部楼层 |阅读模式
Regular Asterisk users users click here               
GENERAL INFORMATION
                In this guide we will configure inbound routing based on the DID (number) information returned by Callcentric. Since you are not able to initially configure DID based routing with Callcentric and freePBX / trixbox / pbxinaflash you will need to do further editing. NOTE: This will only work with trixbox/freePBX/pbxinaflash since those are the systems which contain the ext-did context.               

                Below we will provide the necessary information to configure your freePBX / trixbox / pbxinaflash installation to route based on the called DID in your Callcentric account.               

                Understand that this guide presents the most basic configuration for configuring DID based routing and is meant as a learning tool to configure your own complex routing. This is only a single method of many which may be applicable in this type of situation.               

                The setup information below is based on freepbx 2.1.3 and Asterisk 1.4; although most other older and newer versions should be very similar.               

               
                Please note that Callcentric is not responsible for preventing unwanted physical or remote access your IP PBX. If your IP PBX is compromised then you will be responsible for any damage caused.               
                Please be sure to read this guide regarding securing your IP PBX solution.
               


RESOURCES
Main Projects:
                freePBX - http://www.freepbx.org
                trixbox - http://www.trixbox.org
                PBX In A Flash - http://www.pbxinaflash.org[url=]Asterisk -[/url]http://www.digium.com

                                Help and Support:
                AussieVoIP sip_header information - sip_header
                AussieVoIP context information - contexts
                AussieVoIP extension information - extensions
               


CONFIGURATION
Prerequisites:
                In order to use this guide you will need a properly configured freePBX / trixbox installation which can receive incoming calls from Callcentric.                 You may double check our freePBX / trixbox setup guides to make sure that your system can at least initially receive incoming calls.

                Once you can receive incoming calls properly you may configure DID based routing by following the instructions below:               
               
1Required edit to Callcentric trunk and default configuration options

                                In your sip.conf, or sip_general_custom.conf, file please make sure that the following values are present. Note that there should only be a single line like the following in the file being edited:                               

                                context=incoming                               

                                Once the change has been made please save the file.                               

                                Next please find your current configured Callcentric trunk, either through the web interface command line or method of your choice. Then make sure that the following values are present in the PEER details:                               

                                context=incoming                               

                                Then in your register string please make sure that your 1777 number is NOT present at the end of the string, "/1777MYCCID". Your register string should be formatted in the following manner:                               

                                1777MYCCID:SUPERSECRET@callcentric.com                               

                                * Where 1777MYCCID is your Callcentric account number and SUPERSECRET is the same password you create when you sign up for your Callcentric account. Optionally you may change your SIP password in your preferences.                                 

                                Once done save your changes and reload your Asterisk process.                               

                                                                                                                       
2Creating or editing the inbound context

                                Here we will configure the inbound context which will be used to handle the routing of inbound calls to your freePBX / trixbox installation. To create this context you can either use the command line, a text editor of your choice or the trixbox interface to edit the extensions_custom.conf file.                                

                                Once you are able to access the extensions_custom.conf file you can follow the steps below:                               

                                1. Enter the following context:
[incoming]
exten => s,1,Set(Var_FROM_DOMAIN=${CUT(CUT(SIP_HEADER(TO),@,2),>,1)})
exten => s,2,GotoIF($["${Var_FROM_DOMAIN}" = "callcentric.com"]?5:3)
exten => s,3,GotoIF($["${Var_FROM_DOMAIN}" = "ss.callcentric.com"]?5:4)
exten => s,4,GotoIF($["${Var_FROM_DOMAIN}" = "66.193.176.35"]?5:7)
exten => s,5,Set(Var_TO_DID=${CUT(CUT(SIP_HEADER(TO),@,1),:,2)})
exten => s,6,GotoIF($["${Var_TO_DID}" != ""]?ext-did,${Var_TO_DID},1:7)
; Users may edit the lines below to route incoming calls to other locations/contexts.
; If you don't know what this means then you should likely skip the lines below and
; allow the script to run unmodified
exten => s,7,GoTo(from-pstn,s,1)
exten => h,8,Playback(ss-noservice)
exten => h,9,Macro(hangupcall)                               

                                * Where ${Var_TO_DID} is a Callcentric number/DID on your account for which you have configured an inbound route in the web management interface. You may also replace "ext-did,${Var_TO_DID}" with your own desired context information however this is ONLY recommended for advanced users.                                                               

                                2. Save the file.                                                               

                               
3Configure your inbound routing to route to your desired location

                                In trixbox / freePBX / pbxinaflash make sure to configure an inbound route with your 1777 number as the "DID Number" and the "Caller ID Number" as blank. For example:                               

                                1777MYCCID / any CID                               

                                Then configure the various routes for your DIDs/number with the specific number as the "DID Number" and the "Caller ID Number" as blank. For example:                               

                                MYCCDID1 / any CID
                                MYCCDID2 / any CID                               

                                Set the destination for these inbound calls to your desired location. For example MYCCDID1 can go to an IVR while MYCCDID2 can be sent to the sales department.                               

                               
4Placing Test Calls

                                Once you are done save your changes and then test incoming calling to see that your Asterisk setup now routes inbound calling based on the number called.

                                To test inbound calls from Callcentric to your new DID based routing setup, follow the directions listed in this FAQ.                                 You will also want to test calls directly to your DID from a PSTN phone if you have a DID on your account.                        
发表于 2011-5-19 00:11:17 | 显示全部楼层
女性美容的几个小秘密和小诀窍  

第一:多吃维生素
第二:早睡早起
第三:不抽烟不喝酒
第四:看帖要回帖






VIGGIE GREEN被誉为VIGGIE GREEN神奇和VIGGIE GREEN奇迹是明星必备VIGGIE GREEN瘦身品
发表于 2011-5-23 21:52:17 | 显示全部楼层
楼主好帖,不顶不精彩,希望这种帖子以后多一点哈





三仙矛草三仙矛草三仙矛草三仙矛草
您需要登录后才可以回帖 登录 | 注册

本版积分规则

手机版|小黑屋|BC Morning Website ( Best Deal Inc. 001 )  

GMT-8, 2025-8-26 09:05 , Processed in 0.014322 second(s), 17 queries .

Supported by Best Deal Online X3.5

© 2001-2025 Discuz! Team.

快速回复 返回顶部 返回列表