Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

When using bypass_media_after_bridge, <sip_invite_route_uris> in database are in reverse order for inbound call #2443

Open
harweyh opened this issue Apr 25, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@harweyh
Copy link

harweyh commented Apr 25, 2024

When bypass_media_after_bridge option is used, call recovery fails because inbound call routes are in reverse order and FS is trying to send re-INVITE to wrong host (that it can't resolve which can be seen in debug logs).

I have dialplan which plays message to user and after that bridges call. When call is connected, FS removes itself from media path by using bypass_media_after_bridge.

After this i simulate FS crash and when calls are recovered, SIP re-invite is sent only to outbound call but not for inbound. When i investigated recovery data in database (MariaDB), I noticed that <sip_invite_route_uri> parameters are in reverse order for inbound call. I can see from debug logs that FS was failing when it tried to resolve that first route (and that is expected as that route should be last and it is not resolvable on host where FS is running).

This happens only when I am using this bypass_media_after_bridge functionality. If I don't use it, all routes are in correct order and everything works as expected when call recovery happens.

Freeswitch version that I'm using is 1.10.11.

I also wrote python script which is reversing <sip_invite_route_uri> addresses (to make them correct order) before crashing and executing sofia recover command and in that scenario everything seems to work correctly, so it looks like that something is causing those routes to reverse when SIP re-INVITEs to bypass media happens.

To reproduce:

Use dialplan with <bypass_media_after_bridge>, crash FS and recover calls.

<extension name="servicetest">
    <condition field="destination_number" expression="^\+12345567$">
        <action application="ring_ready"/>
        <action application="pre_answer"/>
        <action application="sleep" data="1500"/>
        <action application="playback" data="/usr/local/freeswitch/audio/message.wav"/>
        <action application="set" data="ringback=${fin-ring}"/>
        <action application="set" data="hangup_after_bridge=true"/>
        <action application="set" data="bypass_media_after_bridge=true"/>
        <action application="bridge" data="sofia/gateway/kamailio/+7654321"/>
    </condition>
</extension>

Expected behavior:
Freeswitch should send SIP re-INVITEs correctly

@harweyh harweyh added the bug Something isn't working label Apr 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant