my $me = "192.168.1.15"; #Replace with your IP address #==================== #=== User Section === #==================== sub route { print "$mline from $si:$sp\n"; if($method eq "REGISTER") { save(); #print_locations(); } if(loose_route()) { print "Loose Route \$du=$du\n"; forward(); return; } if($method eq "INVITE") { record_route(); } if($method=~m/(^INVITE$|^CANCEL$|^ACK$)/) { if($method eq "INVITE") { sl_send_reply("100","Giving a try"); } if($method eq "CANCEL") { sl_send_reply("200","Cancelling"); } if($location{$ou} ne "") { my $ip=$location{$ou}; rewritehost($ip); forward(); } elsif($rU=~m/^\+41215509.{3}/) { rewritehost("128.179.67.76"); forward(); } else { sl_reply_error(); } } } sub onreply_route { print "$mline from $si:$sp\n"; } #=========================== #=== End of User Section === #===========================