-
Notifications
You must be signed in to change notification settings - Fork 7
/
sip.conf
131 lines (111 loc) · 4.96 KB
/
sip.conf
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
; WARNING do not change this file, but instead use sip-custom-register.conf and sip-custom-contexts.conf
; as this will limit the amount of conflicts when upgrading
[general]
bindport=5060 ; asterisk 1.6
; UDP Port to bind to (SIP standard port for unencrypted UDP
; and TCP sessions is 5060)
; bindport is the local UDP port that Asterisk will listen on
bindaddr=0.0.0.0 ; asterisk 1.6
; IP address to bind UDP listen socket to (0.0.0.0 binds to all)
; You can specify port here too, like 123.123.123.123:5080
udpbindaddr=0.0.0.0 ; asterisk 1.8
; IP address to bind UDP listen socket to (0.0.0.0 binds to all)
; Optionally add a port number, 192.168.1.1:5062 (default is port 5060)
tos_sip=cs3 ; Sets TOS for SIP packets.
tos_audio=ef ; Sets TOS for RTP audio packets.
tos_video=af41 ; Sets TOS for RTP video packets.
tos_text=af41 ; Sets TOS for RTP text packets.
cos_sip=3 ; Sets 802.1p priority for SIP packets.
cos_audio=5 ; Sets 802.1p priority for RTP audio packets.
cos_video=4 ; Sets 802.1p priority for RTP video packets.
cos_text=3 ; Sets 802.1p priority for RTP text packets.
maxexpiry=3600 ; Maximum allowed time of incoming registrations
; and subscriptions (seconds)
minexpiry=60 ; Minimum length of registrations/subscriptions (default 60)
defaultexpiry=3600 ; Default length of incoming/outgoing registration
dynamic_exclude_static=yes ; Disallow all dynamic hosts from registering
; as any IP address used for staticly defined
; hosts. This helps avoid the configuration
; error of allowing your users to register at
; the same address as a SIP provider.
use_q850_reason=yes ; Set to yes add Reason header and use Reason header if it is available.
;t1min=100 ; Minimum roundtrip time for messages to monitored hosts
; Defaults to 100 ms
;timert1=500 ; Default T1 timer
; Defaults to 500 ms or the measured round-trip
; time to a peer (qualify=yes).
;timerb=32000 ; Call setup timer. If a provisional response is not received
; in this amount of time, the call will autocongest
; Defaults to 64*timert1
rtptimeout=60 ; Terminate call if 60 seconds of no RTP or RTCP activity
; on the audio channel
; when we're not on hold. This is to be able to hangup
; a call in the case of a phone disappearing from the net,
; like a powerloss or grandma tripping over a cable.
rtpholdtimeout=300 ; Terminate call if 300 seconds of no RTP or RTCP activity
; on the audio channel
; when we're on hold (must be > rtptimeout)
allowguest=no ; Allow or reject guest calls (default is yes)
autocreatepeer=no ; The Autocreatepeer option allows,
; if set to Yes, any SIP ua to register with your Asterisk PBX as a peer.
; This peer's settings will be based on global options.
; The peer's name will be based on the user part of the Contact: header field's URL.
context=from-openBTS ; Default context for incoming calls
;context=phones ; Default context for incoming calls
allowoverlap=no ; Disable overlap dialing support. (Default is yes)
disallow=all ; need to disallow=all before we can use allow=
allow=gsm ; GSM
allow=ulaw ; ISDN US
allow=alaw ; ISDN EU
relaxdtmf=yes ; Relax dtmf handling (only to be used for connecting to aserisk 1.2 and INDBAND)
dtmfmode=rfc2833 ; Set default dtmfmode for sending DTMF. Default: rfc2833
; Other options:
; info : SIP INFO messages (application/dtmf-relay)
; shortinfo : SIP INFO messages (application/dtmf)
; inband : Inband audio (requires 64 kbit codec -alaw, ulaw)
; auto : Use rfc2833 if offered, inband otherwise
canreinvite=no ; no reinvites from Asterisk
directmedia=no ; Asterisk by default tries to redirect the
; RTP media stream to go directly from
; the caller to the callee. Some devices do not
; support this (especially if one of them is behind a NAT).
; The default setting is YES. If you have all clients
; behind a NAT, or for some other reason want Asterisk to
; stay in the audio path, you may want to turn this off.
; This setting also affect direct RTP
; at call setup (a new feature in 1.4 - setting up the
; call directly between the endpoints instead of sending
; a re-INVITE).
callcounter=yes ; Enable call counters on devices. This can be set per
; device too.
#include sip-custom-register.conf
[CodecBTS](!)
disallow=all ; need to disallow=all before we can use allow
allow=gsm ; GSM
allow=ulaw ; ISDN US
allow=alaw ; ISDN EU
[optionsBTS](!)
type=peer
context=from-openBTS
dtmfmode=rfc2833
canreinvite=no
qualify=no ; openbts do not support OPTION
insecure=port,invite
;If you need to make any changes please add them to sip-custom-contexts.conf
#include sip-custom-contexts.conf
[IMSI490010100001101]
callerid=10100001101
canreinvite=no
type=friend
context=sip-external
allow=gsm
host=dynamic
dtmfmode=info
[IMSI490010100001100]
callerid=10100001100
canreinvite=no
type=friend
context=sip-external
allow=gsm
host=dynamic
dtmfmode=info