You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 

59 lines
2.0 KiB

// Global Settings. You can change these at startup to fine tune
// certain behaviors.
package sip
import (
"os"
"time"
)
var (
// How often to check for shutdowns.
DeathClock = 200 * time.Millisecond
// SIP egress msg length must not exceed me. If you are brave and use jumbo
// frames you can increase this value.
MTU = 1450
// Maximum number SRV/Redirects/Etc. to entertain. More accurately, this is
// the maximum number of time's we're allowed to enter the "calling" state.
MaxAttempts = 10
// This is how long to wait (in nanoseconds) for a 100 trying response before
// retransmitting the invite. Multiply this by RetransmitAttempts and that's
// how long it'll be before we try another server. That might seem like a
// very long time but happy networks facilitate fast failover by sending hard
// errors (ICMP, 480, 500-599)
TryingTimeout = 500 * time.Millisecond
// How many times to attempt to retransmit before moving on.
RetransmitAttempts = 2
// Number of nanoseconds (across all attempts) before we give up trying to
// connect a call. This doesn't mean the call has to have been answered but
// rather has moved beyond the "calling" state and doesn't go back.
GiveupTimeout = 3 * time.Second
// TODO(jart): How long to wait before refreshing a call with a re-INVITE
// message.
RefreshTimeout = 15 * time.Minute
// How many times are proxies allowed to forward a message.
MaxForwards int = 70
// Approx. how long the transaction engine remembers old Call-IDs to prevent
// a retransmit from accidentally opening a new dialog.
CallIDBanDuration = 35 * time.Second
// Approx. how often to sweep old transactions from ban list.
CallIDBanSweepDuration = 5 * time.Second
// Should the transport layer add timestamps to Via headers (µsi/µse = UTC
// microseconds since unix epoch ingress/egress).
ViaTimestampTagging = true
// Use this feature to print out raw sip messages the moment they are
// sent/received by the transport layer.
TransportTrace = (os.Getenv("TPORT_LOG") == "true")
)