FreeSWITCH: simple application of the JAVA module (mod_java)

Source: Internet
Author: User

FreeSWITCH provides a mod_java module to control FreeSWITCH in JAVA. Recently just in touch with the next, it is troubled by some of the problems in, now sorted out with everyone to share: Note: has made the demo (http://wiki.freeswitch.org/wiki/Java) in the official wiki in advance into a jar package, the name is freeswitchJavaScript. jar 1. Convert the file freeswitchJavaScript. jar is uploaded to the linux directory, as follows:/usr/local/freeswitch/jar/freeswitchJavaScript. jar 2. Run the freeswitch file. jar is uploaded to this directory, as follows:/usr/local/freeswitch/scripts/freeswitch. jar 3. Convert freeswitchJavaScript. upload the jar file referenced by jar to the/javapath directory. Note: The/javapath directory is used to store the jar package referenced by a third party. 4. Configure the java module file: /usr/local/freeswitch/conf/autoload_configs/java. conf. xml mainly configures the following two content: <javavm path = "/usr/java/jdk1.6.0 _ 16/jre/lib/i386/client/libjvm. so "/> <option value ="-www.2cto. comDjava. class. path =/usr/local/freeswitch/scripts/freeswitch. jar:/javapath/axis. jar:/javapath/activation. jar:/javapath/axis-ant.jar:/javapath/commons-discovery-0.2.jar:/javapath/commons-logging-1.0.4.jar:/javapath/freeswitch. jar:/javapath/jaxrpc. jar:/javapath/log4j-1.2.8.jar:/javapath/log4j. properties:/javapath/mail. jar:/javapath/saaj. jar:/javapath/wsdl4j-1.5.1.jar:/javapath/jetty-6.1.9.jar:/javapath/jetty-util-6.1.9.jar:/javapath/servlet_jetty.jar "/> note: the classpath points to the jar File 5 referenced in step 3. Configure the www.2cto.com file in dialplan:/usr/local/freeswitch/conf/dialplan/default. xml dialing scheme: <extension name = "java_demo"> <condition field = "destination_number" expression = "^ (9000) $ "> <action application =" answer "/> <action application =" java "data ="/usr/local/freeswitch/jar/freeswitchJavaScript. jar PhoneTest "/> <action application =" sleeping "data =" 2000 "/> </condition> </extension>

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.