FreeSWITCH + 大唐网关 建立呼叫中心

FreeSWITCH 通过 Ip_Trunk 方式与大唐网关连接,大唐网关连接外线,通过号码前缀9 拨打外线,FreeSWITCH通过大唐网关与外线连接


1. 修改FreeSWITCH

(1)修改FreeSWITCH 添加大唐网关,参考如下文章:

http://wiki.freeswitch.org/wiki/Clarification:gateways

(2)修改外呼的拔号规则DialPlan


2. 修改大唐网关

(1)修改 IP 路由
播外线号码前加9,IP指向FreeSWITCH
(2)修改被叫
吞掉电话号码前缀9
(3)修改主叫

FreeSWITCH 注册号码为4位如1010,则主叫删除4位,并自定义一个8位号码作为呼叫中心统一的主叫号码


链接原文

http://wiki.freeswitch.org/wiki/Clarification:gateways

Clarification:gateways
Introduction

This has been a source of confusion for some, but it's really rather simple.

A bare-bones gateway setup for outbound calls with no username/pass (because you have ACL permission):

 
   
     
     
     
     
     
   

 


SIP gateways can be defined in the directory section _or_ the configuration section. In the default config, there are example gateways defined under the
conf/sip_profiles/external/example.xml
file, like so:


 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 


and also in the user directory, conf/directory/default/example.com.xml as well as brian.xml
conf/directory/default/example.com.xml



 
   
     
       
       
       
       
       
       
       
       
       
       
     

   

   
     
   

 



conf/directory/default/brian.xml


 
 
   
   
     
     
     
     
     
     
     
     
     
     
     
     
     
     
     
     
     
     
     
     
     
     
     
     
     
     
     
     
     
     
     
     
     
     
   

   
     
     
     
     
     
     
     
     
     
     
     
     
   

   
     
     
     
     
     
     
     
     
     
     

     
     

     
     
     
     
     
     
     
     
     
     
   


   
     
   

 



Clarification

So, why is it presented 3 different ways?

In a nutshell, the sip_profile declaration puts the gateway in the context of that sip_profile, insofar as when you stop/start/restart that sofia profile the gateway will stop/start/restart with it. In the second case, the default_provider example, the gateway comes up with the default directory (always). And in the final example, the gateway can be made to come up and down only when the user brian is registered.
Gateway Options
Params
Caller ID

If you want the caller ID to be in the "From:", which is CID type=none



Inbound Destination

By default, incoming calls on this gateway will go to the username.

If you want FreeSWITCH to respect the ${sip_to_user}, set the value to "auto_to_user". Be sure you have the context



Registration

If this gateway is ONLY for outbound calling, then there's rarely a need to maintain a registration ahead of time.



Variables

In addition to the parameters you can optionally set variables to set on either incoming or outgoing calls through this gateway. You set a direction, which sets it on both incoming and outgoing calls if omitted.


 ...params...
 
  
  
  
 



IRC Discussions

So should gateways go in configuration or in directory?

This question was answered by anthm a while back on IRC, here is what he said:

me too ...
my gateway is defined in sofia.conf.xml not in directory.xml
I'm kinda confused by the fact it can be defined in both places .. whats the difference?
enterprise vs shuttlecraft
<[intra]lanman> lol
heh
if you put them in a user tag in your directory you can then tell sofia to manage the whole
        domain and it will iterate all the users in that domain and reg the gateways
if you don't need that you can just put them in the sofia conf


What I gather from this is that if you only want certain extensions to be registered with your voip provider when a specific user registers with freeswitch you should define gateways in the directory section rather than in the sofia configuration. Conversely, if you always want an extension registered with a provider you would define the gateway as part of the sip profile.


你可能感兴趣的:(FreeSWITCH,freeswitch,FreeSWITCH,FreeSwitch,呼叫中心,大唐网关)