send_info.pl 852 B

1234567891011121314151617181920212223242526272829
  1. #!/usr/bin/perl
  2. require ESL;
  3. ESL::eslSetLogLevel(7);
  4. my $con = ESL::ESLconnection->new("localhost", "8021", "ClueCon");
  5. my $e = ESL::ESLevent->new("SEND_INFO");
  6. $e->addHeader("local-user", '1000@192.168.1.113');
  7. $e->addHeader("from-uri", 'sip:1000@192.168.1.113');
  8. $e->addHeader("to-uri", 'sip:1000\@192.168.1.113');
  9. $e->addHeader("content-type", "application/csta+xml");
  10. $e->addHeader("content-disposition", "signal; handling=required");
  11. $e->addHeader("profile", "internal");
  12. my $body = "<?xml version=\"1.0\" encoding=\"UTF-8\"?>
  13. <MakeCall xmlns=\"http://www.ecma-international.org/standards/ecma-323/csta/ed3\">
  14. <callingDevice>sip:1000@\192.168.1.113</callingDevice>
  15. <calledDirectoryNumber>sip:9999\@192.168.1.113</calledDirectoryNumber>
  16. <autoOriginate>doNotPrompt</autoOriginate>
  17. </MakeCall>";
  18. $e->addBody($body);
  19. $con->sendEvent($e);