⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 sample_asterisk.txt

📁 这是一个C程序
💻 TXT
字号:
Example Setup, Asterisk running on the same machine as siproxd (= NAT host).I use a iptables rule to redirect all outgoing SIP traffix from Asteriskto 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:5060COMMIT/etc/asterisk/sip.conf:-----------------------[general]context = defaultallowoverlap = 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 tubedisallow = allallow = gsm,ulaw,alaw,adpcm,speex,g729,g723autoframing = yesallowexternaldomains = yesallowexternalinvites = yesallowguest = yesallowsubscribe = noallowtransfer = yesalwaysauthreject = noautodomain = yescallevents = nocompactheaders = nodumphistory = nog726nonstandard = noignoreregexpire = nojbenable = nojbforce = nojblog = nomaxcallbitrate = 384maxexpiry = 3600minexpiry = 180notifyringing = nopedantic = nopromiscredir = norecordhistory = norelaxdtmf = nortcachefriends = nortsavesysname = nortupdate = nosendrpid = yessipdebug = not1min = 100progressinband = not38pt_udptl = notrustrpid = nousereqphone = novideosupport = no;; the following is required when using siproxd with local DNAT rulenat=neverexternip=192.168.1.1;localnet = 192.168.0.0/16  ; my inbound network with local UAsdomain = 192.168.1.1       ; inbound IP of host running Asterisk and siproxddomain = mynatfirewall     ; -"-canreinvite = nouseragent = 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 Useruserbase = 200;; Create voicemail mailbox and use use macro-stdexten;hasvoicemail = yes;; Set voicemail mailbox 6000 password to 1234;vmsecret = 1234;; Create SIP Peer;hassip = yeshasiax = no;;; Create manager entry;hasmanager = no;; Remaining options are not specific to users.conf entries but are general.;callwaiting = yesthreewaycalling = yescallwaitingcallerid = yestransfer = yescanpark = yescancallforward = yescallreturn = yescallgroup = 1pickupgroup = 1host = dynamiclocalextenlength = 3allow_aliasextns = noallow_an_extns = nohasagent = nohasdirectory = no;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; Local SIP UAs;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;[201]callwaiting = yescid_number = 201context = local_sipemail = email@host.xxfullname = Full Namegroup = hasagent = yeshasdirectory = yeshasiax = nohasmanager = nohassip = yeshasvoicemail = yeshost = dynamicmailbox = 201secret = <secret for AUTH>threewaycalling = yeszapchan = registeriax = noregistersip = yesvmsecret = <secret for voicemail>[202]callwaiting = yescid_number = 202context = local_sipemail = email@host.xxfullname = Full Namegroup = hasagent = yeshasdirectory = yeshasiax = nohasmanager = nohassip = yeshasvoicemail = yeshost = dynamicmailbox = 202secret = <secret for AUTH>threewaycalling = yeszapchan = registeriax = noregistersip = yesvmsecret = <secret for voicemail>;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; SIP Trunks;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; sipphone.com[trunk_1]disallow = allallow = gsm,ulaw,alaw,adpcm,speex,g729,g723callerid = contact = 1747669xxxxcontext = DID_trunk_1dialformat = ${EXTEN:1}fromdomain = proxy01.sipphone.comfromuser = 1747669xxxxgroup = hasexten = nohasiax = nohassip = yeshost = proxy01.sipphone.cominsecure = veryport = 5060provider = registeriax = noregistersip = yessecret = <secret for AUTH>trunkname = Custom - sipphone1341trunkstyle = customvoipusername = 1747669xxxx; sipcall.ch[trunk_3]disallow = allallow = gsm,ulaw,alaw,adpcm,speex,g729,g723callerid = contact = 4132511xxxxcontext = DID_trunk_3dialformat = ${EXTEN:1}fromdomain = sip.backbone.chfromuser = 4132511xxxxgroup = hasexten = nohasiax = nohassip = yeshost = sip.backbone.chinsecure = veryport = 5060provider = registeriax = noregistersip = yessecret = <secret for AUTH>trunkname = Custom - sipcalltrunkstyle = customvoipusername = 4132511xxxx;---end---

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -