Advertisement
Guest User

Untitled

a guest
Jan 8th, 2013
204
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.81 KB | None | 0 0
  1. ''''''''ORIGINATE URL'''''''''''''
  2.  
  3. http://192.168.3.103:8088/asterisk/rawman?action=originate&channel=sip/10.3.1.1/918059941511&extension=500&context=default&priority=1
  4.  
  5. ''''php code to send originate command'''''
  6. '''supposed to call extension 500 in the 'incoming' context'''
  7.  
  8. $call_url = $this->server . "/rawman" .
  9. "?action=originate&channel=sip/10.3.1.1/" /*. "282".*/. "91" . $next_call['phone_number'] . /**/
  10. "&extension=".$exten."&context=".$this->context."&priority=1";
  11.  
  12. echo "<h1>".$call_url."</h1>";
  13.  
  14. curl_setopt($ch, CURLOPT_URL, $call_url);
  15. curl_setopt($ch, CURLOPT_HEADER, 0);
  16. curl_setopt($ch, CURLOPT_FAILONERROR, 1);
  17. curl_setopt($ch, CURLOPT_COOKIEFILE, $this->auth_cookie);
  18. curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
  19. $urlresult = curl_exec($ch);
  20. curl_close($ch);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement