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

Commande tm.t_uac_start issue #1393

Closed
JuanPascual2 opened this issue Jan 10, 2018 · 3 comments
Closed

Commande tm.t_uac_start issue #1393

JuanPascual2 opened this issue Jan 10, 2018 · 3 comments

Comments

@JuanPascual2
Copy link

JuanPascual2 commented Jan 10, 2018

Commande tm._uac_start JsonRPC with Headers From, To and Fake header works

{"id":1,"jsonrpc":"2.0","method":"tm.t_uac_start","params":["REGISTER","sip:suio.com","sip:101.155.139.171:5060","udp:10.155.139.170:5064","From:sip:juan@sui.com\r\nTo:sip:juan@sui.com\r\nFake:hedear\r\n"]}

{
        "jsonrpc":      "2.0",
        "result":       {
        },
        "id":   1
}

But commande tm.t_uac_start JsonRPC with only Headers From and To doesn't works

{"id":1,"jsonrpc":"2.0","method":"tm.t_uac_start","params":["REGISTER","sip:suio.com","sip:101.155.139.171:5060","udp:10.155.139.170:5064","From:sip:juan@sui.com\r\nTo:sip:juan@sui.com\r\n"]}

{
        "jsonrpc":      "2.0",
        "error":        {
                "code": 500,
                "message":      "out of memory"
        },
        "id":   1
}

On documentation module tm, only From and To headers are mandatories.

5. RPC Commands
5.1.  tm.t_uac_start

Generates and sends a local SIP request.

Parameters:

    method - request method

    RURI - request SIP URI

    NEXT HOP - next hop SIP URI (OBP); use “.” if no value.

    socket - local socket to be used for sending the request; use “.” if no value.

    headers - set of additional headers to be added to the request; at least “From” and “To” headers must be provided)

    body - (optional, may not be present) request body (if present, requires the “Content-Type” and “Content-length” headers)

Best regard
Juan

miconda added a commit that referenced this issue Jan 16, 2018
@miconda
Copy link
Member

miconda commented Jan 16, 2018

I pushed a patch for it (referenced above). Can you test with master branch or pick the patch in your version? If all ok, then I will backport.

@JuanPascual2
Copy link
Author

I tested in master version (5.2 dev). Correction is OK.

{"id":1,"jsonrpc":"2.0","method":"tm.t_uac_start","params":["REGISTER","sip:suio.com","sip:10.192.226.146:5060","udp:10.155.139.170:5064","From:"test"sip:juan@sui.com;tag=4566666\r\nTo:sip:juan@sui.com;tag=4566666ffff\r\n"]}
envoi
{
"jsonrpc": "2.0",
"result": {
},
"id": 1
}

@JuanPascual2
Copy link
Author

I tested with my version kamailio (5.0.5 (x86_64/linux)). Correction is OK.
Thanks.
Juan

miconda added a commit that referenced this issue Jan 19, 2018
- reported by GH #1393

(cherry picked from commit 6feb282)
miconda added a commit that referenced this issue Feb 22, 2018
- reported by GH #1393

(cherry picked from commit 6feb282)
(cherry picked from commit c60e702)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants