Package org.asteriskjava.manager.action

Examples of org.asteriskjava.manager.action.OriginateAction


*/
public class SofthangupTest extends AsteriskServerTestCase
{
    public void testSofthangup() throws Exception
    {
        OriginateAction originate;
       
        originate = new OriginateAction();
        originate.setChannel("Local/1310");
        originate.setContext("default");
        originate.setExten("1340");
        originate.setPriority(1);
       
        //ManagerResponse response = managerConnection.sendAction(originate);
        //System.out.println("Response: " + response);
       
        Thread.sleep(10000);
View Full Code Here


    @SuppressWarnings("deprecation")
    @Test
    public void testBuildActionWithVariablesForAsterisk10()
    {
        OriginateAction originateAction;
        String actual;

        originateAction = new OriginateAction();
        originateAction.setVariable("var1=value1|var2=value2");

        actual = actionBuilder.buildAction(originateAction);

        assertTrue("Incorrect mapping of variable property for Asterisk 1.0",
                actual.indexOf("variable: var1=value1|var2=value2\r\n") >= 0);
View Full Code Here

    @SuppressWarnings("deprecation")
    @Test
    public void testBuildActionWithVariablesForAsterisk10WithNullValues()
    {
        OriginateAction originateAction;
        String actual;

        originateAction = new OriginateAction();
        originateAction.setVariable("var1=value1|var2=|var3=value3");

        actual = actionBuilder.buildAction(originateAction);

        assertTrue("Incorrect mapping of variable property for Asterisk 1.0",
                actual.indexOf("variable: var1=value1|var2=|var3=value3\r\n") >= 0);
View Full Code Here

    @SuppressWarnings("deprecation")
    @Test
    public void testBuildActionWithVariablesForAsterisk12()
    {
        OriginateAction originateAction;
        String actual;

        originateAction = new OriginateAction();
        originateAction.setVariable("var1=value1|var2=value2");

        actionBuilder.setTargetVersion(AsteriskVersion.ASTERISK_1_2);
        actual = actionBuilder.buildAction(originateAction);

        assertTrue("Incorrect mapping of variable property for Asterisk 1.2",
View Full Code Here

    @SuppressWarnings("deprecation")
    @Test
    public void testBuildActionWithVariablesForAsterisk12WithNullValues()
    {
        OriginateAction originateAction;
        String actual;

        originateAction = new OriginateAction();
        originateAction.setVariable("var1=value1|var2=|var3=value3");

        actionBuilder.setTargetVersion(AsteriskVersion.ASTERISK_1_2);
        actual = actionBuilder.buildAction(originateAction);

        assertTrue("Incorrect mapping of variable property for Asterisk 1.2",
View Full Code Here

    }

    @Test
    public void testBuildActionWithVariableMapForAsterisk12()
    {
        OriginateAction originateAction;
        Map<String, String> map;
        String actual;

        originateAction = new OriginateAction();

        map = new LinkedHashMap<String, String>();
        map.put("var1", "value1");
        map.put("VAR2", "value2");

        originateAction.setVariables(map);

        actionBuilder.setTargetVersion(AsteriskVersion.ASTERISK_1_2);
        actual = actionBuilder.buildAction(originateAction);

        assertTrue("Incorrect mapping of variable property for Asterisk 1.2",
View Full Code Here

TOP

Related Classes of org.asteriskjava.manager.action.OriginateAction

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.