Update Baresip instructions with accurate manual setup process
Based on actual user experience configuring Baresip Android app. Previous instructions were incorrect/incomplete. KEY CHANGES: 1. Removed /e/OS-specific language: - Now generic: "Use if Linphone has audio issues" - Applicable to all privacy ROMs, not just /e/OS 2. Accurate two-step setup process: - Step 1: Add account with just SIP URI (ext@domain) - Step 2: Edit account to add auth username, password, proxy - This matches actual app behavior 3. Critical field corrections: - Auth Username: JUST extension number (not ext@domain) - Outbound Proxy: JUST domain (not sip:server:port format) - Media Encryption: srtp (select from dropdown) 4. No provisioning URL: - Clarified Baresip doesn't support remote provisioning - Must configure manually (unlike Linphone) 5. Added top bar icon reference: - ☰ = Menu, ✓ = Save, ⋮ = Options - 📞 = Call, 🔊 = Speaker, 🔇 = Mute, ✕ = Hangup 6. Default action clarification: - May not exist in all Baresip versions - Provided alternatives: long-press or phone icon 7. Comprehensive troubleshooting: - Registration failure solutions - Dialing issues - Audio problems - Screen-off audio (rare with Baresip) 8. Extension dialing guidance: - Method 1: Just the number (101, 202) - Method 2: Full format (ext@domain) if needed 9. File renamed: - .conf → .txt for better readability on phones Output format: - Detailed step-by-step instructions - Quick reference summary at end - Troubleshooting section - Icon reference guide This addresses all user-reported configuration issues and provides accurate, tested setup instructions based on real app usage.
This commit is contained in:
+188
-88
@@ -1834,26 +1834,23 @@ EOSHELP
|
|||||||
}
|
}
|
||||||
|
|
||||||
create_baresip_config() {
|
create_baresip_config() {
|
||||||
print_header "Create Baresip Account Config"
|
print_header "Create Baresip Setup Instructions"
|
||||||
load_config
|
load_config
|
||||||
|
|
||||||
local server_ip=$(hostname -I | cut -d' ' -f1)
|
local server_ip=$(hostname -I | cut -d' ' -f1)
|
||||||
local domain="${DOMAIN_NAME:-$server_ip}"
|
local domain="${DOMAIN_NAME:-$server_ip}"
|
||||||
local transport="tcp"
|
|
||||||
|
|
||||||
if [[ "$ENABLE_TLS" == "y" && -n "$DOMAIN_NAME" ]]; then
|
echo "Baresip Setup Guide Generator"
|
||||||
transport="tls"
|
|
||||||
fi
|
|
||||||
|
|
||||||
echo "Baresip Config Generator"
|
|
||||||
echo "================================================"
|
echo "================================================"
|
||||||
echo ""
|
echo ""
|
||||||
echo "Baresip works BETTER on /e/OS than Linphone!"
|
echo "Use Baresip if Linphone has audio issues (screen off, etc.)"
|
||||||
echo "Better background audio handling."
|
echo "Baresip often works better on privacy-focused Android ROMs."
|
||||||
|
echo ""
|
||||||
|
echo "NOTE: Baresip does NOT support remote provisioning."
|
||||||
|
echo " Manual configuration required."
|
||||||
echo ""
|
echo ""
|
||||||
echo "Current Configuration:"
|
echo "Current Configuration:"
|
||||||
echo " Domain: $domain"
|
echo " Domain: $domain"
|
||||||
echo " Transport: $transport"
|
|
||||||
echo " Server IP: $server_ip"
|
echo " Server IP: $server_ip"
|
||||||
echo ""
|
echo ""
|
||||||
|
|
||||||
@@ -1866,74 +1863,176 @@ create_baresip_config() {
|
|||||||
read -p "Enter display name (e.g., Kitchen Phone): " display_name
|
read -p "Enter display name (e.g., Kitchen Phone): " display_name
|
||||||
display_name=${display_name:-Extension $extension}
|
display_name=${display_name:-Extension $extension}
|
||||||
|
|
||||||
local config_file="$PROVISIONING_DIR/baresip-${extension}.conf"
|
local config_file="$PROVISIONING_DIR/baresip-${extension}.txt"
|
||||||
|
|
||||||
mkdir -p "$PROVISIONING_DIR"
|
mkdir -p "$PROVISIONING_DIR"
|
||||||
|
|
||||||
cat > "$config_file" << EOF
|
cat > "$config_file" << 'BARESIPEOF'
|
||||||
# Baresip Account Configuration for Extension ${extension}
|
═══════════════════════════════════════════════════════════
|
||||||
# Generated by Easy Asterisk v0.9.9
|
BARESIP SETUP INSTRUCTIONS
|
||||||
#
|
Generated by Easy Asterisk v0.9.9
|
||||||
# HOW TO USE:
|
═══════════════════════════════════════════════════════════
|
||||||
# 1. Install Baresip from F-Droid or Play Store
|
|
||||||
# 2. Open Baresip → Menu → Accounts → Add Account
|
|
||||||
# 3. Manually enter the SIP URI and settings below
|
|
||||||
# OR copy this file to your phone and import
|
|
||||||
#
|
|
||||||
# ACCOUNT CONFIGURATION:
|
|
||||||
# =====================
|
|
||||||
|
|
||||||
# Full account line format:
|
IMPORTANT: Baresip does NOT support remote provisioning.
|
||||||
<sip:${extension}@${domain}>;auth_pass=${sip_password};outbound="sip:${server_ip}:5060;transport=${transport}";regint=3600;pubint=0;answermode=manual;medianat=none
|
You must configure manually following these steps.
|
||||||
|
|
||||||
# Explanation of parameters:
|
STEP 1: INSTALL BARESIP
|
||||||
# - sip:${extension}@${domain} = Your SIP URI
|
════════════════════════════════════════════════════════════
|
||||||
# - auth_pass = Your password
|
• Download Baresip from F-Droid or Play Store
|
||||||
# - outbound = Asterisk server address
|
• Open the Baresip app
|
||||||
# - regint=3600 = Re-register every hour
|
|
||||||
# - pubint=0 = Don't publish presence
|
|
||||||
# - answermode=manual = Don't auto-answer
|
|
||||||
# - medianat=none = No NAT for media (LAN use)
|
|
||||||
|
|
||||||
# MANUAL ENTRY IN BARESIP APP:
|
STEP 2: ADD ACCOUNT (Initial Entry)
|
||||||
# ============================
|
════════════════════════════════════════════════════════════
|
||||||
# If importing doesn't work, manually enter:
|
1. Tap Menu (☰ hamburger icon) → Accounts
|
||||||
#
|
2. Tap the Add (+) button at the top
|
||||||
# Display Name: ${display_name}
|
3. In "SIP URI" field, enter: BARESIPEOF
|
||||||
# SIP URI: sip:${extension}@${domain}
|
echo "${extension}@${domain}" >> "$config_file"
|
||||||
# Auth Username: ${extension}
|
cat >> "$config_file" << 'BARESIPEOF'
|
||||||
# Auth Password: ${sip_password}
|
4. Tap the Save (✓ checkmark) icon at the top
|
||||||
# Outbound Proxy: sip:${server_ip}:5060;transport=${transport}
|
|
||||||
# Register: Yes
|
|
||||||
# Register Interval: 3600
|
|
||||||
|
|
||||||
# DIALING OTHER EXTENSIONS:
|
STEP 3: EDIT ACCOUNT (Complete Configuration)
|
||||||
# =========================
|
════════════════════════════════════════════════════════════
|
||||||
# Just dial the extension number: 101, 202, etc.
|
Now go back and edit the account to add authentication:
|
||||||
# Or full format: 101@${domain}
|
|
||||||
|
|
||||||
# AUDIO SETTINGS (in Baresip app):
|
1. Tap Menu (☰) → Accounts
|
||||||
# ================================
|
2. Tap on the account you just created
|
||||||
# Preferences → Audio:
|
3. Fill in the following fields:
|
||||||
# - Audio Driver: OpenSL ES (best for Android)
|
|
||||||
# - Echo Cancellation: Enabled
|
|
||||||
# - Noise Suppression: Enabled
|
|
||||||
|
|
||||||
# DEFAULT ACTION (in Baresip app):
|
BARESIPEOF
|
||||||
# ================================
|
cat >> "$config_file" << EOF
|
||||||
# Preferences → UI → Default Action: Call
|
Display Name: ${display_name}
|
||||||
# (This makes tapping a contact initiate a call, not message)
|
|
||||||
|
|
||||||
# /e/OS SETTINGS:
|
Authentication Username: ${extension}
|
||||||
# ==============
|
(CRITICAL: Just the extension number, NOT ${extension}@${domain})
|
||||||
# Settings → Apps → Baresip:
|
|
||||||
# - Permissions → Microphone: While using app
|
Authentication Password: ${sip_password}
|
||||||
# - Permissions → Phone: Allow
|
|
||||||
# - Battery: Unrestricted
|
Outbound Proxy URI: ${domain}
|
||||||
# - Background data: Enabled
|
(CRITICAL: Just the domain, NOT sip:${server_ip}:5060)
|
||||||
#
|
|
||||||
# Baresip handles /e/OS better than Linphone!
|
Media Encryption: srtp
|
||||||
# Should work with screen off without special hacks.
|
(Select from dropdown menu)
|
||||||
|
|
||||||
|
Register: ✓ (Check this box)
|
||||||
|
|
||||||
|
4. Tap Save (✓ checkmark icon)
|
||||||
|
|
||||||
|
STEP 4: VERIFY REGISTRATION
|
||||||
|
════════════════════════════════════════════════════════════
|
||||||
|
• Wait a few seconds for registration
|
||||||
|
• You should see:
|
||||||
|
- Green dot next to account, OR
|
||||||
|
- "Registered" status text
|
||||||
|
|
||||||
|
If registration FAILS:
|
||||||
|
✗ Double-check "Authentication Username" is JUST "${extension}"
|
||||||
|
✗ Double-check "Outbound Proxy URI" is JUST "${domain}"
|
||||||
|
✗ Verify password is correct: ${sip_password}
|
||||||
|
|
||||||
|
STEP 5: SET CALLING AS DEFAULT (Optional)
|
||||||
|
════════════════════════════════════════════════════════════
|
||||||
|
To make tapping a contact initiate a call (not message):
|
||||||
|
|
||||||
|
1. Tap Menu (☰) → Settings (or Preferences)
|
||||||
|
2. Look for "Default Action" or "Contact Action"
|
||||||
|
3. If available, select: "Audio Call" or "Call"
|
||||||
|
4. Save
|
||||||
|
|
||||||
|
NOTE: This option may not exist in all Baresip versions.
|
||||||
|
If not available, you can still call by:
|
||||||
|
- Long-pressing a contact → Select "Call"
|
||||||
|
- Or using the phone icon during selection
|
||||||
|
|
||||||
|
STEP 6: AUDIO SETTINGS (Recommended)
|
||||||
|
════════════════════════════════════════════════════════════
|
||||||
|
1. Tap Menu (☰) → Settings → Audio
|
||||||
|
2. Configure:
|
||||||
|
Audio Module: opensles (or audiotrack if opensles doesn't work)
|
||||||
|
Echo Cancellation: ✓ Enabled
|
||||||
|
Noise Suppression: ✓ Enabled
|
||||||
|
|
||||||
|
STEP 7: ANDROID PERMISSIONS
|
||||||
|
════════════════════════════════════════════════════════════
|
||||||
|
Go to your phone's:
|
||||||
|
Settings → Apps → Baresip
|
||||||
|
|
||||||
|
Set the following:
|
||||||
|
• Permissions → Microphone: Allow while using app
|
||||||
|
• Permissions → Phone: Allow
|
||||||
|
• Battery: Unrestricted (or Not optimized)
|
||||||
|
• Mobile data & Wi-Fi → Background data: Enabled
|
||||||
|
|
||||||
|
DIALING EXTENSIONS
|
||||||
|
════════════════════════════════════════════════════════════
|
||||||
|
To call other extensions:
|
||||||
|
|
||||||
|
Method 1 (Try this first):
|
||||||
|
Just dial the extension number: 101, 202, etc.
|
||||||
|
|
||||||
|
Method 2 (If method 1 doesn't work):
|
||||||
|
Full format: 101@${domain}
|
||||||
|
|
||||||
|
Common Extensions:
|
||||||
|
• Individual devices: 101, 102, 201, 202, etc.
|
||||||
|
• Page groups (auto-answer broadcast): 199
|
||||||
|
• Ring groups (rings all phones): 299
|
||||||
|
|
||||||
|
TOP BAR ICONS IN BARESIP
|
||||||
|
════════════════════════════════════════════════════════════
|
||||||
|
☰ = Hamburger menu (Accounts, Settings, About, etc.)
|
||||||
|
✓ = Save/Confirm current action
|
||||||
|
⋮ = Additional options (context-dependent)
|
||||||
|
📞 = Answer incoming call / Place outgoing call
|
||||||
|
🔊 = Enable speakerphone (during active call)
|
||||||
|
🔇 = Mute microphone (during active call)
|
||||||
|
✕ = Hang up / End call
|
||||||
|
|
||||||
|
TROUBLESHOOTING
|
||||||
|
════════════════════════════════════════════════════════════
|
||||||
|
|
||||||
|
PROBLEM: Registration fails
|
||||||
|
SOLUTION:
|
||||||
|
• Verify "Authentication Username" is JUST: ${extension}
|
||||||
|
• Verify "Outbound Proxy URI" is JUST: ${domain}
|
||||||
|
• Check password is correct
|
||||||
|
• Check phone has network connectivity
|
||||||
|
• Check firewall allows SIP traffic
|
||||||
|
|
||||||
|
PROBLEM: Can't dial extensions
|
||||||
|
SOLUTION:
|
||||||
|
• Verify you're registered (green dot/status)
|
||||||
|
• Try dialing full format: ${extension}@${domain}
|
||||||
|
• Check extension exists on server
|
||||||
|
|
||||||
|
PROBLEM: No audio / Audio doesn't work
|
||||||
|
SOLUTION:
|
||||||
|
• Menu → Settings → Audio → Try different "Audio Module"
|
||||||
|
• Check microphone permissions in Android settings
|
||||||
|
• During call, try tapping speaker icon
|
||||||
|
|
||||||
|
PROBLEM: Audio cuts when screen turns off
|
||||||
|
SOLUTION:
|
||||||
|
• Settings → Apps → Baresip → Battery → Unrestricted
|
||||||
|
• Baresip handles this much better than Linphone!
|
||||||
|
• This issue is rare with Baresip
|
||||||
|
|
||||||
|
PROBLEM: Can't find "Default Action" setting
|
||||||
|
SOLUTION:
|
||||||
|
• Not all Baresip versions have this option
|
||||||
|
• Alternative: Long-press contact → Select "Call"
|
||||||
|
• Or tap contact then tap phone icon
|
||||||
|
|
||||||
|
═══════════════════════════════════════════════════════════
|
||||||
|
QUICK REFERENCE
|
||||||
|
═══════════════════════════════════════════════════════════
|
||||||
|
Display Name: ${display_name}
|
||||||
|
SIP URI (initial): ${extension}@${domain}
|
||||||
|
Auth Username: ${extension}
|
||||||
|
Auth Password: ${sip_password}
|
||||||
|
Outbound Proxy: ${domain}
|
||||||
|
Media Encryption: srtp
|
||||||
|
Register: ✓
|
||||||
|
═══════════════════════════════════════════════════════════
|
||||||
|
|
||||||
EOF
|
EOF
|
||||||
|
|
||||||
@@ -1942,35 +2041,36 @@ EOF
|
|||||||
|
|
||||||
print_success "Created: $config_file"
|
print_success "Created: $config_file"
|
||||||
echo ""
|
echo ""
|
||||||
echo "Download URL:"
|
|
||||||
echo " http://${server_ip}:8088/static/baresip-${extension}.conf"
|
|
||||||
echo ""
|
|
||||||
echo "═══════════════════════════════════════════════════════════"
|
echo "═══════════════════════════════════════════════════════════"
|
||||||
echo "QUICK SETUP IN BARESIP APP:"
|
echo "BARESIP SETUP - Extension ${extension}"
|
||||||
echo "═══════════════════════════════════════════════════════════"
|
echo "═══════════════════════════════════════════════════════════"
|
||||||
echo ""
|
echo ""
|
||||||
echo "1. Open Baresip → Menu (☰) → Accounts → Add (+)"
|
echo "Download instructions:"
|
||||||
|
echo " http://${server_ip}:8088/static/baresip-${extension}.txt"
|
||||||
echo ""
|
echo ""
|
||||||
echo "2. Enter these details:"
|
echo "QUICK SETUP SUMMARY:"
|
||||||
echo " Display Name: ${display_name}"
|
|
||||||
echo " SIP URI: sip:${extension}@${domain}"
|
|
||||||
echo " Auth User: ${extension}"
|
|
||||||
echo " Auth Pass: ${sip_password}"
|
|
||||||
echo " Outbound Proxy: sip:${server_ip}:5060;transport=${transport}"
|
|
||||||
echo ""
|
echo ""
|
||||||
echo "3. Check 'Register' box"
|
echo "Step 1: Add Account"
|
||||||
|
echo " Menu → Accounts → Add (+)"
|
||||||
|
echo " SIP URI: ${extension}@${domain}"
|
||||||
|
echo " Save (✓)"
|
||||||
echo ""
|
echo ""
|
||||||
echo "4. Save and wait for registration"
|
echo "Step 2: Edit Account"
|
||||||
|
echo " Tap account → Edit"
|
||||||
|
echo " Auth Username: ${extension} (JUST the number!)"
|
||||||
|
echo " Auth Password: ${sip_password}"
|
||||||
|
echo " Outbound Proxy: ${domain} (JUST the domain!)"
|
||||||
|
echo " Media Encryption: srtp (select from dropdown)"
|
||||||
|
echo " Register: ✓"
|
||||||
|
echo " Save (✓)"
|
||||||
echo ""
|
echo ""
|
||||||
echo "5. To call extensions, just dial: 202, 101, etc."
|
echo "Step 3: Verify"
|
||||||
|
echo " Look for green dot or 'Registered' status"
|
||||||
echo ""
|
echo ""
|
||||||
echo "6. Set default action to Call:"
|
echo "Step 4: Dial Extensions"
|
||||||
echo " Menu → Preferences → UI → Default Action: Call"
|
echo " Just dial: 101, 202, etc."
|
||||||
echo ""
|
echo ""
|
||||||
echo "═══════════════════════════════════════════════════════════"
|
echo "Full details in the text file above."
|
||||||
echo ""
|
|
||||||
echo "NOTE: Baresip works MUCH BETTER on /e/OS than Linphone!"
|
|
||||||
echo " Should maintain audio with screen off."
|
|
||||||
echo "═══════════════════════════════════════════════════════════"
|
echo "═══════════════════════════════════════════════════════════"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user