[asterisk-users] pap2/wrt54gs/asterisk

FamilyPK FamilyPK at primelite.net
Mon Dec 18 14:26:09 MST 2006


I am having trouble setting this system up and wonder if some one help me.

Does anyone know what is missing if anything to get 2 phones on my 
asterisk home server to be able to call each other.

I have a WRT54GS running OpenWRT/asterisk connected to a PAP2 with 2 
extensions 5060/5061, this is on the lan side of my gateway/router 
WRT54G 192.168.1.1



BusyBox v1.00 (2006.11.07-01:40+0000) Built-in shell (ash)

Asterisk 1.2.1, Copyright (C) 1999 - 2005 Digium.
Written by Mark Spencer <markster at digium.com>
=========================================================================
Connected to Asterisk 1.2.1 currently running on OpenWrt (pid = 5084)
OpenWrt*CLI> sip show settings

Global Settings:
----------------
  SIP Port:               5060
  Bindaddress:            0.0.0.0
  Videosupport:           No
  AutoCreatePeer:         No
  Allow unknown access:   Yes
  Promsic. redir:         No
  SIP domain support:     No
  Call to non-local dom.: Yes
  URI user is phone no:   No
  Our auth realm          asterisk
  Realm. auth:            No
  User Agent:             Asterisk PBX
  MWI checking interval:  10 secs
  Reg. context:           (not set)
  Caller ID:              asterisk
  From: Domain:
  Record SIP history:     Off
  Call Events:            Off
  IP ToS:                 0x0
  OSP Support:            No
  SIP realtime:           Disabled

Global Signalling Settings:
---------------------------
  Codecs:                 none
  Relax DTMF:             No
  Compact SIP headers:    No
  RTP Timeout:            0 (Disabled)
  RTP Hold Timeout:       0 (Disabled)
  MWI NOTIFY mime type:   application/simple-message-summary
  DNS SRV lookup:         Yes
  Pedantic SIP support:   No
  Reg. max duration:      3600 secs
  Reg. default duration:  120 secs
  Outbound reg. timeout:  20 secs
  Outbound reg. attempts: 0
  Notify ringing state:   Yes

Default Settings:
-----------------
  Context:                default
  Nat:                    RFC3581
  DTMF:                   rfc2833
  Qualify:                0
  Use ClientCode:         No
  Progress inband:        Never
  Language:               (Defaults to English)
  Musicclass:             default
  Voice Mail Extension:   asterisk


******************sip.conf file*************************


  GNU nano 1.3.8                                File: sip.conf



[general]
context=default                 ; Default context for incoming calls
allowguest=yes                  ; Allow or reject guest calls (default 
is yes, this can also be set to 'osp'
                                ; if asterisk was compiled with OSP support.
;realm=mydomain.tld             ; Realm for digest authentication
                                ; defaults to "asterisk"
                                ; Realms MUST be globally unique 
according to RFC 3261
                                ; Set this to your host name or domain name
bindport=5060                   ; UDP Port to bind to (SIP standard port 
is 5060)
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
                                ; Note: Asterisk only uses the first host
                                ; in SRV records
                                ; Disabling DNS SRV lookups disables the
                                ; ability to place SIP calls based on domain
                                ; names to some other SIP users on the 
Internet

;domain=OpenWrt                 ; Set default domain for this host
                                ; If configured, Asterisk will only allow
                                ; INVITE and REFER to non-local domains
                                ; Use "sip show domains" to list local 
domains
;domain=mydomain.tld,mydomain-incoming
                                ; Add domain and configure incoming context
                                ; for external calls to this domain
;domain=192.168.1.130           ; Add IP address as local domain
;domain=192.168.1.135           ; You can have several "domain" settings
;allowexternalinvites=no        ; Disable INVITE and REFER to non-local 
domains
                                ; Default is yes
;autodomain=yes                 ; Turn this on to have Asterisk add 
local host
                                ; name and local IP to domain list.
;pedantic=yes                   ; Enable slow, pedantic checking for Pingtel
                                ; and multiline formatted headers for strict
                                ; SIP compatibility (defaults to "no")
;tos=184                        ; Set IP QoS to either a keyword or 
numeric val
;tos=lowdelay                   ; 
lowdelay,throughput,reliability,mincost,none
;maxexpiry=3600                 ; Max length of incoming registration we 
allow
;defaultexpiry=120              ; Default length of incoming/outoing 
registration
;notifymimetype=text/plain      ; Allow overriding of mime type in MWI 
NOTIFY
;checkmwi=10                    ; Default time between mailbox checks 
for peers
;vmexten=voicemail              ; dialplan extension to reach mailbox 
sets the
                                                ; Message-Account in the 
MWI notify message
                                                ; defaults to "asterisk"
;videosupport=yes               ; Turn on support for SIP video
;recordhistory=yes              ; Record SIP history by default
                                ; (see sip history / sip no history)

;disallow=all                   ; First disallow all codecs
;allow=ulaw                     ; Allow codecs in order of preference
;allow=ilbc                     ;
;musicclass=default             ; Sets the default music on hold class 
for all SIP calls
                                ; This may also be set for individual 
users/peers
;language=en                    ; Default language setting for all 
users/peers
                                ; This may also be set for individual 
users/peers
;relaxdtmf=yes                  ; Relax dtmf handling
;rtptimeout=60                  ; Terminate call if 60 seconds of no RTP 
activity
                                ; when we're not on hold
;rtpholdtimeout=300             ; Terminate call if 300 seconds of no 
RTP activity
                                ; when we're on hold (must be > rtptimeout)
;trustrpid = no                 ; If Remote-Party-ID should be trusted
;sendrpid = yes                 ; If Remote-Party-ID should be sent
;progressinband=never           ; If we should generate in-band ringing 
always
                                ; use 'never' to never use in-band 
signalling, even in cases
                                ; where some buggy devices might not 
render it
;useragent=Asterisk PBX         ; Allows you to change the user agent string
;promiscredir = no              ; If yes, allows 302 or REDIR to 
non-local SIP address
                                ; Note that promiscredir when redirects 
are made to the
                                ; local system will cause loops since 
SIP is incapable
                                ; of performing a "hairpin" call.
;usereqphone = no               ; If yes, ";user=phone" is added to uri 
that contains
                                ; a valid phone number
;dtmfmode = auto                ; Set default dtmfmode for sending DTMF. 
Default: rfc2833
                                ; Other options:
                                ; info : SIP INFO messages
                                ; inband : Inband audio (requires 64 
kbit codec -alaw, ulaw)
                                ; auto : Use rfc2833 if offered, inband 
otherwise

;compactheaders = yes           ; send compact sip headers.
;sipdebug = yes                 ; Turn on SIP debugging by default, from
                                ; the moment the channel loads this 
configuration
;subscribecontext = default     ; Set a specific context for SUBSCRIBE 
requests
                                ; Useful to limit subscriptions to local 
extensions
                                ; Settable per peer/user also
;notifyringing = yes            ; Notify subscriptions on RINGING state
  GNU nano 1.3.8                                File: sip.conf

; (provider).
;
; host is either a host name defined in DNS or the name of a section defined
; below.
;
; Examples:
;
;register => 1234:password at mysipprovider.com
;
;     This will pass incoming calls to the 's' extension
;
;
;register => 2345:password at sip_proxy/1234

;registertimeout=20             ; retry registration calls every 20 
seconds (default)
;registerattempts=10            ; Number of registration attempts before 
we give up
                                ; 0 = continue forever, hammering the 
other server until it
                                ; accepts the registration
                                ; Default is 0 tries, continue forever
;callevents=no                  ; generate manager events when sip ua 
performs events (e.g. hold)

;----------------------------------------- NAT SUPPORT 
------------------------
; The externip, externhost and localnet settings are used if you use 
Asterisk
; behind a NAT device to communicate with services on the outside.

;externip = 200.201.202.203     ; Address that we're going to put in 
outbound SIP messages
                                ; if we're behind a NAT

                                ; The externip and localnet is used
                                ; when registering and communicating 
with other proxies
                                ; that we're registered with
;externhost=foo.dyndns.net      ; Alternatively you can specify an
                                ; external host, and Asterisk will
                                ; perform DNS queries periodically.  Not
                                ; recommended for production
                                ; environments!  Use externip instead
;externrefresh=10               ; How often to refresh externhost if
                                ; used
                                ; You may add multiple local networks.  
A reasonable set of defaults
                                ; are:
localnet=192.168.0.0/255.255.0.0; All RFC 1918 addresses are local networks
;localnet=10.0.0.0/255.0.0.0    ; Also RFC1918
;localnet=172.16.0.0/12         ; Another RFC1918 with CIDR notation
;localnet=169.254.0.0/255.255.0.0 ;Zero conf local network


;nat=no                         ; Global NAT settings  (Affects all 
peers and users)
                                ; yes = Always ignore info and assume NAT
                                ; no = Use NAT mode only according to 
RFC3581
 

;[sip_proxy-out]
;type=peer                      ; we only want to call out, not be called
;secret=guessit
;username=yourusername          ; Authentication user for outbound proxies
;fromuser=yourusername          ; Many SIP providers require this!
;fromdomain=provider.sip.domain
;host=box.provider.com
;usereqphone=yes                ; This provider requires ";user=phone" 
on URI
;call-limit=5                   ; permit only 5 simultaneous outgoing 
calls to this peer



defaultip=192.168.1.130         ; IP address to use until registration




[phone1]

type=friend

context=default

secret=pascal

;host=linksysPAP
host=192.168.1.130

;defaultip=192.168.1.135

username=phone1

dtmfmode=inband ; Choices are inband, rfc2833, or info

mailbox=5560 ; Mailbox for message waiting indicator

callerid="phone1" <5560>

disallow=all
allow=ulaw


[phone2]

type=friend

context=default

secret=pascal

;host=linksysPAP
host=192.168.1.130

;defaultip=192.168.1.135

username=phone2

dtmfmode=inband ; Choices are inband, rfc2833, or info

mailbox=5561 ; Mailbox for message waiting indicator

callerid="phone2" <5561>

disallow=all
allow=ulaw



More information about the asterisk-users mailing list