My failure route is called fine. Below is the stripped down code:
def ksr_failure_manage_trunk()
exit if KSR::TM.t_is_canceled() > 0
KSR.info("Hit trunk failure manage route")
KSR::PV.sets("$avp(auser)", 'user')
KSR::PV.sets("$avp(apass)", 'pass')
KSR::PV.sets("$avp(arealm)", 'test.local')
KSR.info("AVPs: #{KSR::PV.gete("$avp(auser)")} #{KSR::PV.gete("$avp(apass)")} #{KSR::PV.gete("$avp(arealm)")}")
if KSR::UAC.uac_auth() then
KSR.info("UAC authed, relaying")
KSR::TM.t_relay()
else
KSR.info("UAC NOT authed, no relay")
end
exit
end
Also the AVP values are set (I believe) correctly:
modparam("uac", "auth_username_avp", "$avp(auser)")
modparam("uac", "auth_password_avp", "$avp(apass)")
modparam("uac", "auth_realm_avp", "$avp(arealm)")
This throws the following complaint, and doesn’t send a new response back to the trunk:
I don’t understand branches very well, however after some digging around, I appended KSR::COREX.append_branch() in before the t_relay() in the failure. This stops the error and now we send an ACK and a new INVITE, but still without the expected authorisation header.
I feel like my lack of understanding about branches is the issue here - I seem to be sending an INVITE, but not adding the auth header that I suspect is being generated somewhere!
Thanks for your help.
________________________________
Andrew White - Director
uConnected
Email: andrew@uconnected.com.auWeb: www.uConnected.com.au