Hi all, I'm posting the script which worked. In future if anybody faces the same problem can get a solution out of this.
In request_route:
#!ifdef WITH_HASH if (is_method("INVITE") && !has_totag()){ xdbg ("Contact [$ct] with Callid [$ci]"); $sht(a=>$ci) = $ct; } #!endif
in route[WITHINDLG]
#!ifdef WITH_HASH xdbg ("ruri [$ru]"); if ($(sht(a=>$ci){nameaddr.uri}) != $ru){ xdbg ("hash table entry [$sht(a=>$ci)]"); $ru = $(sht(a=>$ci){nameaddr.uri}); sht_rm_name_re("ha=>$ci"); xdbg ("rewriting ruri to [$ru]"); } #!endif
Thanks everyone for the help. I'm marking this thread as solved. -- -aft