Example Setup, Asterisk running on the same machine as siproxd (= NAT host).
I use a iptables rule to redirect all outgoing SIP traffix from Asterisk
to siproxd.
/etc/sysconfig/iptables:
------------------------
*nat
######################################################################
# NAT: redirect locally generated packets
:OUTPUT - [0:0]
#########################
#
# Asterisk Traffix via local siproxd. (must use DNAT to inbound IF! not REDIRECT)
-A OUTPUT -o ppp+ -p udp --sport 5061 -j DNAT --to-destination 192.168.1.1:5060
COMMIT
/etc/asterisk/sip.conf:
-----------------------
[general]
context = default
allowoverlap = no ; Disable overlap dialing support. (Default is yes)
bindport = 5061 ; use a different port than 5060, as that port will be
; occupied by siproxd!
bindaddr = 0.0.0.0 ; IP address to bind to (0.0.0.0 binds to all)
srvlookup = yes ; Enable DNS SRV lookups on outbound calls
; g726 sounds very bad, useless!
; g722 is a dead end, no conversion from/to possible
; g729 sound like through a long metal tube
disallow = all
allow = gsm,ulaw,alaw,adpcm,speex,g729,g723
autoframing = yes
allowexternaldomains = yes
allowexternalinvites = yes
allowguest = yes
allowsubscribe = no
allowtransfer = yes
alwaysauthreject = no
autodomain = yes
callevents = no
compactheaders = no
dumphistory = no
g726nonstandard = no
ignoreregexpire = no
jbenable = no
jbforce = no
jblog = no
maxcallbitrate = 384
maxexpiry = 3600
minexpiry = 180
notifyringing = no
pedantic = no
promiscredir = no
recordhistory = no
relaxdtmf = no
rtcachefriends = no
rtsavesysname = no
rtupdate = no
sendrpid = yes
sipdebug = no
t1min = 100
progressinband = no
t38pt_udptl = no
trustrpid = no
usereqphone = no
videosupport = no
;
; the following is required when using siproxd with local DNAT rule
nat=never
externip=192.168.1.1
;
localnet = 192.168.0.0/16 ; my inbound network with local UAs
domain = 192.168.1.1 ; inbound IP of host running Asterisk and siproxd
domain = mynatfirewall ; -"-
canreinvite = no
useragent = PBX ; sipcall.ch (and others?) require UA string
; to be different from "AsteriskPBX"
[authentication]
;---end---
/etc/asterisk/users.conf
------------------------
[general]
;
; Full name of a user
;
fullname = New User
userbase = 200
;
; Create voicemail mailbox and use use macro-stdexten
;
hasvoicemail = yes
;
; Set voicemail mailbox 6000 password to 1234
;
vmsecret = 1234
;
; Create SIP Peer
;
hassip = yes
hasiax = no
;
;
; Create manager entry
;
hasmanager = no
;
; Remaining options are not specific to users.conf entries but are general.
;
callwaiting = yes
threewaycalling = yes
callwaitingcallerid = yes
transfer = yes
canpark = yes
cancallforward = yes
callreturn = yes
callgroup = 1
pickupgroup = 1
host = dynamic
localextenlength = 3
allow_aliasextns = no
allow_an_extns = no
hasagent = no
hasdirectory = no
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; Local SIP UAs
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
[201]
callwaiting = yes
cid_number = 201
context = local_sip
email = [email protected]
fullname = Full Name
group =
hasagent = yes
hasdirectory = yes
hasiax = no
hasmanager = no
hassip = yes
hasvoicemail = yes
host = dynamic
mailbox = 201
secret = <secret for AUTH>
threewaycalling = yes
zapchan =
registeriax = no
registersip = yes
vmsecret = <secret for voicemail>
[202]
callwaiting = yes
cid_number = 202
context = local_sip
email = [email protected]
fullname = Full Name
group =
hasagent = yes
hasdirectory = yes
hasiax = no
hasmanager = no
hassip = yes
hasvoicemail = yes
host = dynamic
mailbox = 202
secret = <secret for AUTH>
threewaycalling = yes
zapchan =
registeriax = no
registersip = yes
vmsecret = <secret for voicemail>
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; SIP Trunks
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; sipphone.com
[trunk_1]
disallow = all
allow = gsm,ulaw,alaw,adpcm,speex,g729,g723
callerid =
contact = 1747669xxxx
context = DID_trunk_1
dialformat = ${EXTEN:1}
fromdomain = proxy01.sipphone.com
fromuser = 1747669xxxx
group =
hasexten = no
hasiax = no
hassip = yes
host = proxy01.sipphone.com
insecure = very
port = 5060
provider =
registeriax = no
registersip = yes
secret = <secret for AUTH>
trunkname = Custom - sipphone1341
trunkstyle = customvoip
username = 1747669xxxx
; sipcall.ch
[trunk_3]
disallow = all
allow = gsm,ulaw,alaw,adpcm,speex,g729,g723
callerid =
contact = 4132511xxxx
context = DID_trunk_3
dialformat = ${EXTEN:1}
fromdomain = sip.backbone.ch
fromuser = 4132511xxxx
group =
hasexten = no
hasiax = no
hassip = yes
host = sip.backbone.ch
insecure = very
port = 5060
provider =
registeriax = no
registersip = yes
secret = <secret for AUTH>
trunkname = Custom - sipcall
trunkstyle = customvoip
username = 4132511xxxx
;---end---
没有合适的资源?快使用搜索试试~ 我知道了~
SIP电话Proxy守护神
共72个文件
c:20个
in:8个
h:8个
需积分: 9 9 下载量 164 浏览量
2011-03-19
11:35:25
上传
评论
收藏 230KB RAR 举报
温馨提示
这是一个C程序,写于Linux下,它的功能是一个SIP的proxy,让你的SIP软件/硬件电话客户端能够在防火墙或路由器下面继续运行。
资源推荐
资源详情
资源评论
收起资源包目录
siproxd-0.6.0.rar (72个子文件)
siproxd-0.6.0
siproxd.spec.in 3KB
COPYING 18KB
RELNOTES 5KB
aclocal.m4 31KB
INSTALL 9KB
config.h.in 7KB
configure 287KB
acinclude.m4 14KB
ChangeLog 28KB
Makefile.in 20KB
TODO 858B
configure.in 13KB
AUTHORS 184B
src
route_processing.c 13KB
log.h 3KB
fwapi.c 2KB
security.c 12KB
siproxd.h 11KB
utils.c 17KB
accessctl.c 5KB
siproxd.c 17KB
plugin_shortdial.c 5KB
addrcache.h 1KB
auth.c 13KB
rtpproxy.h 3KB
log.c 10KB
sip_utils.c 40KB
fwapi.h 1KB
.buildno 5B
Makefile.in 17KB
readconf.c 11KB
digcalc.h 1KB
dejitter.c 13KB
resolve.c 6KB
sip_layer.c 2KB
plugins.h 1004B
rtpproxy_relay.c 37KB
dejitter.h 2KB
rtpproxy.c 4KB
register.c 22KB
custom_fw_module.c 3KB
Makefile.am 2KB
sock.c 7KB
proxy.c 41KB
autogen.sh 233B
contrib
siproxd.init 1KB
Makefile.in 9KB
Makefile.am 862B
scripts
missing 10KB
mkinstalldirs 2KB
install-sh 7KB
Makefile.in 8KB
depcomp 14KB
config.guess 41KB
config.sub 30KB
Makefile.am 0B
README 9KB
NEWS 0B
doc
KNOWN_BUGS 2KB
sample_cfg_budgetone.txt 3KB
siproxd_guide.sgml 40KB
FLI4L_HOWTO.txt 3KB
sample_asterisk.txt 5KB
sample_cfg_x-lite.txt 4KB
RFC3261_compliance.txt 2KB
Makefile.in 16KB
FAQ 14KB
siproxd_passwd.cfg 291B
siproxd.conf.example 11KB
Makefile.am 2KB
siproxd.spec 3KB
Makefile.am 920B
共 72 条
- 1
资源评论
pppjiangpan
- 粉丝: 3
- 资源: 11
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功