Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- my $message = shift;
- my $proxy_address='129.241.208.234';
- my $default_pizza = $pizza_abc;
- my $pizza_abc = "sip:G2\@$proxy_address";
- my $pizzaABC = "sip:G1\@$proxy_address";
- my $pizzaMain = "sip:G2\@$proxy_address";
- my $pizzaSat = "sip:G1\@$proxy_address";
- my $pizza = "sip:pizza\@$proxy_address";
- my $to = $message->getHeader("To");
- log(L_ALERT, "first\n");
- log(L_ALERT, "second\n");
- log(L_ALERT, $to);
- if(($message->getMethod() eq "INVITE") and ($to eq $pizza)){
- log(L_ALERT, "pizza\n");
- if(rand() < 0.75){
- $message->rewrite_ruri($pizzaMain);
- log(L_ALERT, "main\n");
- }
- else{
- $message->rewrite_ruri($pizzaSat);
- log(L_ALERT, "Sat\n");
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement