Why?


Search This Blog

Wednesday, April 15, 2015

Asterisk SIP Trunk to Broadsoft behind an Edgemarc 4550 using Transparent Proxy



Asterisk SIP Trunk to Broadsoft behind an Edgemarc 4550 using Transparent Proxy

NOTE** I use the SBC with IP of 10.x.x.60 for labvoip.cableone.net platform as outbound proxy. I do not set this globally as other calls try to go back out the proxy/SBC and never reach the internal extensions. So I use this in the trunk register => line for inbound calls and the [6026356917] for outbound calls.

Edgemarc 4550 setup:

·         LAN network 192.168.1.0/24
·         Edgemarc LAN IP 192.168.1.1
·         WAN network 10.137.128.0/24
·         Edgemarc WAN IP 10.x.x.18
·         Manually entered my DNS
·         DHCP on and using defaults
·         I have allowed http and ssh in firewall settings
·         I have port forward 2222 from WAN to port 22 for PBX IP (192.168.1.10) in LAN. Just for management outside the LAN.
·         I have port forward 8080 from WAN to port 80 for Phone IP (192.168.1.20) in LAN. Just for management outside the LAN.
·         Transparent Proxy is on under NAT

Asterisk server network setup

·         LAN IP 192.168.1.10/24
·         Gateway and DNS set to 192.168.1.1

Asterisk 11.15.0 sip.conf

;sip.conf

[general]

nat=yes

;used to register with broadsoft for inbound calls

context=public                  ; Default context for incoming calls. Defaults to 'default'
allowoverlap=no                 ; Disable overlap dialing support. (Default is yes)
udpbindaddr=192.168.1.10        ; IP address to bind UDP listen socket to (0.0.0.0 binds to all)
tcpenable=no                    ; Enable server for incoming TCP connections (default is no)
tcpbindaddr=0.0.0.0             ; IP address for TCP server to bind to (0.0.0.0 binds to all interfaces)
transport=udp                   ; Set the default transports.  The order determines the primary
 default transport.
srvlookup=yes                   ; Enable DNS SRV lookups on outbound calls
secret=password
context=public
host=dynamic
allow=all
dtmfmode=rfc2833

;this is for polycom sip phone
[6026356916]
type=friend
callerid=6026356916
secret=password
context=public
host=dynamic
allow=all
dtmfmode=rfc2833

; this is for asterisk to brs sip trunk using pilot number for out bound calls
[6026356917]
type=peer
user=phone
username=6026356917
host=labvoip.xxx.xxx
fromdomain=labvoip.xxx.xxx
realm=labvoip.xxx.xxx
secret=password
fromuser=602635xxxx
outboundproxy=10.x.x.60:5060
;Disable canreinvite if you are behind a NAT
canreinvite=no
context=public

Asterisk 11.15.0 extensions.conf

; extensions.conf - the Asterisk dial plan
;
[public]
;used to pass numbers dialed to SIP Trunk
exten => _X.,1,Dial(SIP/${EXTEN}@6026356917)
exten => _X.,n,Hangup

;used when trunk pilot DID of 6026356917 is called it rings ext 6026356916
exten => 6026356917,1,Answer
exten => 6026356917,n,Dial(SIP/6026356916,20)
exten => 6026356917,n,Hangup

;used when DID 6026356916 is called it rings ext 6026356916
exten => 6026356916,1,Answer
exten => 6026356916,n,Dial(SIP/6026356916,20)
exten => 6026356916,n,Hangup

static=yes
writeprotect=no
clearglobalvars=no

[globals]
CONSOLE=Console/dsp                             ; Console interface for demo
IAXINFO=guest                                   ; IAXtel username/password
;IAXINFO=myuser:mypass
TRUNK=DAHDI/G2                                  ; Trunk interface
;
; Note the 'G2' in the TRUNK variable above. It specifies which group (defined
; in chan_dahdi.conf) to dial, i.e. group 2, and how to choose a channel to use
; in the specified group. The four possible options are:
;
; g: select the lowest-numbered non-busy DAHDI channel
;    (aka. ascending sequential hunt group).
; G: select the highest-numbered non-busy DAHDI channel
;    (aka. descending sequential hunt group).
; r: use a round-robin search, starting at the next highest channel than last
;    time (aka. ascending rotary hunt group).
; R: use a round-robin search, starting at the next lowest channel than last
;    time (aka. descending rotary hunt group).

3 comments:

  1. I could really help getting asterisk to work with cisco phones.

    ReplyDelete
  2. I could really help getting asterisk to work with cisco phones.

    ReplyDelete
    Replies
    1. Do you need help with sip phones and asterisk? What phones are you using? What version of asterisk?

      Delete