[OpenSIPS-Users] Fwd: [SR-Users] [Solved]Creating RURI ($ru) from Contact ($ct)

Aft nix aftnix at gmail.com
Mon May 28 16:25:10 CEST 2012


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


-- 
-aft



More information about the Users mailing list