M4 Development Update

3 min read

M4 Development Update

API

  • API: drop active calls — added REST drop_active_calls API to terminate active calls.
  • API v2 authentication — added REST /api/v2/auth/token, /api/v2/auth/refresh, /api/v2/auth/logout, and /api/v2/auth/me with access and refresh tokens (Doorkeeper/JWT).
  • CDR currency code fields — added VARCHAR(3) currency columns on CDR (user_currency, provider_currency, did_selling_currency, did_buying_currency); NULL when currency matches system currency to save space.

Major Enhancements

Webhooks and alerts

  • Alert webhooks — POST to a configured URL when an alert activates or clears (id, name, type, object, cause, value, count, timestamp).

Kamailio and platform

  • GeoIP-based RTPEngine routing — routes media through region-appropriate RTPEngine instances based on caller/callee GeoIP (Kamailio.cfg 1.8.87).

Connection points

  • Always transcode on connection points — added Always transcode yes/no on M4 origination and termination point codec settings; when enabled, core passes always-transcode to RTPEngine.

Platform

  • Demo auto-loginAdmin_Auto_Login = 1 in environment.rb logs in admin automatically on the demo install.

Billing, tariffs, and rating

Additional Improvements

Kamailio and platform

  • Kamailio forced digest auth for unknown IPs — new kamailio_force_auth_for_unknown_ips system.conf setting (default 0); when enabled, Kamailio challenges requests from non-static-IP origination points with digest auth instead of forwarding to core for IP auth.

Platform

  • Exception error messages — clearer exception error text.
  • Gemfile gem version lock — pinned Ruby gem versions in the Gemfile.
  • Generate Hash action log error — GUI Generate Hash no longer writes false Action Log API errors (“Incorrect hash”, “User was not found”) after hash generation.

CDR and exports

  • CDR Export additional columns — export templates can include codec, PAI/RPID, TP src/dst, routing attempt, MOS metrics, DID billing fields, media IPs, and related columns.

CDR and reporting

  • Calls list query performance — answered-call filters on the Calls list load in seconds instead of minutes.
  • Release Cause in Call List — Call List can show a sortable Release Cause (SIP release code) column when enabled in settings; new dc field in Elasticsearch.
  • OP rejection HGC priority — when multiple origination points share an IP, CDR reports the OP that failed advanced authentication (whitelist/blacklist) with the correct HGC instead of a later prefix-mismatch on a different OP.

Platform and operations

  • Blocked IPs database load — added DB indexes on unblock and first 10 characters of chain to reduce load when fail2ban blocks many IPs.
  • Replication check debug output — DB replication failure alerts in gui_debug.log now include full SHOW SLAVE STATUS output (Slave_IO_State, Slave_IO_Running, Slave_SQL_Running, etc.).

Billing, subscriptions, and invoices

  • Invoice subscriptions by billing period — new invoice_subscriptions_by_billing_period system.conf setting includes subscriptions on invoices by billing period instead of charge date when charges run late.
  • Call-day currency exchange rates — billing script applies the exchange rate from the call date (not today), caches rates, and prioritizes Calls then Invoices.

DIDs and call flow

  • DIDs page for simple users — simple users can view DIDs where they are assigned as Customer, including subscription fields when a subscription exists; column alignment tuned.

Destinations and routing

Bug Fix Report

  • Backup failure (iplocations timeout) — backups failed when iplocations could not reach one upstream host; added timeout so backup continues when a geo-lookup source is unreachable.
  • Invoice generation with subscriptions only — invoices are generated for users who have active subscriptions but no calls in the billing period.
  • Tariff rates list crash — fixed ArgumentError: argument out of range on Rates List when server date format is MM-DD-YYYY and Effective From dates match system date parsing.
  • DID Inventory search crash — fixed undefined method 'id' for nil:NilClass on DID Inventory search in Chrome for affected client DBs.
  • Automatic tariff import Prefix+CLI — import now groups by cli_group_hash_key so rows with the same prefix but different CLI values all import instead of only the first match.
  • Automatic tariff import duplicate prefixes — fixed temp table doubling row count (duplicate prefixes) on large XLS imports without secondary data.
  • PDF invoice encoding error — fixed Prawn::Errors::IncompatibleStringEncoding when resellers open generated PDF invoices.
  • Move prefix CSV import — fixed “Invalid CSV headers or column separators” on Move Prefix between Destination Groups with CSV.
  • DEBUG log PAI/src display — fixed misleading src before transformation in DEBUG logs when From and PAI differ (M4 Core 1.3.95).
  • Manager 2FA settings — Manager edit lacked a 2FA enable option; 2FA Enabled on Manager edit and Send Notification on Manager Login under Settings > Security are now available.
  • Rate notification email with slash in filename — email send failed when the job filename contained /; invalid filename characters are normalized before save (e.g. / replaced with -).
  • API crash logging — API crashes did not produce crash logs; crash logging restored.
  • Rerating GUI status stuck — rerating finished successfully but the GUI stayed at 99% FAILED when the MySQL connection dropped during the final status update.
  • DID delete blocked when calls exist — M4 no longer allows deleting DIDs that have calls, preventing empty invoice line items.
  • Charge Subscription on insufficient balance — “If balance insufficient – Charge Subscription” now charges subscriptions on negative balance as configured.
  • Kamailio TP call limits enforcement — core no longer under-enforces CPS vs TP Kamailio limits; enable via kamailio_tp_call_limits_check in system.conf and per-TP tp_kamailio_limits in DB.
  • Kamailio To tag on TP failure after ringing — when TP sends ringing/progress then a failure (e.g. Busy), Kamailio now forwards the provider’s To tag to the originator instead of substituting a new tag (unless disconnect-code rewriting is configured).
  • Kamailio fails to start with TLS — Kamailio did not start when TLS was enabled.

Questions about these updates?

Whether you are planning an upgrade, need help with migration, or want to discuss how new features fit your network — our team is ready to assist.

Contact us

Leave a Reply

Your email address will not be published. Required fields are marked *