Commande tm._uac_start JsonRPC with Headers From, To and Fake 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
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.
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 }
I tested with my version kamailio (5.0.5 (x86_64/linux)). Correction is OK. Thanks. Juan
Closed #1393.