SignalWire-ML version 1.22 ============================= SignalWire::ML is a small module for creating SignalWire ML (SWML) documents. EXAMPLES Example 1: AI Application use SignalWire::ML; my $swml = SignalWire::ML->new({version => '1.0.1'}); $swml->set_aiparams({ direction => 'outbound', wait_for_user => 1, call_from_number => '+19184238080', call_enabled => 'false', sms_enabled => 'false', sms_from_number => '+19184588888', languages_enabled => 'true', language_mode => 'normal' }); $swml->set_aiprompt({ text => "Your name is Franklin and you are an expert at Star Wars. Introduce yourself and see if I have any questions." }); $swml->set_aipost_prompt({ text => "Please summarize the conversation." }); $swml->set_aipost_prompt_url({ post_prompt_url => "http://some.server.com/rest/post.cgi", post_prompt_auth_user => "me", post_prompt_auth_password => "secret" }); $swml->add_aiapplication("main"); print $swml->render_json; Example 2: Basic SWML use SignalWire::ML; my $swml = SignalWire::ML->new({version => '1.0.1'}); $swml->add_application("test", "play", { urls => ['https://github.com/freeswitch/freeswitch-sounds/raw/master/fr/ca/june/voicemail/48000/vm-goodbye.wav'] }); $swml->add_application("test", "hangup", "NORMAL_CLEARING"); $swml->add_application("main", "play", { urls => ['https://github.com/freeswitch/freeswitch-sounds/raw/master/en/us/callie/ivr/48000/ivr-welcome_to_freeswitch.wav'] }); $swml->add_application("main", "transfer", "test"); print $swml->render_json; INSTALLATION To install this module, you can use CPAN: cpan SignalWire::ML Alternatively, you can install it manually: perl Makefile.PL make make test make install DEPENDENCIES This module requires these other modules and libraries: JSON YAML::PP COPYRIGHT AND LICENCE Copyright (C) 2023-2024 by Brian West and SignalWire, Inc. This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself, either Perl version 5.10.0 or, at your option, any later version of Perl 5 you may have available.