Skip to content

Commit

Permalink
迭代: 1.5.2.RELEASE
Browse files Browse the repository at this point in the history
  • Loading branch information
zhouhailin committed Apr 7, 2021
1 parent c0009fe commit e8d1a9f
Show file tree
Hide file tree
Showing 6 changed files with 22 additions and 8 deletions.
2 changes: 1 addition & 1 deletion freeswitch-esl-example/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
<parent>
<artifactId>freeswitch-esl-all</artifactId>
<groupId>link.thingscloud</groupId>
<version>1.5.1.RELEASE</version>
<version>1.5.2.RELEASE</version>
</parent>
<modelVersion>4.0.0</modelVersion>

Expand Down
2 changes: 1 addition & 1 deletion freeswitch-esl-spring-boot-starter-example/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
<parent>
<artifactId>freeswitch-esl-all</artifactId>
<groupId>link.thingscloud</groupId>
<version>1.5.1.RELEASE</version>
<version>1.5.2.RELEASE</version>
</parent>

<artifactId>freeswitch-esl-spring-boot-starter-example</artifactId>
Expand Down
2 changes: 1 addition & 1 deletion freeswitch-esl-spring-boot-starter/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
<parent>
<artifactId>freeswitch-esl-all</artifactId>
<groupId>link.thingscloud</groupId>
<version>1.5.1.RELEASE</version>
<version>1.5.2.RELEASE</version>
</parent>
<modelVersion>4.0.0</modelVersion>

Expand Down
2 changes: 1 addition & 1 deletion freeswitch-esl/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
<parent>
<artifactId>freeswitch-esl-all</artifactId>
<groupId>link.thingscloud</groupId>
<version>1.5.1.RELEASE</version>
<version>1.5.2.RELEASE</version>
</parent>
<modelVersion>4.0.0</modelVersion>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@

import link.thingscloud.freeswitch.esl.transport.event.EslEvent;

import java.util.Map;

/**
* @author zhouhailin
* @version 1.5.1
Expand All @@ -14,11 +16,23 @@ public static String get(EslEvent event, String key) {
return event.getEventHeaders().get(key);
}

public static long getLongVar(EslEvent event, String key) {
return Long.parseLong(getVar(event.getEventHeaders(), key));
}

public static int getIntVar(EslEvent event, String key) {
return Integer.parseInt(getVar(event.getEventHeaders(), key));
}

public static String getVar(EslEvent event, String key) {
return getVar(event.getEventHeaders(), key);
}

public static String getVar(Map<String, String> eventHeaders, String key) {
if (key.startsWith(VARIABLE_PREFIX)) {
return event.getEventHeaders().get(key);
return eventHeaders.get(key);
}
return event.getEventHeaders().get(VARIABLE_PREFIX + key);
return eventHeaders.get(VARIABLE_PREFIX + key);
}

private VariableUtil() {
Expand Down
4 changes: 2 additions & 2 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
<groupId>link.thingscloud</groupId>
<artifactId>freeswitch-esl-all</artifactId>
<packaging>pom</packaging>
<version>1.5.1.RELEASE</version>
<version>1.5.2.RELEASE</version>

<name>freeswitch-esl-all-${project.version}</name>
<description>freeswitch event socket library on netty 4.1</description>
Expand Down Expand Up @@ -56,7 +56,7 @@
<url>https://github.com/zhouhailin/freeswitch-esl-all</url>
<connection>scm:git:https://github.com/zhouhailin/freeswitch-esl-all.git</connection>
<developerConnection>scm:git:https://github.com/zhouhailin/freeswitch-esl-all.git</developerConnection>
<tag>1.5.1.RELEASE</tag>
<tag>1.5.2.RELEASE</tag>
</scm>
<licenses>
<license>
Expand Down

0 comments on commit e8d1a9f

Please sign in to comment.