-
Notifications
You must be signed in to change notification settings - Fork 27
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #143 from ocarriles/master
issue #142
- Loading branch information
Showing
109 changed files
with
3,615 additions
and
666 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
99 changes: 99 additions & 0 deletions
99
application/src/main/java/org/restcomm/sbc/chain/impl/GeoACLDPIProcessor.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,99 @@ | ||
/******************************************************************************* | ||
* TeleStax, Open Source Cloud Communications | ||
* Copyright 2011-2016, Telestax Inc, Eolos IT Corp and individual contributors | ||
* by the @authors tag. | ||
* | ||
* This program is free software: you can redistribute it and/or modify | ||
* under the terms of the GNU Affero General Public License as | ||
* published by the Free Software Foundation; either version 3 of | ||
* the License, or (at your option) any later version. | ||
* | ||
* This program is distributed in the hope that it will be useful, | ||
* but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
* GNU Affero General Public License for more details. | ||
* | ||
* You should have received a copy of the GNU Affero General Public License | ||
* along with this program. If not, see <http://www.gnu.org/licenses/> | ||
* | ||
*******************************************************************************/ | ||
|
||
package org.restcomm.sbc.chain.impl; | ||
|
||
|
||
|
||
import javax.servlet.sip.SipServletMessage; | ||
|
||
|
||
import org.apache.log4j.Logger; | ||
import org.restcomm.chain.ProcessorChain; | ||
import org.restcomm.chain.processor.Message; | ||
import org.restcomm.chain.processor.ProcessorCallBack; | ||
import org.restcomm.chain.processor.impl.DefaultDPIProcessor; | ||
import org.restcomm.chain.processor.impl.ProcessorParsingException; | ||
import org.restcomm.chain.processor.impl.SIPMutableMessage; | ||
|
||
|
||
|
||
/** | ||
* @author [email protected] (Oscar Andres Carriles) | ||
* @date 3/5/2019 14:33:56 | ||
* @class GeoACLDPIProcessor.java | ||
* | ||
*/ | ||
public class GeoACLDPIProcessor extends DefaultDPIProcessor implements ProcessorCallBack { | ||
|
||
private String name="Geo IP ACL Processor"; | ||
private static transient Logger LOG = Logger.getLogger(GeoACLDPIProcessor.class); | ||
|
||
|
||
public GeoACLDPIProcessor(ProcessorChain processorChain) { | ||
super(processorChain); | ||
} | ||
|
||
public GeoACLDPIProcessor(String name, ProcessorChain processorChain) { | ||
super(name, processorChain); | ||
} | ||
|
||
public String getName() { | ||
return name; | ||
} | ||
|
||
public int getId() { | ||
return this.hashCode(); | ||
} | ||
|
||
public SipServletMessage doProcess(SIPMutableMessage message) throws ProcessorParsingException { | ||
if(LOG.isTraceEnabled()){ | ||
LOG.trace(">> doProcess()"); | ||
} | ||
SipServletMessage m=(SipServletMessage) message.getContent(); | ||
|
||
|
||
return m; | ||
} | ||
|
||
@Override | ||
public void setName(String name) { | ||
this.name=name; | ||
|
||
} | ||
|
||
@Override | ||
public ProcessorCallBack getCallback() { | ||
return this; | ||
} | ||
|
||
@Override | ||
public void doProcess(Message message) throws ProcessorParsingException { | ||
doProcess((SIPMutableMessage)message); | ||
} | ||
|
||
@Override | ||
public double getVersion() { | ||
return 1.0; | ||
} | ||
|
||
|
||
|
||
} |
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
Oops, something went wrong.