Incoming SIP INVITEs fail with "SipUserAgent not found" due to Contact username suffix mismatch

Sebastián Acosta

New Member
Problem Summary
When Flashphoner registers a SIP extension (e.g., 116), it adds a random numeric suffix to the Contact username:

text
Contact: <sip:116-587886243@54.233.122.89:30002>;expires=3600
The PBX (Yeastar/Asterisk) correctly stores this Contact and sends incoming INVITEs to that exact address:

text
INVITE sip:116-587886243@127.0.0.1:4070 SIP/2.0
However, Flashphoner fails to match the incoming INVITE and logs:

text
SipUserAgent not found for incoming request (Send 404 to server)
It seems Flashphoner cannot find a SipUserAgent for 116-587886243 because internally it only knows 116 (the login username).

Traffic Capture Evidence
We performed a traffic capture on the Flashphoner server. It clearly shows:

  1. Flashphoner sends the REGISTER with a suffix: sip:116-587886243@...
  2. Yeastar responds 200 OK and stores that contact
  3. Yeastar sends a NOTIFY to that same contact: sip:116-587886243@...
  4. Flashphoner responds with 481 (Subscription does not exist)
The capture is attached to this ticket.

My Questions
  1. Can Flashphoner be configured to match incoming INVITEs by PREFIX?
    • For example, ignore everything after the dash - and match 116-587886243 to the registered user 116.
    • Is there a setting like sip.invite_username_match_strategy=prefix that actually works for this scenario? (We tried it and it didn't work.)
  2. If prefix matching is not possible or reliable, how can we COMPLETELY DISABLE the random numeric suffix generation?
    • We want Flashphoner to register with the exact login name: sip:116@54.233.122.89:30002 instead of sip:116-xxxxxx@....
    • What are the correct configuration parameters for this?
  3. How can we apply the solution for multiple extensions (116, 113, 114, etc.) without hardcoding each one?
    • We need a global configuration that works for all registered extensions.
What We Have Already Tried (Did Not Work)
text
sip.accept_any_invite_for_registered_user=true
sip.invite_username_match_strategy=prefix
sip.ignore_invite_username_validation=true
sip.invite_username_filter=true
sip.generate_contact_with_suffix=false
sip.force_contact_user=true
sip.contact_user_equals_login=true
None of these prevented the suffix from appearing or enabled prefix matching.

Environment
  • Flashphoner WCS version: 5.2.2105
  • PBX: Yeastar PSE (Asterisk 13.7.0)
  • SIP transport: UDP
  • Network: Flashphoner: 54.233.122.89 (public), 10.10.2.61 (local)
Attachments
  • Traffic capture (PCAP) showing the REGISTER with suffix and the failing NOTIFY
Thank you for your help.

Best regards,
 

Attachments

Max

Administrator
Staff member
Good day.
sip.accept_any_invite_for_registered_user=true
sip.invite_username_match_strategy=prefix
sip.ignore_invite_username_validation=true
sip.invite_username_filter=true
sip.generate_contact_with_suffix=false
sip.force_contact_user=true
sip.contact_user_equals_login=true
Therea are no such parameters in flashphoner.properties file. Please try the option
Code:
sip_add_contact_id=false
 

Sebastián Acosta

New Member
Hello Max,

Thank you very much for your help.

We tested the parameter:

sip_add_contact_id=false
and this successfully resolved the original Contact suffix issue.

Now Flashphoner registers correctly using:

Contact: <sip:116@54.233.122.89:30004>
instead of:

Contact: <sip:116-xxxxxxxx@54.233.122.89:30004>
We performed additional packet captures and WCS log analysis.

At this point we confirmed:

  • SIP REGISTER works correctly
  • Authentication works correctly
  • Incoming INVITEs reach Flashphoner correctly
  • The INVITE is received on the same registered SIP port
  • Username matching is now correct (116)
However, incoming INVITEs are still rejected internally by WCS.

The relevant WCS logs show:

Requested by uri sip:116@simpletech.ras.yeastar.com:5060 SipUserAgent null
SipUserAgent not found for incoming request
The INVITE received by WCS is:

INVITE sip:116@simpletech.ras.yeastar.com:5060 SIP/2.0
while the registered Contact is:

sip:116@54.233.122.89:30004
So it appears WCS is performing SipUserAgent matching using the full Request-URI (including host/domain), instead of matching only the SIP username.

Question:

Is there any configuration parameter or supported method to make WCS ignore the Request-URI host/domain and match incoming INVITEs only by SIP username?

Or alternatively, is there a recommended Yeastar/Asterisk configuration to ensure INVITEs are sent directly to the registered Contact URI instead of the PBX domain URI?

Thank you again for your support and assistance.

Best regards,
Sebastián Acosta
 
Top