Skip to content

Commit

Permalink
cleanup code
Browse files Browse the repository at this point in the history
  • Loading branch information
aqeelabpro committed Jan 5, 2025
1 parent f94ddd9 commit 6ee0914
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 48 deletions.
41 changes: 5 additions & 36 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,11 @@
<version>3.2.5</version>
<relativePath/> <!-- lookup parent from repository -->
</parent>
<groupId>com.aws</groupId>
<artifactId>amazon-polly-asterisk</artifactId>
<groupId>com.google</groupId>
<artifactId>gemini-asterisk</artifactId>
<version>0.0.1-SNAPSHOT</version>
<name>amazon-polly-asterisk</name>
<description>amazon-polly-asterisk</description>
<name>gemini-asterisk</name>
<description>gemini-asterisk</description>
<properties>
<java.version>17</java.version>
<maven.compiler.source>17</maven.compiler.source>
Expand All @@ -38,23 +38,6 @@
</dependencies>
</dependencyManagement>
<dependencies>

<!-- https://mvnrepository.com/artifact/software.amazon.awssdk/transcribestreaming -->
<dependency>
<groupId>software.amazon.awssdk</groupId>
<artifactId>transcribestreaming</artifactId>
<version>2.25.54</version>
</dependency>





<dependency>
<groupId>org.json</groupId>
<artifactId>json</artifactId>
<version>20231013</version>
</dependency>
<dependency>
<groupId>com.google.cloud</groupId>
<artifactId>google-cloud-speech</artifactId>
Expand All @@ -80,20 +63,6 @@
<version>${guava.version}</version>
</dependency>

<dependency>
<groupId>software.amazon.awssdk</groupId>
<artifactId>s3</artifactId>
<version>2.20.41</version> <!-- Ensure this is the latest version -->
</dependency>


<dependency>
<groupId>software.amazon.awssdk</groupId>
<artifactId>s3-transfer-manager</artifactId>
<version>2.25.55</version>
</dependency>


<dependency>
<groupId>com.neovisionaries</groupId>
<artifactId>nv-websocket-client</artifactId>
Expand Down Expand Up @@ -291,4 +260,4 @@
</plugins>
</build>

</project>
</project>
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package com.google.asterisk.agi.scripts;


import com.google.asterisk.agi.AgiLogic;
import org.asteriskjava.fastagi.AgiChannel;
import org.asteriskjava.fastagi.AgiRequest;
import org.asteriskjava.fastagi.AgiScript;
Expand Down
8 changes: 4 additions & 4 deletions src/main/java/com/google/asterisk/ami/AsteriskAmiConfig.java
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,9 @@ public AsteriskAmiConfig(AsteriskProperties asteriskProperties) {

@Bean
@DependsOn({"asteriskEventListener"})
DefaultManagerConnection manager(com.aws.asterisk.ami.AsteriskEventListener asteriskEventListener) {
DefaultManagerConnection manager(AsteriskEventListener asteriskEventListener) {
DefaultManagerConnection manager = new DefaultManagerConnection();
com.aws.asterisk.ami.AsteriskAmiProperties asteriskAmiProperties = asteriskProperties.getAmi();
AsteriskAmiProperties asteriskAmiProperties = asteriskProperties.getAmi();
manager.setHostname(asteriskAmiProperties.getHost());
manager.setUsername(asteriskAmiProperties.getUsername());
manager.setPassword(asteriskAmiProperties.getPassword());
Expand All @@ -29,7 +29,7 @@ DefaultManagerConnection manager(com.aws.asterisk.ami.AsteriskEventListener aste
}

@Bean("asteriskEventListener")
com.aws.asterisk.ami.AsteriskEventListener asteriskEventListener() {
return new com.aws.asterisk.ami.AsteriskEventListener();
AsteriskEventListener asteriskEventListener() {
return new AsteriskEventListener();
}
}
16 changes: 8 additions & 8 deletions src/main/resources/log4j2.xml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
<Console name="ConsoleAppender" target="SYSTEM_OUT" follow="true">
<PatternLayout pattern="${LOG_PATTERN}"/>
</Console>
<RollingFile name="OneBrainVoiceAppender" fileName="${LOG-PATH}/google-speech.log"
<RollingFile name="GoogleVoiceAppender" fileName="${LOG-PATH}/google-speech.log"
filePattern="${LOG-PATH}/google-speech-${DATE_PATTERN}.log.zip" append="true">
<PatternLayout pattern="${LOG_PATTERN}"/>
<Policies>
Expand All @@ -34,7 +34,7 @@
</Policies>
<DefaultRolloverStrategy max="10"/>
</RollingFile>
<RollingFile name="OneBrainVoiceErrorAppender" fileName="${LOG-PATH}/google-speech-error.log"
<RollingFile name="GoogleVoiceErrorAppender" fileName="${LOG-PATH}/google-speech-error.log"
filePattern="${LOG-PATH}/google-speech-error-${DATE_PATTERN}.log.zip" append="true">
<PatternLayout pattern="${LOG_PATTERN}"/>
<Policies>
Expand All @@ -47,19 +47,19 @@
<Loggers>

<Logger name="org.asteriskjava.manager.internal.EventBuilderImpl" level="info" additivity="false">
<AppenderRef ref="OneBrainVoiceErrorAppender" level="error"/>
<AppenderRef ref="GoogleVoiceErrorAppender" level="error"/>
</Logger>

<Logger name="com.onebrain" level="info" additivity="false">
<Logger name="com.google" level="info" additivity="false">
<AppenderRef ref="ConsoleAppender" level="info"/>
<AppenderRef ref="OneBrainVoiceAppender" level="info"/>
<AppenderRef ref="OneBrainVoiceErrorAppender" level="error"/>
<AppenderRef ref="GoogleVoiceAppender" level="info"/>
<AppenderRef ref="GoogleVoiceErrorAppender" level="error"/>
</Logger>

<Root level="info">
<AppenderRef ref="ConsoleAppender" level="info"/>
<AppenderRef ref="OneBrainVoiceAppender" level="info"/>
<AppenderRef ref="OneBrainVoiceErrorAppender" level="error"/>
<AppenderRef ref="GoogleVoiceAppender" level="info"/>
<AppenderRef ref="GoogleVoiceErrorAppender" level="error"/>
</Root>
</Loggers>
</Configuration>

0 comments on commit 6ee0914

Please sign in to comment.