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

[BUG] unable to change sip_to_user #182

Open
badcrc opened this issue Dec 5, 2024 · 1 comment
Open

[BUG] unable to change sip_to_user #182

badcrc opened this issue Dec 5, 2024 · 1 comment
Labels
bug Something isn't working

Comments

@badcrc
Copy link

badcrc commented Dec 5, 2024

I want to change the sip_to_user in the outbound leg, I've tried to make a Manipulation rule in the inbound leg (as I saw in the code how the manipulations are being applied) but I'm not able to do it.

I can change the sip_from_user but changing the sip_to_user results in a strange bug.

This works:

"actions": [
        {
            "action": "set",
            "refervar": null,
            "pattern": null,
            "targetvar": "sip_from_user",
            "values": [
                "34${sip_from_user}"
            ]
        }
    ],

and adds +34 to the sip_from_user (don't know why it adds the +, I do want it so... ).

But the same manipulation but for the sip_to_user:

 "actions": [
        {
            "action": "set",
            "refervar": null,
            "pattern": null,
            "targetvar": "sip_to_user",
            "values": [
                "34${sip_to_user}"
            ]
        }
    ],

Results in:

2024-12-05 14:24:53.099169 [DEBUG] switch_channel.c:1264 sofia/ZZZZZZZ/[email protected] EXPORTING[export_vars] [sip_invite_from_uri]=[<sip:343434343434343434343434343434343434343434343434343434343434343434343434343434343434343434343434343434343434343434343434343434343434343434343434343434343434343434343434343434343434343434343434343434343434${sip_from_user}@ZZZZZZZ>] to event

And if the manipulation is just:

 "actions": [
        {
            "action": "set",
            "refervar": null,
            "pattern": null,
            "targetvar": "sip_to_user",
            "values": [
                "${sip_to_user}"
            ]
        }
    ],

nothing changes and To: <sip:${sip_to_user}@ is being literally sent to the gateway, not changing it value.

What I'm missing? Thanks!

@badcrc badcrc added the bug Something isn't working label Dec 5, 2024
@hnimminh
Copy link
Owner

hnimminh commented Dec 5, 2024

Hi @badcrc,
Can you try "values":["+34", "sip_to_user" ]
I'm not sure if FreeSWITCH allow to change sip_invite_to (if so try with sip_invite_to_uri).

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

2 participants