Hello,
I am attempting to perform some asynchronous lookup upon receiving an INVITE and then
reply with a 3xx response with a modified From header. My workflow now is to create a
transaction when receiving the INVITE, suspend the transaction, perform the asynchronous
lookup, continue the transaction upon response, and then modify the From header and reply.
The ONLY problem I am having is modifying the From header! How can I modify the From
header in this scenario?
function ksr_request_route()
if KSR.is_INVITE() then
if KSR.tm.t_newtran() then
cache_transaction_info()
KSR.tmx.t_suspend()
--perform async loookup
end
end
return 1
end
--This function called on response from async lookup. Equivalent of ONREPLY_ROUTE
function ksr_reply_route()
--Finds the transaction_index and transaction_label from a cache
KSR.tmx.t_continue(transaction_index, transaction_label,
"redirect_transaction");
KSR.x.drop()
return 1
end
function redirect_transaction()
KSR.pv.sets("$fU", "Jenny") --Doesn't actually modify the from
username for 302 response!
KSR.tm.t_reply(302, "Redirecting")
return 1
end
Thank you much!
-Michael