中国VoIP网论坛

现在的时间是 2010-09-09, 7:17

当前时区为 UTC + 8 小时




发表新帖 回复这个主题  [ 11 篇帖子 ] 
作者 内容
 文章标题 : freeswitch 实战简介 1
帖子发表于 : 2010-01-25, 8:17 
离线
高级
头像

注册: 2007-07-13, 1:07
帖子: 126
freeswith 同 asterisk 比较,在并发 100 channel 以上,具有明显的稳定性。asterisk 则经常自动重启或瘫痪。

代码:
<include>
  <gateway name="sipprovider">
        <param name="username" value="user"/>
        <param name="password" value="pass"/>
        <param name="realm" value="*"/>
        <param name="proxy" value="sipprovider_ip_addr"/>
        <param name="register" value="true"/>
        <param name="expire-seconds" value="600"/>
        <param name="ping" value="30" />
        <param name="sip-trace" value="true" />
  </gateway>
</include>



个人的 link:

http://blog.csdn.net/gangban_lau/archiv ... 43284.aspx


最后由 wtaochange 编辑于 2010-04-22, 4:23,总共编辑了 7 次

页首
 用户资料  
 
 文章标题 : Re: freeswitch 一些 link
帖子发表于 : 2010-02-27, 6:03 
离线
高级
头像

注册: 2007-07-13, 1:07
帖子: 126
代码:

freeswitch@internal> sofia profile external killgw globtelecom
+OK gateway marked for deletion.

freeswitch@internal> sofia profile external rescan  reloadxml
Reload XML [Success]
+OK scan complete

freeswitch@internal> reloadxml
+OK [Success]


==========

system-config-network, which replaced netconfig in old centos version.


页首
 用户资料  
 
 文章标题 : 动态安装,卸载模块
帖子发表于 : 2010-03-16, 9:30 
离线
高级
头像

注册: 2007-07-13, 1:07
帖子: 126
module name in file "autoload_configs/modules.conf.xml"
代码:
1.  edit xml file
2.
freeswitch@internal> reloadxml
+OK [Success]

3.
freeswitch@internal> unload mod_logfile
+OK
4.
freeswitch@internal> load mod_logfile
+OK
5. check if log file is generated.

================================
freeswitch@internal> unload mod_xml_cdr
+OK
freeswitch@internal> load mod_xml_cdr
+OK
================================
root@ser3:/usr/local/freeswitch/mod# cd /usr/local/freeswitch/mod/
================================

rotate logfile:

in shell cli:
kill -HUP `cat /usr/local/freeswitch/run/freeswitch.pid`

in freeswitch cli:
fsctl send_sighup

in cronjob:
20 4 1 * * /bin/kill -HUP `/bin/cat /usr/local/freeswitch/run/freeswitch.pid`



最后由 wtaochange 编辑于 2010-05-08, 3:50,总共编辑了 1 次

页首
 用户资料  
 
 文章标题 : 调试 问题
帖子发表于 : 2010-03-21, 0:34 
离线
高级
头像

注册: 2007-07-13, 1:07
帖子: 126
fs_cli> console loglevel [0-7] (where 1=EMERG and 7=DEBUG)

fs_cli> sofia loglevel <all|default|tport|iptsec|nea|nta|nth_client|nth_server|nua|soa|sresolv|stun> [0-9]

fs_cli> sofia loglevel all 0

fs_cli > sofia profile <profilename> siptrace on|off

fs_cli > sofia tracelevel info #details in log/freeswitch.log file


refer:
http://www.fredshack.com/docs/freeswitch.html


页首
 用户资料  
 
 文章标题 :
帖子发表于 : 2010-04-02, 10:51 
离线
高级
头像

注册: 2007-07-13, 1:07
帖子: 126
检测网卡端口 的状况:


tcpdump -A udp port 5080

tcpdump -ni eth0 udp    -w /tmp/test.pcap

tcpdump -ni eth0 udp port 4569 -w /tmp/test.pcap


最后由 wtaochange 编辑于 2010-04-05, 23:27,总共编辑了 1 次

页首
 用户资料  
 
 文章标题 :
帖子发表于 : 2010-04-02, 11:19 
离线
高级
头像

注册: 2007-07-13, 1:07
帖子: 126
esl 模块编译:

root@ser7:/usr/src/freeswitch-1.0.5-20100328-0400/libs/esl

===================

make perlmod

===================


页首
 用户资料  
 
 文章标题 : Re: freeswitch 实战简介
帖子发表于 : 2010-04-03, 10:45 
离线
高级
头像

注册: 2007-07-13, 1:07
帖子: 126
asterisk (192.168.0.10) <==> freeswitch

代码:
1. did forward,   freeswitch => asterisk

2. outgoing trunk, asterisk => freeswitch

=====================================

asterisk:

sip.conf

*************************
externip=router ip (your external IP)
localnet=192.168.0.0/255.255.255.0 (server server ip range)
*************************

type=friend
port=[color=red]5080[/color] ; freeswitch 的 external 要求
qualify=yes
canreinvite=no
host=67.212.64.81
context=from-trunk
nat=yes
disallow=all
allow=g729


freeswitch:

1. external, customer.xml (this is easy)

2. did forwarding:

dialplan/defaut.xml:

<extension name="did">
    <condition field="destination_number" expression="^1{0,1}(\d{10})$">
        <action application="bridge" data="sofia/gateway/customer/$1"/>
    </condition>
</extension>


3. outgoing trunk

public/00_inbound_did.xml:

<extension name="customer_out">
    <condition field="destination_number" expression="^{0,1}(\d{10})$">
        <action application="bridge" data="sofia/internal/$1@xx.xx.xx.xx"/>
    </condition>
</extension>

xx.xx.xx.xx, which is the IP of outgoing trunk server.




页首
 用户资料  
 
 文章标题 : reload freeswitch remotely...
帖子发表于 : 2010-04-15, 23:32 
离线
高级
头像

注册: 2007-07-13, 1:07
帖子: 126
#!/bin/sh

rsync -av --delete /fs/conf/sip_profiles server:/fs/conf/sip_profiles
rsync -av --delete /fs/conf/dialplan server:/fs/conf/dialplan

ssh server '/fs/bin/fs_cli -p password -q -x "sofia profile external rescan reloadxml"'
ssh server '/fs/bin/fs_cli -p password -q -x "reloadxml"'


页首
 用户资料  
 
 文章标题 : dump current calls
帖子发表于 : 2010-05-11, 5:06 
离线
高级
头像

注册: 2007-07-13, 1:07
帖子: 126
/fs/bin/fs_cli -p password -x 'show channels' > out.txt


fsctl hupall normal_clearing dialed_ext 1000


页首
 用户资料  
 
 文章标题 : Re: freeswitch 实战简介 1
帖子发表于 : 2010-06-18, 3:48 
离线
高级
头像

注册: 2007-07-13, 1:07
帖子: 126
代码:

#!/usr/bin/perl -w

use RPC::XML::Client;
use Data::Dumper;


        my($host, $passwd) = ('freeswitch ip', 'api password');


        my $client = new RPC::XML::Client('http://'.$host.':8080/RPC2');
        my $req = RPC::XML::request->new('freeswitch.api',
                                         #'show',
                                         #'channels');
                                         #'load',
                                         #'mod_event_socket');
                                         'reloadxml',
                                         '');

        $client->credentials ("freeswitch" , "freeswitch", $passwd);
        $res = $client->send_request($req);
        my $value = $res->value;
        chomp($value);

        print Dumper $req;
        print Dumper $value;


页首
 用户资料  
 
 文章标题 : 如何限制一个 ip, 并发数,号码匹配。
帖子发表于 : 2010-07-08, 1:46 
离线
高级
头像

注册: 2007-07-13, 1:07
帖子: 126
代码:
   <extension name="fromasia">
    <condition field="network_addr" expression="^211\.211\.65\.170$"/>
    <condition field="destination_number" expression="^(0119[1-2]\d+)$">
      <action application="limit" data="db inbound 10" />
      <action application="answer"/>
      <action application="park" data=""/>
     </condition>
   </extension>


如果对方的服务器地址是 211.211.65.170
并且拨打得号码匹配 01191 或者 01192
限制最大的并发数是 10

park 这个号码。


页首
 用户资料  
 
显示帖子 :  排序  
发表新帖 回复这个主题  [ 11 篇帖子 ] 

当前时区为 UTC + 8 小时


在线用户

正在浏览此版面的用户:没有注册用户 和 1 位游客


不能 在这个版面发表主题
不能 在这个版面回复主题
不能 在这个版面编辑帖子
不能 在这个版面删除帖子
不能 在这个版面提交附件

查找:
前往 :  
cron
Powered by phpBB © 2000, 2002, wu, 2005, 2007 phpBB Group
简体中文语系由 PHPBB中文翻译小组 维护制作

phpBB PHPBB Hacks PHPBB Styles Nederlandstalige phpBB Support phpbbw4c phpbbegypt.com cnphpbb.com cooldtp.cn singapuraforum SubLet.cn Zen-Cart phpBB China
[BambooCat Planet] [OurPlus] [MySnooker]