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

📄 siproxd_guide.sgml

📁 这是一个C程序
💻 SGML
📖 第 1 页 / 共 3 页
字号:
</screen>    </sect1>    <!-- Chapter 6.3: GS BT-100 with Siproxd running "in front of" a NAT router -->    <sect1 label="6.3">      <?dbhtml filename="siproxd_guide_c6s3.html">      <title>GS BT-100 with Siproxd running "in front of" a NAT router</title>      <para>Scenario:</para><screen>private IP address range             :          Internet10.0.0.x                             :          (public IP address range)                                     :                                     :         foo.bar.org+-------------+               +--------------+!             !.10         .1 ! masquerading ! publicIP! SIP UA      !---------------! NAT router   !------------>>  ! BT-100      !      !        !              !+-------------+      !        +--------------+                     !    eth0       :        ppp0                     !               :                            !               :                       eth0 !.2                                   +-------------+                              !   siproxd   !                              !             !                              +-------------+                </screen>      <para>Siproxd is running on 10.0.0.2. The masquerading NAT        router (e.g. a ADSL NAT router that cannot run any user        applications).</para>      <para>siproxd.conf:</para><screen>if_inbound  = eth0if_outbound = eth0host_outbound = foo.bar.orghosts_allow_reg = 10.0.0.0/24sip_listen_port = 5060daemonize = 1silence_log = 1log_calls = 1user = siproxdregistration_file = /var/lib/siproxd_registrationspid_file = /var/run/siproxd/siproxd.pidrtp_proxy_enable = 1rtp_port_low  = 7070rtp_port_high = 7089rtp_timeout = 300default_expires = 600debug_level = 0debug_port = 0</screen>      <para>NAT router configuration:</para><screen>forward all incoming traffic on 5060/udp to 10.0.0.2forward all incoming traffic from 7070/udp - 7089/udp to 10.0.0.2</screen>      <para>Phone configuration:</para><screen>IP Address:             10.0.0.10Subnet Mask:            255.255.255.0Default Router: 10.0.0.1DNS Server 1:           &lt;DNS Server of your Internet provider>SIP Server:             proxy01.sipphone.comOutbound Proxy: 10.0.0.2SIP User ID:            1747669xxxxAuthenticate ID:        1747660xxxxAuthenticate Passwd:    *********Name:                   Your Name HereUse DNS SRV:            noUser ID is phone #:     noSip Registration:       yesUnregister on reboot:noRegister expiration:    60Early Dial:             nolocal SIP port: 5060local RTP port: 5004Use random port:        yesNAT traversal:  noUse NAT IP:             &lt;empty>Subscribe for MWI:      NoSend DTMF:              via RTP (RFC2833)</screen>    </sect1>    <!-- Chapter 6.4: Transparent SIP Proxy -->    <sect1 label="6.4">      <?dbhtml filename="siproxd_guide_c6s4.html">      <title>Transparent SIP Proxy</title>      <para>Scenario:</para><screen>private IP address range             :          Internet10.0.0.x                             :          (public IP address range)                                     :                                     :         foo.bar.org+-------------+               +--------------+!             !.10         .1 ! masquerading ! publicIP! SIP UA      !---------------! Firewall     !------------>>  !             !               ! siproxd      !+-------------+               +--------------+                          eth0       :        ppp0</screen>      <para>You may have a SIP UA (Phone) that does not allow the        specification of an outbound proxy. If siproxd is running        on the masquerading router, the following configuration will        do so called transparent proxying. The firewall will redirect        outgoing SIP messages to siproxd, however the local Client        is not aware of it.</para>      <para>siproxd.conf:</para><screen>if_inbound  = eth0if_outbound = ppp0hosts_allow_reg = 10.0.0.0/24sip_listen_port = 5060daemonize = 1silence_log = 1log_calls = 1user = siproxdregistration_file = /var/lib/siproxd_registrationspid_file = /var/run/siproxd/siproxd.pidrtp_proxy_enable = 1rtp_port_low  = 7010rtp_port_high = 7019rtp_timeout = 300default_expires = 600debug_level = 0debug_port = 0</screen>      <para>Firewall configuration (iptables):</para><screen># redirect outgoing SIP traffic to siproxd (myself)iptables -t nat -A PREROUTING -m udp -p udp -i eth0 \                              --destination-port 5060     -j REDIRECT# allow incoming SIP and RTP trafficiptables -A INPUT -m udp -p udp -i ppp0 --dport 5060      -j ACCEPTiptables -A INPUT -m udp -p udp -i ppp0 --dport 7070:7089 -j ACCEPT</screen>    </sect1>    <!-- Chapter 6.5: Masquerading an Asterisk box -->    <sect1 label="6.5">      <?dbhtml filename="siproxd_guide_c6s5.html">      <title>Masquerading an Asterisk box</title>      <para>Scenario:</para><screen>private IP address range             :          Internet10.0.0.x                             :          (public IP address range)                                     :                                     :         foo.bar.org+-------------+               +--------------+!             !.10         .1 ! masquerading ! publicIP! Asterisk    !---------------! Firewall     !------------>>  !             !  SIP trunk    ! siproxd      !+-------------+               +--------------+  ! ! ! ! !               eth0       :        ppp0..!.!.!.!.!..... extensions (local SIP clients)</screen>      <para>Siproxd can also be used to masquerade an Asterisk server.        The Asterisk server will register itself as a SIP UA (Client)        to an external SIP registrar. In this example this would be        again sipphone.com. As Asterisk does not allow to specify an        SIP outbound proxy we use the same setup for transparent proxying.        The context values of the asterisk configuration probably must        be adapted to fit your needs.</para>      <para>siproxd.conf:</para><screen>if_inbound  = eth0if_outbound = ppp0hosts_allow_reg = 10.0.0.0/24sip_listen_port = 5060daemonize = 1silence_log = 1log_calls = 1user = siproxdregistration_file = /var/lib/siproxd_registrationspid_file = /var/run/siproxd/siproxd.pidrtp_proxy_enable = 1rtp_port_low  = 7070rtp_port_high = 7089rtp_timeout = 300default_expires = 600debug_level = 0debug_port = 0</screen>      <para>Firewall configuration (iptables):</para><screen># redirect outgoing SIP traffic to siproxd (myself)iptables -t nat -A PREROUTING -m udp -p udp -i eth0 \                     --source 10.0.0.11 --destination-port 5060 -j REDIRECT# allow incoming SIP and RTP trafficiptables -A INPUT -m udp -p udp -i ppp0 --dport 5060      -j ACCEPTiptables -A INPUT -m udp -p udp -i ppp0 --dport 7070:7080 -j ACCEPT</screen>      <para>Asterisk configuration (SIP related part):</para>      <para>Note: Very important are the fromuser and fromdomain        keywords in the client section. They are required to have        Asterisk send the correct From headers in SIP dialogs.        The used Asterisk version is 'SVN-branch-1.4-r62331M'.</para>      <para>With newer Asterisk versions, it is no longer required        to have a separate REGISTER definition, this can be made        implicit in the SIP trunk config.</para><screen>; sip.conf:[general]port = 5060           ; Port to bind to (SIP is 5060)bindaddr = 0.0.0.0    ; Address to bind to (all addresses on machine)context = from-sip-external ; Send unknown SIP callers to this contextuseragent = PBX       ; NOTE: some providers (e.g sipcall.ch) do simply                      ;       not work with the default "AsteriskPBX"                      ;       UA String.; Network Settingsnat=neverlocalnet = 10.0.0.0/24domain = 10.0.0.10; Codecsdisallow=allallow=gsm       ; 13 Kbpsallow=ulaw      ; 64 Kbpsallow=alaw      ; 64 Kbpsautoframing = yes; SIP Settingscanreinvite = no      ; important!; the following are just my settings I use, however; I dont' consider them criticalallowexternaldomains = 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 = no;register = t38pt_udptl = notrustrpid = nousereqphone = novideosupport = no</screen>      <para>The Trunk definition looks like:</para><screen>; 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 H.323 friend;;hash323 = yes;; 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; = locally connected phones. nothing special here.;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;[201]callwaiting = yescid_number = 201context = local_sipemail = e@mailfullname = Full Namegroup = hasagent = yeshasdirectory = yeshasiax = nohasmanager = nohassip = yeshasvoicemail = yeshost = dynamicmailbox = 201secret = sip_passwordthreewaycalling = yeszapchan = registeriax = noregistersip = yesvmsecret = 1234;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; SIP Trunks; these are masqueraded via siproxd;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;[trunk_1]disallow = allallow = gsm,ulaw,alaw,adpcm,speex,g729,g723callerid = contact = 17476691234       ; IMPORTANTcontext = DID_trunk_1dialformat = ${EXTEN:1}fromdomain = proxy01.sipphone.comfromuser = 17476691234      ; IMPORTANTgroup = hasexten = nohasiax = nohassip = yeshost = proxy01.sipphone.cominsecure = veryport = 5060provider = registeriax = noregistersip = yessecret = sip_passwordtrunkname = Custom - sipphone1234trunkstyle = customvoipusername = 17476691234</screen>    </sect1>  </chapter></book>

⌨️ 快捷键说明

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