In case anyone else has this issue, the problem was a simple one.
My failure route doesn’t contain a t_on_branch();
Once added, rtjson_update_branch() was being called in my branch_route.
Happy days.
Kind Regards,
|
Ben Merrills |
Director |
|
zapappi ltd |
T: 0330 320 3333 |
Information and data sourced within zapappi Ltd are of a proprietary nature unless otherwise stated. Accordingly they must only be used in connection with zapappi Business. The information transmitted
is intended only for the person or entity to which it is addressed and may contain confidential and/or privileged material. Any review, transmission, dissemination or other use of, or taking of any action in reliance upon, this information by persons or entities
other than the intended recipient is prohibited. If you receive this in error, please contact the sender and delete the material from the computer.
zapappi Limited is a registered company in England and Wales Registration Number: 08711432
From: sr-users <sr-users-bounces@lists.kamailio.org>
On Behalf Of Ben Merrills
Sent: 24 December 2019 14:07
To: sr-users@lists.kamailio.org
Subject: [SR-Users] rtjson and uac_auth not updating to/from headers
Hi,
I am using rtjson module to do some call routing, as part of that I’ve added an additional section to the document to include authentication information.
I am using the uac_auth function from within failure_route to send authentication on to the uri. This works fine… however.
When the initial invite is sent, the To/From headers are updated as per the rtjson document. This isn’t the case however when the uac_auth function re-sends the invite with the digest header. The original to/from are being sent.
I am using the dialog module
restore_mode = auto
restore_dlg = 1
I assume there is something I need to call, but none of the RTJSON functions seem to be available within failure_route. Any pointers as to where I am going wrong would be greatly appreciated.
Thanks in advance.
Ben
failure_route[TRUNKAUTH] {
if (t_is_canceled()) {
exit;
}
if(t_check_status("401|407")) {
$avp(auser) = $avp(s:authUser);
$avp(apass) = $avp(s:authPass);
uac_auth();
t_relay();
exit;
}
}