亚洲av成人无遮挡网站在线观看,少妇性bbb搡bbb爽爽爽,亚洲av日韩精品久久久久久,兔费看少妇性l交大片免费,无码少妇一区二区三区

  免費(fèi)注冊(cè) 查看新帖 |

Chinaunix

  平臺(tái) 論壇 博客 文庫(kù)
最近訪問板塊 發(fā)新帖
查看: 2524 | 回復(fù): 0
打印 上一主題 下一主題

關(guān)于fxo連接到sip電話的完全攻略 [復(fù)制鏈接]

論壇徽章:
0
跳轉(zhuǎn)到指定樓層
1 [收藏(0)] [報(bào)告]
發(fā)表于 2005-07-22 14:30 |只看該作者 |倒序?yàn)g覽
終于搞定了從cisco fxo端口進(jìn)來的電話打入sip和從sip打入pstn的問題了,下面就簡(jiǎn)單論述一下pstn-〉sip和sip-〉pstn的方法和配置。
首先,是軟硬件準(zhǔn)備工作:
    本人用的硬件列表如下:cisco 2621路由器一個(gè),voice 2v模塊一個(gè),兩個(gè)fxo卡,電腦一臺(tái)(廢話),sip小網(wǎng)關(guān)一個(gè),電話一臺(tái),電話入戶線4根。
    本人用的軟件列表如下:X-lite(到處都有下),Sip Express Router(
www.iptel.org
下載),windows XP(又是廢話), linux redhat 9,VMware8
然后,把所有的軟硬件都裝好,拓?fù)鋱D如下:
  

               
軟件安裝情況如下:sip server= linux+openssh+Sip express router,ip 1.1.1.1
                           Pc 機(jī)器上裝上xp+x-lite,ip 1.1.1.2
然后配置cisco路由器:
配置列表如下:
[color="#3300ff"]test-gw.cstnet.cn#show run
Building configuration...
[color="#3300ff"]Current configuration : 3726 bytes
!
version 12.3
service timestamps debug datetime msec
service timestamps log datetime msec
no service password-encryption
!
hostname test-gw.cstnet.cn
!
boot-start-marker
boot system flash:c2600-ipvoice-mz.123-6e.bin
boot-end-marker
!
logging buffered 10000 debugging
enable secret 5 $1$.9zL$7yX.iK6zyGtXqTmcfS3wW/
!
username darshan secret 5 $1$aIHe$FfeSyLQZ7rcBOi/WMxpDU.
username vega secret 5 $1$lgYW$AGKArfEgWDTsYcgBNKgxb1
username banyan secret 5 $1$2.Ys$lcp/j1XKiHYwPLa9.3ctB/
aaa new-model
!
!
aaa session-id common
ip subnet-zero
ip cef
!
!
!
no ip domain lookup
no ftp-server write-enable
!
!
no voice hunt unassigned-number
no voice hunt invalid-number
voice call carrier capacity active
voice rtp send-recv
voice dsp release early
!
voice service pots
!
voice service voip
cause-code legacy
sip
!
voice class codec 1
codec preference 1 g723r63
codec preference 2 g729r8
codec preference 3 g729br8
codec preference 4 g723r53
codec preference 7 g726r16
codec preference 8 g726r24
codec preference 9 g726r32
codec preference 10 g711alaw
codec preference 11 g711ulaw
codec preference 12 g723ar53
codec preference 13 g723ar63
!
!
!
!
!
!
!
!
!         
fax interface-type fax-mail
call-history-mib retain-timer 10
call-history-mib max-size 10
!
!
!
!
interface Loopback0
no ip address
shutdown
!
interface FastEthernet0/0
no ip address
duplex auto
speed auto
!
interface FastEthernet0/1
ip address 1.1.1.3 255.255.255.0
[color="#3300ff"] duplex auto
speed auto
!
ip classless
no ip http server
!
!
!
call application voice pstn2sip flash:fxo2sip.tcl
call application voice pstn2sip redirect-list-len 1
call application voice pstn2sip number_1 81111111-0992
[color="#3300ff"]
voice-port 1/0/0
[color="#3300ff"]
disc_pi_off
input gain 5
echo-cancel coverage 32
cptone CN
timeouts interdigit 5
timeouts call-disconnect 1
timeouts ringing 5
timeouts wait-release 5
timing guard-out 1000
description "The FXO bound """
bearer-cap Speech
supervisory disconnect anytone
signal groundStart
!
voice-port 1/0/1
disc_pi_off
input gain 5
echo-cancel coverage 32
cptone CN
timeouts interdigit 5
timeouts call-disconnect 1
timeouts ringing 5
timeouts wait-release 5
timing guard-out 1000
description "The FXO bound """
bearer-cap Speech
supervisory disconnect anytone
signal groundStart
!
voice-port 1/1/0
disc_pi_off
input gain 5
echo-cancel coverage 32
cptone CN
timeouts interdigit 5
timeouts call-disconnect 1
timeouts ringing 5
timeouts wait-release 5
timing guard-out 1000
description "The FXO bound """
bearer-cap Speech
supervisory disconnect anytone
signal groundStart
!
voice-port 1/1/1
disc_pi_off
input gain 5
echo-cancel coverage 32
cptone CN
timeouts interdigit 5
timeouts call-disconnect 1
timeouts ringing 5
timeouts wait-release 5
timing guard-out 1000
description "The FXO bound """
bearer-cap Speech
supervisory disconnect anytone
signal groundStart
!
!
!
!
!
dial-peer voice 10 pots
description "Call Outgoing from 811111111"
destination-pattern .T
port 1/0/0
prefix 0
!
dial-peer voice 400 voip
description "Accept Sip call"
huntstop
destination-pattern T
voice-class codec 1
session protocol sipv2
dtmf-relay rtp-nte
!
dial-peer voice 100 voip
description "Forward to Sip"
huntstop
destination-pattern 099.T
session protocol sipv2
session target sip-server
!
dial-peer voice 20 pots
description "Call Incoming from PSTN"
application pstn2sip
incoming called-number T
direct-inward-dial
port 1/0/0
forward-digits 0
!
dial-peer voice 30 pots
description "For call to local DID"
destination-pattern 8111T
port 1/0/0
!
dial-peer voice 40 pots
shutdown
port 1/0/0
prefix 0992
!
gateway
!
sip-ua
nat symmetric check-media-src
retry invite 4
retry response 3
retry bye 2
retry cancel 2
sip-server ipv4:1.1.1.1
!
!
call-manager-fallback
!
!
line con 0
exec-timeout 240 0
line aux 0
line vty 0 4
exec-timeout 600 0
!
!
!
end
#
# $Id: ser.cfg,v 1.21.4.1 2003/11/10 15:35:15 andrei Exp $
#
# simple quick-start config script
#
[color="#0066ff"]# ----------- global configuration parameters ------------------------
[color="#0066ff"]#debug=3         # debug level (cmd line: -dddddddddd)
#fork=yes
#log_stderror=no # (cmd line: -E)
[color="#0066ff"]/* Uncomment these lines to enter debugging mode
debug=7
fork=no
log_stderror=yes
*/
[color="#0066ff"]check_via=no # (cmd. line: -v)
dns=no           # (cmd. line: -r)
rev_dns=no      # (cmd. line: -R)
#port=5060
#children=4
fifo="/tmp/ser_fifo"
[color="#0066ff"]# ------------------ module loading ----------------------------------
[color="#0066ff"]# Uncomment this if you want to use SQL database
#loadmodule "/usr/lib/ser/modules/mysql.so"
[color="#0066ff"]loadmodule "/usr/lib/ser/modules/sl.so"
loadmodule "/usr/lib/ser/modules/tm.so"
loadmodule "/usr/lib/ser/modules/rr.so"
loadmodule "/usr/lib/ser/modules/maxfwd.so"
loadmodule "/usr/lib/ser/modules/usrloc.so"
loadmodule "/usr/lib/ser/modules/registrar.so"
[color="#0066ff"]# Uncomment this if you want digest authentication
# mysql.so must be loaded !
#loadmodule "/usr/lib/ser/modules/auth.so"
#loadmodule "/usr/lib/ser/modules/auth_db.so"
[color="#0066ff"]# ----------------- setting module-specific parameters ---------------
[color="#0066ff"]# -- usrloc params --
[color="#0066ff"]modparam("usrloc", "db_mode",   0)
[color="#0066ff"]# Uncomment this if you want to use SQL database
# for persistent storage and comment the previous line
#modparam("usrloc", "db_mode", 2)
[color="#0066ff"]# -- auth params --
# Uncomment if you are using auth module
#
#modparam("auth_db", "calculate_ha1", yes)
#
# If you set "calculate_ha1" parameter to yes (which true in this config),
# uncomment also the following parameter)
#
#modparam("auth_db", "password_column", "password")
[color="#0066ff"]# -- rr params --
# add value to ;lr param to make some broken UAs happy
modparam("rr", "enable_full_lr", 1)
[color="#0066ff"]# -------------------------  request routing logic -------------------
[color="#0066ff"]# main routing logic
[color="#0066ff"]route{
[color="#0066ff"] # initial sanity checks -- messages with
# max_forwards==0, or excessively long requests
if (!mf_process_maxfwd_header("10")) {
  sl_send_reply("483","Too Many Hops");
  break;
};
if ( msg:len > max_len ) {
  sl_send_reply("513", "Message too big");
  break;
};
[color="#0066ff"] # we record-route all messages -- to make sure that
# subsequent messages will go through our proxy; that's
# particularly good if upstream and downstream entities
# use different transport protocol
record_route();
# loose-route processing
if (loose_route()) {
  t_relay();
  break;
};
[color="#0066ff"] # if the request is for other domain use UsrLoc
# (in case, it does not work, use the following command
# with proper names and addresses in it)
if (uri==myself) {
[color="#0066ff"]  if (method=="REGISTER") {
[color="#0066ff"]# Uncomment this if you want to use digest authentication
#   if (!www_authorize("iptel.org", "subscriber")) {
#    www_challenge("iptel.org", "0");
#    break;
#   };
[color="#0066ff"]   save("location");
   break;
  };
      
  # native SIP destinations are handled using our USRLOC DB
  if (!lookup("location")) {
[color="#0066ff"]                   if (uri=~"^sip:[1-9][0-9]{7}@") {
         
          rewritehostport("1.1.1.3:5060");
          t_relay_to_udp("1.1.1.3","5060");
          break;
[color="#0066ff"]      };
                    if (uri=~"^sip:86010536@") {
                        
                        rewritehostport("1.1.1.3:5060");
                        t_relay_to_udp("1.1.1.3","5060");
                        break;
[color="#0066ff"]                        };
[color="#0066ff"]   sl_send_reply("404", "Not Found");
   break;
  };
};
# forward to current uri now; use stateful forwarding; that
# works reliably even if we forward from TCP to UDP
if (!t_relay()) {
  sl_reply_error();
};
[color="#0066ff"]}
[color="#000066"]這樣,就可以通過設(shè)置x-lite 號(hào)碼為0992,密碼任意(這里沒有做認(rèn)證),domain 為1.1.1.1,sip服務(wù)器為1.1.1.1來打入到pstn了
[color="#000066"]從pstn打入sip我也通過tcl ivr編程來完成了這個(gè)功能,需要的留言給我。
[color="#000066"]編寫SER.cfg如下:

本文來自ChinaUnix博客,如果查看原文請(qǐng)點(diǎn):http://blog.chinaunix.net/u/1325/showart_37131.html
您需要登錄后才可以回帖 登錄 | 注冊(cè)

本版積分規(guī)則 發(fā)表回復(fù)

  

北京盛拓優(yōu)訊信息技術(shù)有限公司. 版權(quán)所有 京ICP備16024965號(hào)-6 北京市公安局海淀分局網(wǎng)監(jiān)中心備案編號(hào):11010802020122 niuxiaotong@pcpop.com 17352615567
未成年舉報(bào)專區(qū)
中國(guó)互聯(lián)網(wǎng)協(xié)會(huì)會(huì)員  聯(lián)系我們:huangweiwei@itpub.net
感謝所有關(guān)心和支持過ChinaUnix的朋友們 轉(zhuǎn)載本站內(nèi)容請(qǐng)注明原作者名及出處

清除 Cookies - ChinaUnix - Archiver - WAP - TOP