Send voice phone (mp3 or wave file) using www.smsmatrix.com Gateway


/ Published in: Perl
Save to your folder(s)



Copy this code and paste it in your HTML
  1. use LWP::UserAgent;
  2. use HTTP::Request::Common;
  3.  
  4. # The voice file provided must be in mp3 or wave format.
  5. # It will be converted to: 16Bit 8kHz mono wave format.
  6.  
  7. my $ua = LWP::UserAgent->new();
  8. my $res = $ua->request
  9. (
  10. POST 'http://www.smsmatrix.com/matrix_voice',
  11. Content_Type => 'form-data',
  12. Content => [ username => '[email protected]',
  13. password => 'pass8988',
  14. phone => '12502771720', ## comma delimited list
  15. voicefile => ['/tmp/november_sale.wav'],
  16. response => 1, ## optional
  17. callerid => '16307791722' ## optional
  18. ]
  19. );
  20.  
  21. if ($res->is_error) { die "HTTP Error\n"; }
  22. print "Matrix API Response1: " . $res->content . "\n\n";

URL: http://www.smsmatrix.com/?sms-gateway

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.