Ctrl K
ring2all.com

Gateway SIP Profiles Module Documentation

Table of Contents

  1. Module Overview (Technical)
  2. Module Overview (Commercial/Business)
  3. Module Overview (End User/Administrator)
  4. Configuration Sections
  5. Settings Reference
  6. Common Scenarios & Examples
  7. Limitations & Important Notes
  8. Troubleshooting Tips
  9. Glossary

---

1. Module Overview (Technical)

What Are Gateway SIP Profiles?

Gateway SIP Profiles are configuration templates for SIP trunks and carriers. They define transport, codec, NAT, security, and behavior settings that are applied to gateways. This allows standardized configuration across multiple carriers with similar requirements.

Architecture

Plaintext
┌─────────────────────────────────────────────────────────────────┐
│              Gateway SIP Profiles Architecture                  │
├─────────────────────────────────────────────────────────────────┤
│                                                                 │
│  Admin Panel                                                    │
│  ┌──────────────────────────────────────────────────────────┐   │
│  │        Gateway SIP Profiles                              │   │
│  │                                                          │   │
│  │  Templates:                                              │   │
│  │  ├─ Standard Carrier (UDP, no NAT)                      │   │
│  │  ├─ NAT-Safe Carrier (TCP, NAT rewrite)                 │   │
│  │  └─ Secure Carrier (TLS, SRTP)                          │   │
│  │                                                          │   │
│  └──────────────────────────────────────────────────────────┘   │
│       │                                                         │
│       ▼ Assigned to gateways                                   │
│  ┌──────────────────────────────────────────────────────────┐   │
│  │        Gateways Module                                   │   │
│  │                                                          │   │
│  │  Twilio Gateway → NAT-Safe Carrier profile              │   │
│  │  AT&T SIP Trunk → Standard Carrier profile              │   │
│  │  Internal PBX → Secure Carrier profile                  │   │
│  │                                                          │   │
│  └──────────────────────────────────────────────────────────┘   │
│       │                                                         │
│       ▼ Applied to gateway XML                                 │
│  ┌──────────────────────────────────────────────────────────┐   │
│  │        FreeSWITCH                                        │   │
│  │                                                          │   │
│  │  <gateway name="twilio">                                │   │
│  │    <!-- Profile settings applied -->                    │   │
│  │    <param name="proxy" value="..."/>                    │   │
│  │    <param name="register-transport" value="tcp"/>       │   │
│  │    <param name="NDLB-force-rport" value="true"/>        │   │
│  │  </gateway>                                              │   │
│  │                                                          │   │
│  └──────────────────────────────────────────────────────────┘   │
│                                                                 │
└─────────────────────────────────────────────────────────────────┘

Key Tables

TablePurpose
public.gateway_sip_profilesProfile definitions
public.gateway_sip_profile_settingsProfile settings

Key Files

FileDescription
modules/gatewaySipProfiles/Frontend module
modules/gatewaySipProfiles/api/gatewaySipProfileApi.tsAPI calls
---

2. Module Overview (Commercial/Business)

Business Value

Gateway SIP Profiles provides standardized trunk configuration:

Without Gateway ProfilesWith Gateway Profiles
Configure each gatewayTemplate once, apply many
Inconsistent settingsStandardized config
Repetitive workReusable templates
Hard to maintainEasy updates

Use Cases

  1. Multi-Carrier Deployment
- Standard templates for each carrier type

- Quick gateway setup

  1. NAT Handling
- Pre-configured NAT templates

- Reliable remote carriers

  1. Security Standards
- TLS/SRTP templates

- Enforce security policies

  1. Video Calling
- Video codec profiles

- Carrier-specific video

Feature Highlights

FeatureBenefit
TemplatesReusable configurations
Transport OptionsUDP, TCP, TLS
Codec ControlAudio + Video
NAT SettingsContact rewrite
T.38 FaxCarrier fax support
SecurityTLS, SRTP options
DebuggingSIP trace, logging
---

3. Module Overview (End User/Administrator)

What Can You Do?

  • Create gateway profile templates
  • Configure transport protocols
  • Set codec preferences (audio + video)
  • Configure NAT handling
  • Enable security (TLS, SRTP)
  • Set timers and session limits
  • Enable debugging/tracing

Gateway SIP Profiles Interface

Plaintext
┌─────────────────────────────────────────────────────────────────┐
│              Gateway SIP Profiles                               │
├─────────────────────────────────────────────────────────────────┤
│                                                                 │
│  [+ Create Gateway Profile]                                     │
│                                                                 │
│  ┌───────────────────────────────────────────────────────────┐  │
│  │ Profile Name       │ Description         │ Usage │ Status│  │
│  ├────────────────────┼─────────────────────┼───────┼───────┤  │
│  │ Standard Carrier   │ Basic UDP trunks    │ 5 gw  │ ✓ On  │  │
│  │ NAT-Safe Carrier   │ Cloud/NAT carriers  │ 3 gw  │ ✓ On  │  │
│  │ Secure Carrier     │ TLS + SRTP trunks   │ 2 gw  │ ✓ On  │  │
│  │ Video Enabled      │ Video SIP trunks    │ 1 gw  │ ✓ On  │  │
│  │ Fax Optimized      │ T.38 fax carriers   │ 1 gw  │ ✓ On  │  │
│  └───────────────────────────────────────────────────────────┘  │
│                                                                 │
└─────────────────────────────────────────────────────────────────┘

Profile Edit View

Plaintext
┌─────────────────────────────────────────────────────────────────┐
│              Edit Gateway Profile: NAT-Safe Carrier             │
├─────────────────────────────────────────────────────────────────┤
│                                                                 │
│  Profile Name: [NAT-Safe Carrier                ]               │
│  Description: [For cloud and NAT carriers       ]               │
│  Sofia Profile: [external ▼]                                    │
│  Enabled: ✓                                                     │
│                                                                 │
│  ▼ Signaling & Transport                                        │
│  ├─ SIP Transport: [TCP ▼]                                     │
│  ├─ DTMF Mode: [RFC 2833 ▼]                                    │
│  ├─ INVITE URI Format: [username@domain ▼]                     │
│  ├─ Caller ID Policy: [Use From Header ▼]                      │
│  ├─ NAT Mapping: ✓                                             │
│  ├─ Force Contact Rewrite: ✓                                   │
│  └─ Register Transport: [TCP ▼]                                │
│                                                                 │
│  ▼ Media & Codecs                                               │
│  ├─ Audio Codecs: [PCMU, PCMA, G729, G722 📝]                  │
│  ├─ Video Codecs: [None                     ]                  │
│  ├─ Allow Video: ☐                                             │
│  ├─ RTP Proxy: ✓                                               │
│  ├─ T.38 Fax Support: ✓                                        │
│  └─ Packetization Time: [20 ▼]                                 │
│                                                                 │
│  ▼ Behavior & Timers                                            │
│  ├─ Session Timer: [1800                    ]                  │
│  ├─ Session Refresher: [Auto ▼]                                │
│  ├─ Codec Negotiation: [Generous ▼]                            │
│  ├─ Media Timeout: [300                     ]                  │
│  └─ Max Concurrent Sessions: [100           ]                  │
│                                                                 │
│  ▶ Security / TLS                                               │
│  ▶ Logging & Diagnostics                                        │
│                                                                 │
│  [Save] [Cancel]                                                │
│                                                                 │
└─────────────────────────────────────────────────────────────────┘

Quick Tips

TIP
Codec Order: Drag codecs to set priority order.
TIP
NAT Issues: Enable NAT Mapping and Contact Rewrite for cloud carriers.
NOTE
Usage Count: Shows how many gateways use this profile.

---

4. Configuration Sections

Signaling & Transport

SettingDescription
SIP TransportUDP, TCP, or TLS
DTMF ModeRFC2833, INFO, In-band, Auto
INVITE URI Formatusername@domain, E.164, user-only
Caller ID PolicyFrom, PAI, RPID
NAT MappingEnable NAT contact rewrite
Force Contact RewriteAlways rewrite Contact
Register TransportRegistration protocol
SIP Timer T1Base retransmit timer
SIP Timer T1x64Max retransmit timeout

Media & Codecs

SettingDescription
Audio CodecsPCMU, PCMA, G729, G722, OPUS, etc.
Video CodecsVP8, H264, H263, AV1
Allow VideoEnable video negotiation
RTP ProxyForce media through FS
Force RTP ProxyAlways proxy RTP
RTP IPRTP bind address
External RTP IPPublic IP for NAT
RTCP IntervalRTCP report interval
Packetization TimeAudio packet size (ms)
T.38 SupportEnable T.38 fax
Media TimeoutRTP timeout (seconds)

Behavior & Timers

SettingDescription
Session TimerMax session duration
Session RefresherUAC, UAS, or Auto
Codec NegotiationGreedy or Generous
Media Timeout ModeDrop or Ignore
Max SessionsConcurrent call limit
Hold MusicMOH source

Security / TLS

SettingDescription
Enable TLSTLS signaling
TLS Verify PolicyNone, Peer, Self-signed, Optional
TLS Version1.0, 1.1, 1.2, 1.3
Certificate DirectoryPath to certs
TLS PassphraseKey passphrase
Secure RTP ModeAlways, Optional, Never
Require Secure MediaEnforce SRTP

Logging & Diagnostics

SettingDescription
Debug Level0-9 verbosity
Log Auth FailuresTrack auth errors
SIP TracePacket tracing
---

5. Settings Reference

Common Profile Types

Profile TypeKey Settings
Standard CarrierUDP, no NAT, basic codecs
NAT-Safe CarrierTCP, NAT mapping, contact rewrite
Secure CarrierTLS, SRTP required
Video EnabledVideo codecs, allow video
Fax OptimizedT.38 enabled, PCMU/PCMA only

Transport Selection

TransportUse Case
UDPStandard carriers, low latency
TCPLarge packets, NAT traversal
TLSSecurity required

Codec Negotiation

ModeBehavior
GreedyUse your preferred order
GenerousAccept peer's preference
---

6. Common Scenarios & Examples

Scenario 1: Cloud Carrier (Twilio/Vonage)

  1. Create new profile
  2. Set Transport = TCP
  3. Enable NAT Mapping
  4. Enable Force Contact Rewrite
  5. Set codecs = PCMU, PCMA, G722
  6. Save and assign to gateway

Scenario 2: Secure Enterprise Trunk

  1. Create new profile
  2. Set Transport = TLS
  3. Enable TLS, set version = 1.2+
  4. Enable SRTP = Always
  5. Require Secure Media = Yes
  6. Save and assign

Scenario 3: Video SIP Trunk

  1. Create new profile
  2. Set audio codecs
  3. Add video codecs = VP8, H264
  4. Enable Allow Video
  5. RTP Proxy = True (if NAT)
  6. Save and assign

Scenario 4: Fax-Optimized Carrier

  1. Create new profile
  2. Set codecs = PCMU, PCMA only
  3. Enable T.38 Support = True
  4. Disable video
  5. Session timer = 300 (short for fax)
  6. Save and assign

---

7. Limitations & Important Notes

Technical Notes

NOTE
Profile Assignment: Profiles are assigned in Gateways module.
NOTE
Sofia Profile: Must select base profile (internal/external).
WARNING
Cannot Delete In-Use: Profiles with assigned gateways cannot be deleted.

Best Practices

  1. Create Per Carrier Type: Different profiles for different carriers
  2. Test Thoroughly: Verify settings before production
  3. Use NAT Settings: Enable for cloud/SBC carriers
  4. Optimize Codecs: Match carrier requirements
  5. Enable Debugging: Use SIP trace for troubleshooting
  6. Document Profiles: Note what each profile is for

---

8. Troubleshooting Tips

Common Issues

SymptomPossible CauseSolution
Registration failsWrong transportCheck carrier requirements
One-way audioNAT/RTP issuesEnable RTP Proxy, NAT Mapping
Audio qualityWrong codecMatch carrier codecs
Fax failsNo T.38Enable T.38 Support
TLS failsCert issuesCheck TLS settings
DTMF not workingWrong modeTry RFC2833 vs INFO

Carrier Compatibility Checklist

SettingCheck
TransportMatch carrier (UDP/TCP/TLS)
CodecsSupport carrier's codecs
DTMFMatch carrier's method
NATEnable if behind firewall
T.38Enable if carrier supports

Debug Workflow

  1. Enable SIP Trace for profile
  2. Reproduce issue
  3. Check FreeSWITCH logs
  4. Look for SIP errors
  5. Adjust settings
  6. Disable trace when done

---

9. Glossary

TermDefinition
Gateway ProfileSIP settings template for trunks
SIP TrunkConnection to carrier/PSTN
T.38Fax over IP protocol
SRTPSecure Real-time Transport Protocol
NAT MappingRewrite addresses for NAT
Codec NegotiationHow codecs are chosen
Session TimerCall duration refresh
RTP ProxyMedia through FreeSWITCH
---

Lua Script Status ℹ️

No Lua Handler Required

ComponentStatus
Gateway SIP Profilesℹ️ Configuration module - settings applied to gateway XML
Gateway SIP Profiles is a configuration module. Settings are stored and applied when generating gateway configuration for FreeSWITCH. No Lua handlers are used.

---

Documentation last updated: January 2026
AI Assistant

👋 Hello! I'm your Ring2All documentation assistant. I can help you find information about configuring and using the Ring2All PBX platform.

How can I help you today?