Skip to content
This repository was archived by the owner on Jan 18, 2025. It is now read-only.

Commit 74c0439

Browse files
committed
- fixed issue with "User Not Found" releaseCause seen in the ccxml
received from broadsoft when user is out of network area. - issue #16 closed.
1 parent f16a762 commit 74c0439

File tree

8 files changed

+399
-195
lines changed

8 files changed

+399
-195
lines changed

Charlotte - Java dialog tooling/src/com/almende/dialog/adapter/DialogAgent.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,7 @@ public HashMap<String, String> outboundCallWithMap( @Name( "addressMap" ) Map<St
141141
AdapterConfig config = AdapterConfig.findAdapterConfigFromList( adapterID, adapterType, adapterList );
142142
if ( config != null )
143143
{
144-
log.info( "Config found: " + config.getConfigId() );
144+
log.info( String.format( "Config found: %s of Type: %s", config.getConfigId(), config.getAdapterType() ) );
145145
adapterType = config.getAdapterType();
146146
if ( adapterType.toUpperCase().equals( "XMPP" ) )
147147
{

Charlotte - Java dialog tooling/src/com/almende/dialog/adapter/MailServlet.java

+1
Original file line numberDiff line numberDiff line change
@@ -207,6 +207,7 @@ protected int broadcastMessage( String message, String subject, String from, Str
207207
if(senderName!=null)
208208
{
209209
msg.setFrom( new InternetAddress( from, senderName ) );
210+
//add the senderName to the reply list if its an emailId
210211
if ( senderName.contains( "@" ) )
211212
{
212213
Address[] addresses = new InternetAddress[1];

Charlotte - Java dialog tooling/src/com/almende/dialog/adapter/TextServlet.java

+5-3
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@ abstract public class TextServlet extends HttpServlet {
3939
protected static final Logger log = Logger.getLogger(TextServlet.class.getSimpleName());
4040
protected static final int LOOP_DETECTION=10;
4141
protected static final String DEMODIALOG = "/charlotte/";
42+
protected String sessionKey = null;
4243

4344
/**
4445
* @deprecated use {@link TextServlet#broadcastMessage(String,String,String,
@@ -118,7 +119,7 @@ public Return formQuestion(Question question, String adapterID,String address) {
118119
reply = reply.substring(0, reply.length() - 1) + " ]";
119120
break; //Jump from forloop
120121
} else if (question.getType().equalsIgnoreCase("comment")) {
121-
question = question.answer(null, adapterID, null, null);//Always returns null! So no need, but maybe in future?
122+
question = question.answer(null, adapterID, null, null, null);//Always returns null! So no need, but maybe in future?
122123
} else if (question.getType().equalsIgnoreCase("referral")) {
123124
question = Question.fromURL(question.getUrl(), adapterID ,address);
124125
} else {
@@ -137,7 +138,7 @@ public String startDialog(String address, String url, AdapterConfig config) thro
137138
address = formatNumber(address);
138139
}
139140
String localaddress = config.getMyAddress();
140-
String sessionKey =getAdapterType()+"|"+localaddress+"|"+address;
141+
sessionKey =getAdapterType()+"|"+localaddress+"|"+address;
141142
Session session = Session.getSession(sessionKey, config.getKeyword());
142143
if (session == null){
143144
log.severe("XMPPServlet couldn't start new outbound Dialog, adapterConfig not found? "+sessionKey);
@@ -418,7 +419,8 @@ protected int processMessage(TextMessage msg) throws Exception
418419
question.setPreferred_language(preferred_language);
419420
// Do not answer a question, when it's the first and the type is comment or referral anyway.
420421
if(!(start && (question.getType().equalsIgnoreCase("comment") || question.getType().equalsIgnoreCase("referral")))) {
421-
question = question.answer(address, config.getConfigId(), null, escapeInput.body);
422+
question = question.answer( address, config.getConfigId(), null, escapeInput.body,
423+
Question.getRetryCount( sessionKey ) );
422424
}
423425
Return replystr = formQuestion(question, config.getConfigId(),address);
424426
escapeInput.reply = replystr.reply;

0 commit comments

Comments
 (0)