Skip to content

Unexpected BYE, 408 "Session timeout" with Aastra 400 #284

@BrianMiller793

Description

@BrianMiller793

Version: FreeSWITCH version: 1.10.12-release+git~20240802T210227Z~a88d069d6f~64bit (git a88d069 2024-08-02 21:02:27Z 64bit)
Sofia: sofia-sip-1.13.17

An Aastra 400 calls FreeSWITCH as a client. Less than 120 seconds later, FreeSWITCH hangs up with an unexpected BYE, and "Session timeout" for the reason. The problem only occurs when the UAC is outside the local network.

I have reproduced this using a test script, and the error happens only when the NAT is in use from an external address. To reproduce the error under test, I connect a Raspberry PI through my cell phone, and then run a Python Behave script against my test server. The error will not reproduce when the UAC is on the same network as the server.

From fs_cli: nua_session.c:1564 nua_session_usage_refresh() nua(0x7a56ec0509a0): session almost expired, sending BYE before timeout.

In mod_sofia.c, I found that commenting out the check for Aastra in sofia_receive_message() (line 2071) allows the call to complete normally.

What sets off the unexpected action is a 200 OK to an UPDATE, with "Session-Expires: 1800;refresher=uas". If Session-Expires does not have the "refresher", then the premature BYE does not occur.

Session Initiation Protocol (200)
Status-Line: SIP/2.0 200 OK
Message Header
    Via: SIP/2.0/TCP 64.19.65.25:5080;rport=5080;branch=z9hG4bKe3UKBgKt3Bm8K;received=64.19.65.25
    To: "Osthoff" <sip:wunderbaum@littletrees>;tag=AI1E037B1410C9A99B
    From: <sip:7253@littletrees>;tag=yXt8Dy3e1QB9H
    Call-ID: AI15C12F081C97F2D2_00:08:5d:97:7d:12
    CSeq: 90289035 UPDATE
    Contact: <sip:[email protected]:5060;transport=tcp>
    Allow-Events: presence,dialog,message-summary,refer
    Allow: ACK,BYE,CANCEL,INVITE,NOTIFY,OPTIONS,PUBLISH,UPDATE,REFER
    User-Agent: Aastra 400
    P-Preferred-Identity: "Osthoff" <sip:[email protected]>
    Require: timer
    Session-Expires: 1800;refresher=uas
    Supported: timer
    Content-Type: application/sdp
    Content-Length: 234
Message Body
    Session Description Protocol
        Session Description Protocol Version (v): 0
        Owner/Creator, Session Id (o): aastra400 48971799 48971800 IN IP4 192.168.1.225
        Session Name (s): call
        Connection Information (c): IN IP4 192.168.1.225
        Time Description, active time (t): 0 0
        Media Description, name and address (m): audio 5004 RTP/AVP 8 0 101
        Media Attribute (a): rtpmap:8 PCMA/8000
        Media Attribute (a): rtpmap:0 PCMU/8000
        Media Attribute (a): rtpmap:101 telephone-event/8000
        Media Attribute (a): fmtp:101 0-15
        Media Attribute (a): ptime:20

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions