-
Notifications
You must be signed in to change notification settings - Fork 87
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
d9466ea
commit 763a6fe
Showing
13 changed files
with
94 additions
and
86 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
53 changes: 0 additions & 53 deletions
53
freeswitch-esl/src/main/java/link/thingscloud/freeswitch/esl/builder/Command.java
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -23,7 +23,7 @@ | |
* @author : <a href="mailto:[email protected]">zhouhailin</a> | ||
* @version 1.0.0 | ||
*/ | ||
public class EslConstant { | ||
public class Constants { | ||
|
||
/** | ||
* Constant <code>BACKGROUND_JOB="BACKGROUND_JOB"</code> | ||
|
@@ -38,4 +38,16 @@ public class EslConstant { | |
public static final String SMF_BLEG = "bleg"; | ||
public static final String SMF_HOLDB = "holdb"; | ||
public static final String SMF_BOTH = "both"; | ||
|
||
public static final String UUID_ANSWER = "uuid_answer"; | ||
public static final String UUID_BRIDGE = "uuid_bridge"; | ||
public static final String UUID_BROADCAST = "uuid_broadcast"; | ||
public static final String UUID_BREAK = "uuid_break"; | ||
public static final String UUID_HOLD = "uuid_hold"; | ||
public static final String UUID_GETVAR = "uuid_getvar"; | ||
public static final String UUID_SETVAR = "uuid_setvar"; | ||
public static final String UUID_SETVAR_MULTI = "uuid_setvar_multi"; | ||
public static final String UUID_RECORD = "uuid_record"; | ||
public static final String UUID_TRANSFER = "uuid_transfer"; | ||
|
||
} |
59 changes: 59 additions & 0 deletions
59
freeswitch-esl/src/main/java/link/thingscloud/freeswitch/esl/helper/CommandHelper.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,59 @@ | ||
/* | ||
* Licensed to the Apache Software Foundation (ASF) under one or more | ||
* contributor license agreements. See the NOTICE file distributed with | ||
* this work for additional information regarding copyright ownership. | ||
* The ASF licenses this file to You under the Apache License, Version 2.0 | ||
* (the "License"); you may not use this file except in compliance with | ||
* the License. You may obtain a copy of the License at | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
|
||
package link.thingscloud.freeswitch.esl.helper; | ||
|
||
/** | ||
* @author zhouhailin | ||
* @since 1.6.5 | ||
*/ | ||
public class CommandHelper { | ||
|
||
private StringBuilder builder = new StringBuilder(); | ||
|
||
private CommandHelper(String cmd) { | ||
builder.append(cmd); | ||
} | ||
|
||
public static CommandHelper cmd(String cmd) { | ||
return new CommandHelper(cmd); | ||
} | ||
|
||
public CommandHelper arg(String arg) { | ||
builder.append(" ").append(arg); | ||
return this; | ||
} | ||
|
||
public CommandHelper arg(boolean arg) { | ||
builder.append(" ").append(arg); | ||
return this; | ||
} | ||
|
||
public CommandHelper arg(int arg) { | ||
builder.append(" ").append(arg); | ||
return this; | ||
} | ||
|
||
public CommandHelper arg(long arg) { | ||
builder.append(" ").append(arg); | ||
return this; | ||
} | ||
|
||
@Override | ||
public String toString() { | ||
return builder.toString(); | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
10 changes: 0 additions & 10 deletions
10
freeswitch-esl/src/test/java/link/thingscloud/freeswitch/esl/builder/CommandTest.java
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters