The rtjson module is updating the "from" sip header twice with the "from" and "to" json fields. By the way "to" sip header keeps unchanged.

This is the json example:

.... response.routes[0].headers = { "from": { "display": "Anonymous", "uri": "sip:anonymous@anonymous.invalid" }, "to": { "display": "44444444", "uri": "sip:44444444@172.16.213.38" }, }; ....
The result would be:
From: Anonymous4444444444sip:anonymous@anonymous.invalidsip:4444444444@172.16.213.38;tag=1.
To: sut sip:0115555555@172.16.213.38:5060.

I modified one line and now works correctly

diff --git a/modules/rtjson/rtjson_routing.c b/modules/rtjson/rtjson_routing.c index 5542e63..60bdcad 100644 --- a/modules/rtjson/rtjson_routing.c +++ b/modules/rtjson/rtjson_routing.c @@ -481,7 +481,7 @@ int rtjson_prepare_branch(sip_msg_t *msg, srjson_doc_t *jdoc, srjson_t *nj) xuri.len = strlen(xuri.s); } if(xdsp.len>0 || xuri.len>0) { **- uacb.replace_from(msg, &xdsp, &xuri); + uacb.replace_to(msg, &xdsp, &xuri);** } } }

From: Anonymous sip:anonymous@anonymous.invalid;tag=1.
To: 4444444444 sip:4444444444@172.16.213.38.


You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub, or mute the thread.