Guest User

Untitled

a guest
Dec 19th, 2018
102
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.41 KB | None | 0 0
  1. ;;;;;sip headers
  2. [sipheader]
  3. exten=>_x.,1,Noop(reading from header ${PJSIP_HEADER(read,from)})
  4. same=>n,Set(from=${PJSIP_HEADER(read,from)})
  5. same=>n,Set(fromip=${CUT(from,>,1)})
  6. same=>n,Set(ip=${SHELL(php /root/cut.php "${fromip}")})
  7. same=>n,Set(pseudodid=${CUT(from,@,1)})
  8. same=>n,Noop(${ip})
  9.  
  10.  
  11. ;;; php cut.php script
  12. <?php
  13.  
  14. $ip= stristr($argv[1], '@'); //
  15. $arr= explode("@",$ip);
  16. echo $arr[1];
  17. exit();
  18. ?>
Add Comment
Please, Sign In to add comment