sofaswitch-svn
Threads by month
- ----- 2026 -----
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2025 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2024 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2023 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2022 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2021 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2020 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2019 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2018 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2017 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2016 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2015 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2014 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2013 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2012 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2011 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2010 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2009 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2008 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2007 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2006 -----
- December
- November
- October
- September
- August
- July
January 2007
- 1 participants
- 21 discussions
12 Jan '07
Author: derek
Date: Thu Jan 11 21:50:50 2007
New Revision: 229
Modified:
sofaswitch/trunk/callflow/src/dnd.h
sofaswitch/trunk/callflow/src/shapelist.cpp
Log:
Finish adding changes so we can send an arbitary sofa message to
any sofa entity.
Modified: sofaswitch/trunk/callflow/src/dnd.h
==============================================================================
--- sofaswitch/trunk/callflow/src/dnd.h (original)
+++ sofaswitch/trunk/callflow/src/dnd.h Thu Jan 11 21:50:50 2007
@@ -283,7 +283,7 @@
SendDtmf = 19, /*!< Send a dtmf symbol to some sofaswitch worker node */
Death = 20, /*!< End all processing of this call flow now */
SendMessage = 21, /*!< Send some message to some remote sofa entity */
- KnownShapes = 21, /*!< Indicates the number of known shapes we can manage */
+ KnownShapes = 22, /*!< Indicates the number of known shapes we can manage */
};
/**Constructor to a predefined shape */
Modified: sofaswitch/trunk/callflow/src/shapelist.cpp
==============================================================================
--- sofaswitch/trunk/callflow/src/shapelist.cpp (original)
+++ sofaswitch/trunk/callflow/src/shapelist.cpp Thu Jan 11 21:50:50 2007
@@ -324,6 +324,7 @@
file.AddLine(" self.knownNetworkMessages.append(\"REQUESTNEWID\") ");
file.AddLine(" self.knownNetworkMessages.append(\"RECEIVEDDTMF\") ");
file.AddLine(" self.knownNetworkMessages.append(\"Terminating\") ");
+ file.AddLine(" self.knownNetworkMessages.append(\"QueryAcceptIncoming\") ");
// file.AddLine(" self.knownNetworkMessages.append(\"\") ");
char c= 34;
wxString tString = wxString::Format(" self.quote = \"\\%c\"", c);
1
0
Author: derek
Date: Thu Jan 11 21:50:00 2007
New Revision: 228
Modified:
sofaswitch/trunk/am/Makefile
Log:
Change the name of the output file.
Modified: sofaswitch/trunk/am/Makefile
==============================================================================
--- sofaswitch/trunk/am/Makefile (original)
+++ sofaswitch/trunk/am/Makefile Thu Jan 11 21:50:00 2007
@@ -27,7 +27,7 @@
#
#
-PROG = ssam
+PROG = am
SOURCES := \
audio.cxx \
1
0
[Sofaswitch-svn] [commit] r227 - in sofaswitch/trunk/callflow: bitmaps src
by SofaSWITCH SVN 11 Jan '07
by SofaSWITCH SVN 11 Jan '07
11 Jan '07
Author: derek
Date: Wed Jan 10 23:27:19 2007
New Revision: 227
Added:
sofaswitch/trunk/callflow/bitmaps/SendMessage.png (contents, props changed)
sofaswitch/trunk/callflow/bitmaps/sendmessage.xpm
Modified:
sofaswitch/trunk/callflow/src/Makefile.am
sofaswitch/trunk/callflow/src/Makefile.in
sofaswitch/trunk/callflow/src/callflow.cpp
sofaswitch/trunk/callflow/src/callflow.h
sofaswitch/trunk/callflow/src/dnd.cpp
sofaswitch/trunk/callflow/src/dnd.h
sofaswitch/trunk/callflow/src/drawshape.h
Log:
Add icon, shape and code to send a raw sofa switch message.
Added: sofaswitch/trunk/callflow/bitmaps/SendMessage.png
==============================================================================
Binary file. No diff available.
Added: sofaswitch/trunk/callflow/bitmaps/sendmessage.xpm
==============================================================================
--- (empty file)
+++ sofaswitch/trunk/callflow/bitmaps/sendmessage.xpm Wed Jan 10 23:27:19 2007
@@ -0,0 +1,23 @@
+/* XPM */
+static char * sendmessage_xpm[] = {
+"16 16 4 1",
+" c None",
+". c #000000",
+"+ c #FFFFFF",
+"@ c #808080",
+" ",
+" ",
+" ",
+" ............. ",
+" .+++++++++++.@ ",
+" ..+++++++++..@ ",
+" .+.+++++++.+.@ ",
+" .++.+++++.++.@ ",
+" .++..+++..++.@ ",
+" .+.++...++.+.@ ",
+" ..+++++++++..@ ",
+" .............@ ",
+" @@@@@@@@@@@@@ ",
+" ",
+" ",
+" "};
Modified: sofaswitch/trunk/callflow/src/Makefile.am
==============================================================================
--- sofaswitch/trunk/callflow/src/Makefile.am (original)
+++ sofaswitch/trunk/callflow/src/Makefile.am Wed Jan 10 23:27:19 2007
@@ -41,6 +41,7 @@
../bitmaps/senddtmf.xpm \
../bitmaps/stoptimer.xpm \
../bitmaps/readfromfile.xpm \
+ ../bitmaps/sendmessage.xpm \
../bitmaps/writetofile.xpm \
../bitmaps/transfermedia.xpm \
callflow.cpp \
@@ -85,6 +86,8 @@
requestnode.h \
senddtmf.cpp \
senddtmf.h \
+ sendmessage.cpp \
+ sendmessage.h \
shapelist.cpp \
shapelist.h \
shapeselect.cpp \
Modified: sofaswitch/trunk/callflow/src/Makefile.in
==============================================================================
--- sofaswitch/trunk/callflow/src/Makefile.in (original)
+++ sofaswitch/trunk/callflow/src/Makefile.in Wed Jan 10 23:27:19 2007
@@ -55,9 +55,10 @@
fileio.$(OBJEXT) information.$(OBJEXT) joinblocks.$(OBJEXT) \
listpoints.$(OBJEXT) loadnewgraph.$(OBJEXT) makecall.$(OBJEXT) \
python.$(OBJEXT) readfromfile.$(OBJEXT) requestnode.$(OBJEXT) \
- senddtmf.$(OBJEXT) shapelist.$(OBJEXT) shapeselect.$(OBJEXT) \
- startfor.$(OBJEXT) starthere.$(OBJEXT) stoptimer.$(OBJEXT) \
- timer.$(OBJEXT) transfermedia.$(OBJEXT) writetofile.$(OBJEXT)
+ senddtmf.$(OBJEXT) sendmessage.$(OBJEXT) shapelist.$(OBJEXT) \
+ shapeselect.$(OBJEXT) startfor.$(OBJEXT) starthere.$(OBJEXT) \
+ stoptimer.$(OBJEXT) timer.$(OBJEXT) transfermedia.$(OBJEXT) \
+ writetofile.$(OBJEXT)
callflow_OBJECTS = $(am_callflow_OBJECTS)
am__DEPENDENCIES_1 =
callflow_DEPENDENCIES = $(am__DEPENDENCIES_1)
@@ -220,6 +221,7 @@
../bitmaps/senddtmf.xpm \
../bitmaps/stoptimer.xpm \
../bitmaps/readfromfile.xpm \
+ ../bitmaps/sendmessage.xpm \
../bitmaps/writetofile.xpm \
../bitmaps/transfermedia.xpm \
callflow.cpp \
@@ -264,6 +266,8 @@
requestnode.h \
senddtmf.cpp \
senddtmf.h \
+ sendmessage.cpp \
+ sendmessage.h \
shapelist.cpp \
shapelist.h \
shapeselect.cpp \
@@ -373,6 +377,7 @@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/readfromfile.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/requestnode.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/senddtmf.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sendmessage.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/shapelist.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/shapeselect.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/startfor.Po@am__quote@
Modified: sofaswitch/trunk/callflow/src/callflow.cpp
==============================================================================
--- sofaswitch/trunk/callflow/src/callflow.cpp (original)
+++ sofaswitch/trunk/callflow/src/callflow.cpp Wed Jan 10 23:27:19 2007
@@ -50,6 +50,7 @@
#include "bitmaps/stoptimer.xpm"
#include "bitmaps/transfermedia.xpm"
#include "bitmaps/writetofile.xpm"
+#include "bitmaps/sendmessage.xpm"
class MyFrame ;
@@ -70,36 +71,37 @@
#include "callflow.h"
BEGIN_EVENT_TABLE(MyFrame, wxFrame)
- EVT_MENU ( wxH_CONTROLSCOMPILE, MyFrame::OnCompile)
+ EVT_MENU ( wxH_CONTROLSCOMPILE, MyFrame::OnCompile)
EVT_MENU ( wxH_CONTROLSCONNECT_OBJECTS, MyFrame::OnControlsConnectObjects)
- EVT_MENU ( wxH_CONTROLSDEATH, MyFrame::OnControlsDeath)
- EVT_MENU ( wxH_CONTROLSENDCALL, MyFrame::OnControlsEndCall)
- EVT_MENU ( wxH_CONTROLSENDHERE, MyFrame::OnControlsendhere)
- EVT_MENU ( wxH_CONTROLSEND_FOR, MyFrame::OnControlsend_for)
- EVT_MENU ( wxH_CONTROLSEVENTER, MyFrame::OnControlsEventer)
- EVT_MENU ( wxH_CONTROLSFOR, MyFrame::OnControlsfor)
- EVT_MENU ( wxH_CONTROLSIF, MyFrame::OnControlsif)
- EVT_MENU ( wxH_CONTROLSLOADNEWGRAPH, MyFrame::OnControlsLoadNewGraph)
- EVT_MENU ( wxH_CONTROLSMAKECALL, MyFrame::OnControlsMakeCall)
- EVT_MENU ( wxH_CONTROLSPYTHON, MyFrame::OnControlspython)
- EVT_MENU ( wxH_CONTROLSREQUESTNODE, MyFrame::OnControlsrequestnode)
- EVT_MENU ( wxH_CONTROLSSENDDTMF, MyFrame::OnControlsSendDtmf)
- EVT_MENU ( wxH_CONTROLSSTARTHERE, MyFrame::OnControlsstarthere)
- EVT_MENU ( wxH_CONTROLSSTOPTIMER, MyFrame::OnControlsStopTimer)
- EVT_MENU ( wxH_CONTROLSTIMER, MyFrame::OnControlsTimer)
- EVT_MENU ( wxH_CONTROLSTRANSFERMEDIA, MyFrame::OnControlsTransferMedia)
- EVT_MENU ( wxH_CONTROLSREADFROMFILE, MyFrame::OnControlsReadFromFile)
- EVT_MENU ( wxH_CONTROLSWRITETOFILE, MyFrame::OnControlsWriteToFile)
- EVT_MENU ( wxH_EDITCOPY, MyFrame::OnEditCopy)
- EVT_MENU ( wxH_EDITCUT, MyFrame::OnEditCut)
- EVT_MENU ( wxH_EDITPASTE, MyFrame::OnEditPaste)
- EVT_MENU ( wxH_FILEE_XIT, MyFrame::OnFileE_xit)
- EVT_MENU ( wxH_FILENEW, MyFrame::OnFileNew)
- EVT_MENU ( wxH_FILEOPEN, MyFrame::OnFileOpen)
- EVT_MENU ( wxH_FILESAVE, MyFrame::OnFileSave)
- EVT_MENU ( wxH_FILESAVE__AS, MyFrame::OnFileSave__As)
- EVT_MENU ( wxH_HELPABOUT, MyFrame::OnHelpAbout)
- EVT_MENU ( wxH_HELPMANUAL, MyFrame::OnHelpManual)
+ EVT_MENU ( wxH_CONTROLSDEATH, MyFrame::OnControlsDeath)
+ EVT_MENU ( wxH_CONTROLSENDCALL, MyFrame::OnControlsEndCall)
+ EVT_MENU ( wxH_CONTROLSENDHERE, MyFrame::OnControlsendhere)
+ EVT_MENU ( wxH_CONTROLSEND_FOR, MyFrame::OnControlsend_for)
+ EVT_MENU ( wxH_CONTROLSEVENTER, MyFrame::OnControlsEventer)
+ EVT_MENU ( wxH_CONTROLSFOR, MyFrame::OnControlsfor)
+ EVT_MENU ( wxH_CONTROLSIF, MyFrame::OnControlsif)
+ EVT_MENU ( wxH_CONTROLSLOADNEWGRAPH, MyFrame::OnControlsLoadNewGraph)
+ EVT_MENU ( wxH_CONTROLSMAKECALL, MyFrame::OnControlsMakeCall)
+ EVT_MENU ( wxH_CONTROLSPYTHON, MyFrame::OnControlspython)
+ EVT_MENU ( wxH_CONTROLSSENDMESSAGE, MyFrame::OnControlsSendMessage)
+ EVT_MENU ( wxH_CONTROLSREQUESTNODE, MyFrame::OnControlsrequestnode)
+ EVT_MENU ( wxH_CONTROLSSENDDTMF, MyFrame::OnControlsSendDtmf)
+ EVT_MENU ( wxH_CONTROLSSTARTHERE, MyFrame::OnControlsstarthere)
+ EVT_MENU ( wxH_CONTROLSSTOPTIMER, MyFrame::OnControlsStopTimer)
+ EVT_MENU ( wxH_CONTROLSTIMER, MyFrame::OnControlsTimer)
+ EVT_MENU ( wxH_CONTROLSTRANSFERMEDIA, MyFrame::OnControlsTransferMedia)
+ EVT_MENU ( wxH_CONTROLSREADFROMFILE, MyFrame::OnControlsReadFromFile)
+ EVT_MENU ( wxH_CONTROLSWRITETOFILE, MyFrame::OnControlsWriteToFile)
+ EVT_MENU ( wxH_EDITCOPY, MyFrame::OnEditCopy)
+ EVT_MENU ( wxH_EDITCUT, MyFrame::OnEditCut)
+ EVT_MENU ( wxH_EDITPASTE, MyFrame::OnEditPaste)
+ EVT_MENU ( wxH_FILEE_XIT, MyFrame::OnFileE_xit)
+ EVT_MENU ( wxH_FILENEW, MyFrame::OnFileNew)
+ EVT_MENU ( wxH_FILEOPEN, MyFrame::OnFileOpen)
+ EVT_MENU ( wxH_FILESAVE, MyFrame::OnFileSave)
+ EVT_MENU ( wxH_FILESAVE__AS, MyFrame::OnFileSave__As)
+ EVT_MENU ( wxH_HELPABOUT, MyFrame::OnHelpAbout)
+ EVT_MENU ( wxH_HELPMANUAL, MyFrame::OnHelpManual)
EVT_CLOSE(MyFrame::OnClose)
END_EVENT_TABLE()
@@ -157,6 +159,7 @@
Controls_menu -> Append ( wxH_CONTROLSLOADNEWGRAPH, wxT("load pre-existing compiled graph"), wxT(""));
Controls_menu -> Append ( wxH_CONTROLSMAKECALL, wxT("make a call"), wxT(""));
Controls_menu -> Append ( wxH_CONTROLSPYTHON, wxT("python"), wxT(""));
+ Controls_menu -> Append ( wxH_CONTROLSSENDMESSAGE, wxT("send sofa message"), wxT(""));
Controls_menu -> Append ( wxH_CONTROLSREADFROMFILE, wxT("read audio from file"), wxT(""));
Controls_menu -> Append ( wxH_CONTROLSREQUESTNODE, wxT("request node"), wxT(""));
Controls_menu -> Append ( wxH_CONTROLSSENDDTMF, wxT("send dtmf"), wxT(""));
@@ -321,26 +324,27 @@
toolBar->AddSeparator() ;
- toolBar->AddTool(wxH_CONTROLSDEATH, wxBitmap ( death ), wxT("End all processing in this flow chart"));
- toolBar->AddTool(wxH_CONTROLSENDCALL, wxBitmap ( endcall ), wxT("End a call (send hangup)"));
- toolBar->AddTool(wxH_CONTROLSSTARTHERE, wxBitmap ( Controlsstart ), wxT("Start processing"));
- toolBar->AddTool(wxH_CONTROLSENDHERE, wxBitmap ( ControlsEndHere ), wxT("End processing"));
- toolBar->AddTool(wxH_CONTROLSREQUESTNODE, wxBitmap (RequestNode ), wxT("Query Supervisor for worker node"));
- toolBar->AddTool(wxH_CONTROLSSENDDTMF, wxBitmap (senddtmf), wxT("Send DTMF string to worker node"));
- toolBar->AddTool(wxH_CONTROLSIF, wxBitmap ( ControlsIf_xpm ), wxT("Test a condition"));
- toolBar->AddTool(wxH_CONTROLSTIMER, wxBitmap ( miniclock_xpm ), wxT("Start a timer"));
- toolBar->AddTool(wxH_CONTROLSSTOPTIMER, wxBitmap ( stoptimer ), wxT("Stop specified timer"));
- toolBar->AddTool(wxH_CONTROLSEVENTER, wxBitmap ( eventer_xpm ), wxT("Register for & Wait for an event"));
- toolBar->AddTool(wxH_CONTROLSMAKECALL, wxBitmap (makecall), wxT("Make a voip/TDM call to outside entity"));
- toolBar->AddTool(wxH_CONTROLSFOR, wxBitmap ( Controlsfor_xpm ), wxT("Start a for loop"));
- toolBar->AddTool(wxH_CONTROLSEND_FOR, wxBitmap ( Controlsend_for_xpm ), wxT("end a for loop"));
- toolBar->AddTool(wxH_CONTROLSPYTHON, wxBitmap ( Python_xpm ), wxT("arbitrary python code"));
+ toolBar->AddTool(wxH_CONTROLSDEATH, wxBitmap ( death ), wxT("End all processing in this flow chart"));
+ toolBar->AddTool(wxH_CONTROLSENDCALL, wxBitmap ( endcall ), wxT("End a call (send hangup)"));
+ toolBar->AddTool(wxH_CONTROLSSTARTHERE, wxBitmap ( Controlsstart ), wxT("Start processing"));
+ toolBar->AddTool(wxH_CONTROLSENDHERE, wxBitmap ( ControlsEndHere ), wxT("End processing"));
+ toolBar->AddTool(wxH_CONTROLSREQUESTNODE, wxBitmap (RequestNode ), wxT("Query Supervisor for worker node"));
+ toolBar->AddTool(wxH_CONTROLSSENDDTMF, wxBitmap (senddtmf), wxT("Send DTMF string to worker node"));
+ toolBar->AddTool(wxH_CONTROLSIF, wxBitmap ( ControlsIf_xpm ), wxT("Test a condition"));
+ toolBar->AddTool(wxH_CONTROLSTIMER, wxBitmap ( miniclock_xpm ), wxT("Start a timer"));
+ toolBar->AddTool(wxH_CONTROLSSTOPTIMER, wxBitmap ( stoptimer ), wxT("Stop specified timer"));
+ toolBar->AddTool(wxH_CONTROLSEVENTER, wxBitmap ( eventer_xpm ), wxT("Register for & Wait for an event"));
+ toolBar->AddTool(wxH_CONTROLSMAKECALL, wxBitmap (makecall), wxT("Make a voip/TDM call to outside entity"));
+ toolBar->AddTool(wxH_CONTROLSFOR, wxBitmap ( Controlsfor_xpm ), wxT("Start a for loop"));
+ toolBar->AddTool(wxH_CONTROLSEND_FOR, wxBitmap ( Controlsend_for_xpm ), wxT("end a for loop"));
+ toolBar->AddTool(wxH_CONTROLSPYTHON, wxBitmap ( Python_xpm ), wxT("arbitrary python code"));
+ toolBar->AddTool(wxH_CONTROLSSENDMESSAGE, wxBitmap ( sendmessage_xpm ), wxT("send arbitrary sofa message"));
toolBar->AddTool(wxH_CONTROLSCONNECT_OBJECTS, wxBitmap ( JoinObjects ),
wxT("Join objects with multi segmented lines"));
- toolBar->AddTool(wxH_CONTROLSWRITETOFILE, wxBitmap ( writetofile ), wxT("send audio to file"));
- toolBar->AddTool(wxH_CONTROLSREADFROMFILE, wxBitmap ( readfromfile ),wxT("read audio from file"));
- toolBar->AddTool(wxH_CONTROLSTRANSFERMEDIA, wxBitmap ( transfermedia ), wxT("transfer media between workers"));
- toolBar->AddTool(wxH_CONTROLSLOADNEWGRAPH, wxBitmap ( newgraph ), wxT("open existing graph file to handle new task"));
+ toolBar->AddTool(wxH_CONTROLSWRITETOFILE, wxBitmap ( writetofile ), wxT("send audio to file"));
+ toolBar->AddTool(wxH_CONTROLSREADFROMFILE, wxBitmap ( readfromfile ),wxT("read audio from file"));
+ toolBar->AddTool(wxH_CONTROLSTRANSFERMEDIA, wxBitmap ( transfermedia ), wxT("transfer media between workers"));
+ toolBar->AddTool(wxH_CONTROLSLOADNEWGRAPH, wxBitmap ( newgraph ), wxT("open existing graph file to handle new task"));
toolBar->AddSeparator() ;
toolBar->AddTool(wxH_HELPMANUAL, wxBitmap ( HelpManual_xpm ), wxT("help on using this program"));
@@ -426,6 +430,12 @@
canvas->SetEditingMode(MyCanvas::PlaceOneShape);
}
+void MyFrame::OnControlsSendMessage (wxCommandEvent & WXUNUSED(event))
+{
+ imageTypeForPlacing = DndShape::SendMessage;
+ canvas->SetEditingMode(MyCanvas::PlaceOneShape);
+}
+
void MyFrame::OnControlsDeath (wxCommandEvent & WXUNUSED(event))
{
imageTypeForPlacing = DndShape::Death;
Modified: sofaswitch/trunk/callflow/src/callflow.h
==============================================================================
--- sofaswitch/trunk/callflow/src/callflow.h (original)
+++ sofaswitch/trunk/callflow/src/callflow.h Wed Jan 10 23:27:19 2007
@@ -23,14 +23,15 @@
wxH_CONTROLSLOADNEWGRAPH,
wxH_CONTROLSMAKECALL,
wxH_CONTROLSPYTHON,
+ wxH_CONTROLSREADFROMFILE,
wxH_CONTROLSREQUESTNODE,
wxH_CONTROLSSENDDTMF,
+ wxH_CONTROLSSENDMESSAGE,
wxH_CONTROLSSTARTHERE,
wxH_CONTROLSSTOPTIMER,
wxH_CONTROLSTIMER,
- wxH_CONTROLSWRITETOFILE,
- wxH_CONTROLSREADFROMFILE,
wxH_CONTROLSTRANSFERMEDIA,
+ wxH_CONTROLSWRITETOFILE,
wxH_EDITCOPY,
wxH_EDITCUT,
wxH_EDITPASTE,
@@ -150,6 +151,11 @@
python code for processing. One such use is print statements.*/
void OnControlspython (wxCommandEvent & event);
+ /**Called in response to a user comand to add a "SendMessage" widget to
+ the current graph. This widget allows the user to send a sofa message
+ to any other sofa entity */
+ void OnControlsSendMessage (wxCommandEvent & event);
+
/**Called in response to a user comand to add a "Stop Timer" widget to the
current graph. This is used when an event has been detected before a
timer has timed out, so the timer needs to be stopped. */
Modified: sofaswitch/trunk/callflow/src/dnd.cpp
==============================================================================
--- sofaswitch/trunk/callflow/src/dnd.cpp (original)
+++ sofaswitch/trunk/callflow/src/dnd.cpp Wed Jan 10 23:27:19 2007
@@ -447,6 +447,9 @@
if (thisKind == LoadNewGraph)
return DndShapeLoadNewGraph::GetKindName();
+ if (thisKind == SendMessage)
+ return DndShapeSendMessage::GetKindName();
+
wxString answer = wxString::Format("node kind is %d", thisKind);
return answer;
}
@@ -551,6 +554,7 @@
case Timer: return new DndShapeTimer();
case TransferMedia: return new DndShapeTransferMedia();
case WriteToFile: return new DndShapeWriteToFile();
+ case SendMessage: return new DndShapeSendMessage();
default:
printf("Unknown construction of shape %d\n", shapeRequired);
}
Modified: sofaswitch/trunk/callflow/src/dnd.h
==============================================================================
--- sofaswitch/trunk/callflow/src/dnd.h (original)
+++ sofaswitch/trunk/callflow/src/dnd.h Wed Jan 10 23:27:19 2007
@@ -282,7 +282,8 @@
LoadNewGraph = 18, /*!< Read in an existing graph file (pre compiled) for a new thread of exeuction */
SendDtmf = 19, /*!< Send a dtmf symbol to some sofaswitch worker node */
Death = 20, /*!< End all processing of this call flow now */
- KnownShapes = 21 /*!< Indicates the number of known shapes we can manage */
+ SendMessage = 21, /*!< Send some message to some remote sofa entity */
+ KnownShapes = 21, /*!< Indicates the number of known shapes we can manage */
};
/**Constructor to a predefined shape */
Modified: sofaswitch/trunk/callflow/src/drawshape.h
==============================================================================
--- sofaswitch/trunk/callflow/src/drawshape.h (original)
+++ sofaswitch/trunk/callflow/src/drawshape.h Wed Jan 10 23:27:19 2007
@@ -14,6 +14,7 @@
#include "readfromfile.h"
#include "requestnode.h"
#include "senddtmf.h"
+#include "sendmessage.h"
#include "shapeselect.h"
#include "startfor.h"
#include "starthere.h"
1
0
[Sofaswitch-svn] [commit] r226 - in sofaswitch/trunk/callflow: src tests
by SofaSWITCH SVN 08 Jan '07
by SofaSWITCH SVN 08 Jan '07
08 Jan '07
Author: derek
Date: Mon Jan 8 16:54:19 2007
New Revision: 226
Modified:
sofaswitch/trunk/callflow/src/canvas.cpp
sofaswitch/trunk/callflow/src/dnd.cpp
sofaswitch/trunk/callflow/src/dnd.h
sofaswitch/trunk/callflow/src/python.cpp
sofaswitch/trunk/callflow/src/shapelist.cpp
sofaswitch/trunk/callflow/src/shapelist.h
sofaswitch/trunk/callflow/tests/makevoipcall.src
Log:
Add automatic gridding, so join lines always connect.
Increase the size of the join circle, so it is clearer when objects are joined.
Modified: sofaswitch/trunk/callflow/src/canvas.cpp
==============================================================================
--- sofaswitch/trunk/callflow/src/canvas.cpp (original)
+++ sofaswitch/trunk/callflow/src/canvas.cpp Mon Jan 8 16:54:19 2007
@@ -27,8 +27,19 @@
#include "canvas.h"
#include "callflow.h"
-BEGIN_EVENT_TABLE (MyCanvas, wxScrolledWindow) EVT_LEFT_DOWN (MyCanvas::OnLeftDown) EVT_LEFT_UP (MyCanvas::OnLeftUp) EVT_RIGHT_DOWN (MyCanvas::OnRightDown) EVT_MOTION (MyCanvas::OnMouseMove) EVT_PAINT (MyCanvas::OnPaint) EVT_ENTER_WINDOW (MyCanvas::OnMouseEnter) EVT_LEAVE_WINDOW (MyCanvas::OnMouseLeave) EVT_CHAR (MyCanvas::OnChar) EVT_TIMER (TimerId, MyCanvas::OnProgressTimer) END_EVENT_TABLE ()MyCanvas::MyCanvas (MyFrame * parent):
-wxScrolledWindow ((wxWindow *) parent, -1)
+BEGIN_EVENT_TABLE (MyCanvas, wxScrolledWindow)
+ EVT_LEFT_DOWN (MyCanvas::OnLeftDown)
+ EVT_LEFT_UP (MyCanvas::OnLeftUp)
+ EVT_RIGHT_DOWN (MyCanvas::OnRightDown)
+ EVT_MOTION (MyCanvas::OnMouseMove)
+ EVT_PAINT (MyCanvas::OnPaint)
+ EVT_ENTER_WINDOW (MyCanvas::OnMouseEnter)
+ EVT_LEAVE_WINDOW (MyCanvas::OnMouseLeave)
+ EVT_CHAR (MyCanvas::OnChar)
+ EVT_TIMER (TimerId, MyCanvas::OnProgressTimer)
+END_EVENT_TABLE ()
+
+MyCanvas::MyCanvas (MyFrame * parent):wxScrolledWindow ((wxWindow *) parent, -1)
{
pFrame = parent;
SetVirtualSize (1000, 1000); // width, height
@@ -103,10 +114,8 @@
wxPoint MyCanvas::GetUnscrolledPosition (wxMouseEvent & event)
{
- wxPoint
- pt (event.GetX (), event.GetY ());
- wxPoint
- disp;
+ wxPoint pt (event.GetX (), event.GetY ());
+ wxPoint disp;
CalcUnscrolledPosition (pt.x, pt.y, &disp.x, &disp.y);
// printf(" %d,%d ===> %d,%d\n", pt.x, pt.y, disp.x, disp.y);
return disp;
@@ -121,19 +130,17 @@
lastMousePoint = pt;
lastMouseDownPoint = pt;
- if (GetEditingMode () == PlaceJoinBlocks)
- {
- joinBlocks.AddNewPoint (pt);
- Refresh ();
- return;
+ if (GetEditingMode () == PlaceJoinBlocks) {
+ wxPoint gravityPt = activeShapes.GravityPoint(pt);
+ joinBlocks.AddNewPoint (gravityPt);
+ Refresh ();
+ return;
}
- if (GetEditingMode () == PlaceOneShape)
- {
+ if (GetEditingMode () == PlaceOneShape) {
DndShape::Kind kind = pFrame->GetImageTypeForPlacing ();
DndShape *newShape = DndShape::Construct (kind);
- if (newShape != NULL)
- {
+ if (newShape != NULL) {
pFrame->SetImageTypeForPlacing (DndShape::None);
newShape->CenterOnThisPosition (pt);
activeShapes.Append (newShape);
@@ -145,8 +152,7 @@
/* Left button down, no current "Kind" selected. we are therefore going to
* move an object from the cureent position, or mark additional buttons.. */
- if (!event.ShiftDown ())
- {
+ if (!event.ShiftDown ()) {
selectingRegion.SetSelected (false);
selectingRegion.SetPosition (lastMousePoint);
activeShapes.UnselectAllShapes ();
@@ -154,13 +160,10 @@
SetEditingMode (DownEventNew);
MyListShapes::iterator it = activeShapes.begin ();
- while (it != activeShapes.end ())
- {
+ while (it != activeShapes.end ()) {
DndShape *oneShape = it->second;
- if (oneShape != NULL)
- {
- if (oneShape->Intersects (pt))
- {
+ if (oneShape != NULL) {
+ if (oneShape->Intersects (pt)) {
oneShape->SetSelected ();
Refresh ();
return;
@@ -351,19 +354,19 @@
MyCanvas::OnRightDown (wxMouseEvent & event)
{
wxPoint pt = GetUnscrolledPosition (event);
- if (editingMode == PlaceJoinBlocks)
- {
- joinBlocks.AddNewPoint (pt);
-
- DndShape *nJoin = DndShape::Construct (DndShape::JoinBlocks);
- wxString points = joinBlocks.GetShapeInfoSpecial ();
- joinBlocks.RemoveCurrentPoints ();
- nJoin->SetShapeInfoSpecial (points);
- activeShapes.Append (nJoin);
-
- SetEditingMode (WaitDownEvent);
- Refresh ();
- return;
+ if (editingMode == PlaceJoinBlocks) {
+ wxPoint gravityPt = activeShapes.GravityPoint(pt);
+ joinBlocks.AddNewPoint (gravityPt);
+
+ DndShape *nJoin = DndShape::Construct (DndShape::JoinBlocks);
+ wxString points = joinBlocks.GetShapeInfoSpecial ();
+ joinBlocks.RemoveCurrentPoints ();
+ nJoin->SetShapeInfoSpecial (points);
+ activeShapes.Append (nJoin);
+
+ SetEditingMode (WaitDownEvent);
+ Refresh ();
+ return;
}
MyListShapes::iterator it = activeShapes.begin ();
Modified: sofaswitch/trunk/callflow/src/dnd.cpp
==============================================================================
--- sofaswitch/trunk/callflow/src/dnd.cpp (original)
+++ sofaswitch/trunk/callflow/src/dnd.cpp Mon Jan 8 16:54:19 2007
@@ -181,6 +181,17 @@
return true;
}
+
+int LabelledPoint::DistanceBetween(wxPoint & suppliedPoint)
+{
+ int deltaX = suppliedPoint.x - thisPoint.x;
+ int deltaY = suppliedPoint.y - thisPoint.y;
+
+ double ans = sqrt((deltaX*deltaX) + (deltaY * deltaY));
+
+ return (int) ans;
+}
+
/////////////////////////////////////////////////////////////////////////////
void MyListPoints::RemoveCurrentPoints()
@@ -282,6 +293,25 @@
Append(addMe);
}
+
+bool MyListPoints::GravityPoint(wxPoint & srcPoint)
+{
+ wxNode *node = (wxNode *)GetFirst();
+
+ while (node != NULL) {
+ LabelledPoint *currentPoint = (LabelledPoint *)node->GetData();
+
+ if (currentPoint->DistanceBetween(srcPoint) < 20) {
+ srcPoint = currentPoint->GetPoint();
+ return true;
+ }
+ node = node->GetNext();
+ }
+
+ return false;
+}
+
+
bool MyListPoints::AllLinked()
{
wxNode *node = (wxNode *)GetFirst();
@@ -671,7 +701,7 @@
ioPointsLinked = false;
if (style == Connected)
- dc.DrawCircle(locn, 2);
+ dc.DrawCircle(locn, 3);
}
void DndShape::DrawBox(wxDC &dc, int xOff, int yOff, int width, int height)
@@ -923,3 +953,15 @@
return answer;
}
+
+
+bool DndShape::GravityPoint(wxPoint & srcPoint)
+{
+ if (inputPoints.GravityPoint(srcPoint))
+ return true;
+
+ if (outputPoints.GravityPoint(srcPoint))
+ return true;
+
+ return false;
+}
Modified: sofaswitch/trunk/callflow/src/dnd.h
==============================================================================
--- sofaswitch/trunk/callflow/src/dnd.h (original)
+++ sofaswitch/trunk/callflow/src/dnd.h Mon Jan 8 16:54:19 2007
@@ -133,6 +133,9 @@
the list of type "MyExtendedShapes"*/
bool LinksToShape();
+ /**Report the distance from the supplied point to this point */
+ int DistanceBetween(wxPoint & supppliedPoint);
+
protected:
/** the label, describing the node who links to us, is held in this
@@ -232,6 +235,14 @@
@param index is the position in the list, and values are 0, 1, 2 ....*/
bool PointLinked(int index);
+ /**The user is endeavouring to to draw a line that connects two
+ objects. This method is used to round the "left mouse down" position to
+ the location of this objects input/output points.
+
+ If rounding is done, true is returned and the point is modified. If no
+ rounding is done, false is returned. */
+ bool GravityPoint(wxPoint & srcPoint);
+
protected:
/**the key of the owner of this list. This key is the unique Id
@@ -509,6 +520,14 @@
each point, so it is marked as unconnected. */
void AdjustIoPoints();
+ /**The user is endeavouring to to draw a line that connects two
+ objects. This method is used to round the "left mouse down" position to
+ the location of this objects input/output points.
+
+ If rounding is done, true is returned and the point is modified. If no
+ rounding is done, false is returned. */
+ bool GravityPoint(wxPoint & srcPoint);
+
protected:
/**Given a string (from the user command line) we need to turn all quotes
into \\\", so that when run in the python program, a quote will be
Modified: sofaswitch/trunk/callflow/src/python.cpp
==============================================================================
--- sofaswitch/trunk/callflow/src/python.cpp (original)
+++ sofaswitch/trunk/callflow/src/python.cpp Mon Jan 8 16:54:19 2007
@@ -24,7 +24,7 @@
SetSize(newSize);
relInputPoints.Add(16, 0);
- relOutputPoints.Add(16, 50);
+ relOutputPoints.Add(16, 60);
displayData[displayData.size()] =
InformationSection(wxT("Python Code"), wxT("self.i = 0"));
@@ -39,7 +39,7 @@
dc.SetPen(*wxBLACK_PEN);
wxPoint p1(m_rect.GetPosition());
- wxPoint pA(p1.x + 16, p1.y + 14);
+ wxPoint pA(p1.x + 16, p1.y + 12);
wxPoint pB(p1.x + 16, p1.y + 0);
wxPoint pC(p1.x + 16, p1.y + 60);
wxPoint pD(p1.x + 16, p1.y + 46);
@@ -49,7 +49,7 @@
dc.DrawLine(pA, pB);
dc.DrawLine(pD, pC);
- dc.DrawBitmap(Python_xpm, p1.x, p1.y + 14, true);
+ dc.DrawBitmap(Python_xpm, p1.x, p1.y + 16, true);
DndShape::Draw(dc);
}
Modified: sofaswitch/trunk/callflow/src/shapelist.cpp
==============================================================================
--- sofaswitch/trunk/callflow/src/shapelist.cpp (original)
+++ sofaswitch/trunk/callflow/src/shapelist.cpp Mon Jan 8 16:54:19 2007
@@ -50,6 +50,19 @@
}
}
+wxPoint MyListShapesExtended::GravityPoint(wxPoint & srcPoint)
+{
+ wxPoint activePoint = srcPoint;
+ MyListShapes::iterator it = begin();
+ while (it != end()) {
+ if (it->second->GravityPoint(activePoint))
+ return activePoint;
+ it++;
+ }
+ return activePoint;
+}
+
+
void MyListShapesExtended::RemoveCurrentShapes()
{
MyListShapes::iterator it = begin();
Modified: sofaswitch/trunk/callflow/src/shapelist.h
==============================================================================
--- sofaswitch/trunk/callflow/src/shapelist.h (original)
+++ sofaswitch/trunk/callflow/src/shapelist.h Mon Jan 8 16:54:19 2007
@@ -21,6 +21,11 @@
bool markSelected = false ///If true, mark new shapes as being selected.
);
+ /**Take the supplied point, and round it to the nearest shape input/output,
+ if such a point exists. If no nearest input/output point exists, don't
+ round it. Once finished, the resultant point is returned */
+ wxPoint GravityPoint(wxPoint & srcPoint);
+
/**Remove the shapes from this list that are marked as being selected.
It is up to the calling routine to do a refresh.*/
void RemoveSelectedShapes();
Modified: sofaswitch/trunk/callflow/tests/makevoipcall.src
==============================================================================
--- sofaswitch/trunk/callflow/tests/makevoipcall.src (original)
+++ sofaswitch/trunk/callflow/tests/makevoipcall.src Mon Jan 8 16:54:19 2007
@@ -1,4 +1,4 @@
-5<B>189<B>304<B> extra <special>Tool Tip<ms>Conditional<ms><special>Test (Python code)<ms>(self.voipNode != None) and (self.soundNode != None)<ms><special> <B><Shape>11<B>191<B>71<B> extra <special>Tool Tip<ms>Request Node<ms><special>Request node from (Python code)<ms>"voip"<ms><special>Timer period (seconds)<ms>1<ms><special>Timer label<ms>requestvoip<ms><special>Additional information (Python code)<ms><ms><special> <B><Shape>9<B>214<B>307<B>214,307,308,331<special>Tool Tip<ms>Join blocks shape<ms><special> <B><Shape>2<B>227<B>517<B> extra <special>Tool Tip<ms>End Processing<ms><special> <B><Shape>9<B>248<B>182<B>248,183,308,182<special>Tool Tip<ms>Join blocks shape<ms><special> <B><Shape>9<B>214<B>353<B>214,353,216,402<special>Tool Tip<ms>Join blocks shape<ms><special> <B><Shape>5<B>193<B>579<B> extra <special>Tool Tip<ms>Conditional<ms><special>Test (Python code)<ms>self.dtmfData=="9"<ms><special> <B><Shape>9<B>466<B>471<B>499,471,493,554,466,567<special>Tool Tip<ms>Join blocks shape<ms><special> <B><Shape>20<B>336<B>255<B> extra <special>Tool Tip<ms>Death<ms><special> <B><Shape>10<B>198<B>252<B> extra <special>Tool Tip<ms>Python<ms><special>Python Code<ms>print "Have a new voip node on ", self.voipNode<ms><special> <B><Shape>10<B>293<B>279<B> extra <special>Tool Tip<ms>Python<ms><special>Python Code<ms>print " have a sound node of ", self.soundNode<ms><special> <B><Shape>6<B>189<B>402<B> extra <special>Tool Tip<ms>Make Call<ms><special>Worker node to activate (python code)<ms>self.voipNode<ms><special>Call destination (python code)<ms>"h323:h323.voxgratia.org"<ms><special> <B><Shape>9<B>496<B>330<B>511,330,496,421<special>Tool Tip<ms>Join blocks shape<ms><special> <B><Shape>14<B>333<B>211<B> extra <special>Tool Tip<ms>Catch the timer which, when fired,
-indicates the end of this call<ms><special>Event sought (Python code)<ms><ms><special>Event sought (Regular Exp)<ms>hanguptime<ms><special>Python variable to hold event data<ms>self.hanguptime<ms><special> <B><Shape>10<B>200<B>531<B> extra <special>Tool Tip<ms>Python<ms><special>Python Code<ms>print "dtmf received of ", self.dtmfData<ms><special> <B><Shape>9<B>506<B>388<B>506,388<special>Tool Tip<ms>Join blocks shape<ms><special> <B><Shape>10<B>403<B>444<B> extra <special>Tool Tip<ms>Python<ms><special>Python Code<ms>print "End this as the voip or sound did not respond in time"<ms><special> <B><Shape>15<B>438<B>571<B> extra <special>Tool Tip<ms>Transfer Media<ms><special>First SofaSwitch worker (python)<ms>"sound"<ms><special>Second SofaSwitch worker (python)<ms>"sound"<ms><special> <B><Shape>14<B>204<B>496<B> extra <special>Tool Tip<ms>Catch DTMF events<ms><special>Event sought (Python code)<ms><ms><special>Event sought (Regular Exp)<ms>DTMF<ms><special>Python variable to hold event data<ms>self.dtmfData<ms><special> <B><Shape>9<B>218<B>518<B>218,628,463,518<special>Tool Tip<ms>Join blocks shape<ms><special> <B><Shape>9<B>418<B>359<B>421,359,418,448<special>Tool Tip<ms>Join blocks shape<ms><special> <B><Shape>13<B>284<B>231<B> extra <special>Tool Tip<ms>Stop Timer<ms><special>Timer to stop<ms>requestsound<ms><special> <B><Shape>14<B>498<B>280<B> extra <special>Tool Tip<ms>The voip node has died.<ms><special>Event sought (Python code)<ms><ms><special>Event sought (Regular Exp)<ms>voip[0-9]*Terminating<ms><special>Python variable to hold event data<ms>self.eventData<ms><special> <B><Shape>7<B>438<B>617<B> extra <special>Tool Tip<ms>End Call<ms><special>Worker node to activate (python code)<ms>self.voipNode<ms><special> <B><Shape>9<B>458<B>279<B>458,279,511,279<special>Tool Tip<ms>Join blocks shape<ms><special> <B><Shape>9<B>216<B>573<B>216,573<special>Tool Tip<ms>Join blocks shape<ms><special> <B><Shape>13<B>189<B>210<B> extra <special>Tool Tip<ms>Stop Timer<ms><special>Timer to stop<ms>requestvoip<ms><special> <B><Shape>2<B>215<B>653<B> extra <special>Tool Tip<ms>End Processing<ms><special> <B><Shape>11<B>191<B>109<B> extra <special>Tool Tip<ms>Request Node<ms><special>Request node from (Python code)<ms>"sound"<ms><special>Timer period (seconds)<ms>1<ms><special>Timer label<ms>requestsound<ms><special>Additional information (Python code)<ms><ms><special> <B><Shape>12<B>440<B>660<B> extra <special>Tool Tip<ms>Timer<ms><special>Timer period (seconds, Python code)<ms>1<ms><special>Timer label (Python code)<ms>"hanguptime"<ms><special> <B><Shape>14<B>295<B>185<B> extra <special>Tool Tip<ms>Catch the creation
-of the sound node<ms><special>Event sought (Python code)<ms><ms><special>Event sought (Regular Exp)<ms>soundREQU<ms><special>Python variable to hold event data<ms>self.soundNode<ms><special> <B><Shape>1<B>190<B>19<B> extra <special>Tool Tip<ms>Start Processing<ms><special> <B><Shape>14<B>373<B>236<B> extra <special>Tool Tip<ms>Eventer<ms><special>Event sought (Python code)<ms><ms><special>Event sought (Regular Exp)<ms>requestvoip<ms><special>Python variable to hold event data<ms>self.requestVoip<ms><special> <B><Shape>14<B>409<B>257<B> extra <special>Tool Tip<ms>Eventer<ms><special>Event sought (Python code)<ms><ms><special>Event sought (Regular Exp)<ms>requestsound<ms><special>Python variable to hold event data<ms>self.requestSound<ms><special> <B><Shape>9<B>411<B>496<B>421,496,411,560,465,571<special>Tool Tip<ms>Join blocks shape<ms><special> <B><Shape>9<B>386<B>284<B>386,284,386,313,424,314<special>Tool Tip<ms>Join blocks shape<ms><special> <B><Shape>10<B>481<B>418<B> extra <special>Tool Tip<ms>Python<ms><special>Python Code<ms>print "the voip node has died ", self.eventData<ms><special> <B><Shape>2<B>440<B>708<B> extra <special>Tool Tip<ms>End Processing<ms><special> <B><Shape>2<B>425<B>333<B> extra <special>Tool Tip<ms>End Processing<ms><special> <B><Shape>15<B>190<B>450<B> extra <special>Tool Tip<ms>Transfer Media<ms><special>First SofaSwitch worker (python)<ms>self.voipNode<ms><special>Second SofaSwitch worker (python)<ms>self.soundNode<ms><special> <B><Shape>5<B>397<B>310<B> extra <special>Tool Tip<ms>Conditional<ms><special>Test (Python code)<ms>(self.requestVoip==None) or(self.requestSound==None)<ms><special> <B><Shape>2<B>218<B>330<B> extra <special>Tool Tip<ms>End Processing<ms><special> <B><Shape>14<B>202<B>162<B> extra <special>Tool Tip<ms>Catch the creation of
-the voip node<ms><special>Event sought (Python code)<ms><ms><special>Event sought (Regular Exp)<ms>voipREQ<ms><special>Python variable to hold event data<ms>self.voipNode<ms><special> <B><Shape>19<B>216<B>606<B> extra <special>Tool Tip<ms>Send Dtmf<ms><special>Worker node to activate (python code)<ms>self.voipNode<ms><special>DTMF to send to worker node (python code)<ms>self.dtmfData<ms><special> <B><Shape>10<B>448<B>518<B> extra <special>Tool Tip<ms>Python<ms><special>Python Code<ms>print "hangup, as dtmf 9 has been received"<ms><special> <B><Shape>2<B>523<B>304<B> extra <special>Tool Tip<ms>End Processing<ms><special> <B><Shape>
+10<B>448<B>518<B> extra <special>Tool Tip<ms>Python<ms><special>Python Code<ms>print "hangup, as dtmf 9 has been received"<ms><special> <B><Shape>12<B>439<B>683<B> extra <special>Tool Tip<ms>Timer<ms><special>Timer period (seconds, Python code)<ms>1<ms><special>Timer label (Python code)<ms>"hanguptime"<ms><special> <B><Shape>2<B>438<B>731<B> extra <special>Tool Tip<ms>End Processing<ms><special> <B><Shape>2<B>215<B>653<B> extra <special>Tool Tip<ms>End Processing<ms><special> <B><Shape>2<B>425<B>333<B> extra <special>Tool Tip<ms>End Processing<ms><special> <B><Shape>9<B>386<B>284<B>386,284,386,313,424,314<special>Tool Tip<ms>Join blocks shape<ms><special> <B><Shape>9<B>248<B>182<B>248,183,308,182<special>Tool Tip<ms>Join blocks shape<ms><special> <B><Shape>10<B>403<B>444<B> extra <special>Tool Tip<ms>Python<ms><special>Python Code<ms>print "End this as the voip or sound did not respond in time"<ms><special> <B><Shape>10<B>481<B>418<B> extra <special>Tool Tip<ms>Python<ms><special>Python Code<ms>print "the voip node has died ", self.eventData<ms><special> <B><Shape>1<B>190<B>19<B> extra <special>Tool Tip<ms>Start Processing<ms><special> <B><Shape>14<B>204<B>496<B> extra <special>Tool Tip<ms>Catch DTMF events<ms><special>Event sought (Python code)<ms><ms><special>Event sought (Regular Exp)<ms>DTMF<ms><special>Python variable to hold event data<ms>self.dtmfData<ms><special> <B><Shape>11<B>191<B>71<B> extra <special>Tool Tip<ms>Request Node<ms><special>Request node from (Python code)<ms>"voip"<ms><special>Timer period (seconds)<ms>1<ms><special>Timer label<ms>requestvoip<ms><special>Additional information (Python code)<ms><ms><special> <B><Shape>10<B>200<B>531<B> extra <special>Tool Tip<ms>Python<ms><special>Python Code<ms>print "dtmf received of ", self.dtmfData<ms><special> <B><Shape>2<B>227<B>517<B> extra <special>Tool Tip<ms>End Processing<ms><special> <B><Shape>14<B>409<B>257<B> extra <special>Tool Tip<ms>Eventer<ms><special>Event sought (Python code)<ms><ms><special>Event sought (Regular Exp)<ms>requestsound<ms><special>Python variable to hold event data<ms>self.requestSound<ms><special> <B><Shape>6<B>189<B>402<B> extra <special>Tool Tip<ms>Make Call<ms><special>Worker node to activate (python code)<ms>self.voipNode<ms><special>Call destination (python code)<ms>"h323:h323.voxgratia.org"<ms><special> <B><Shape>9<B>214<B>308<B>309,335,214,308<special>Tool Tip<ms>Join blocks shape<ms><special> <B><Shape>9<B>214<B>353<B>214,353,216,402<special>Tool Tip<ms>Join blocks shape<ms><special> <B><Shape>2<B>523<B>304<B> extra <special>Tool Tip<ms>End Processing<ms><special> <B><Shape>9<B>418<B>359<B>421,359,418,448<special>Tool Tip<ms>Join blocks shape<ms><special> <B><Shape>13<B>284<B>231<B> extra <special>Tool Tip<ms>Stop Timer<ms><special>Timer to stop<ms>requestsound<ms><special> <B><Shape>2<B>218<B>330<B> extra <special>Tool Tip<ms>End Processing<ms><special> <B><Shape>19<B>216<B>606<B> extra <special>Tool Tip<ms>Send Dtmf<ms><special>Worker node to activate (python code)<ms>self.voipNode<ms><special>DTMF to send to worker node (python code)<ms>self.dtmfData<ms><special> <B><Shape>9<B>218<B>518<B>218,628,463,518<special>Tool Tip<ms>Join blocks shape<ms><special> <B><Shape>10<B>198<B>252<B> extra <special>Tool Tip<ms>Python<ms><special>Python Code<ms>print "Have a new voip node on ", self.voipNode<ms><special> <B><Shape>14<B>373<B>236<B> extra <special>Tool Tip<ms>Eventer<ms><special>Event sought (Python code)<ms><ms><special>Event sought (Regular Exp)<ms>requestvoip<ms><special>Python variable to hold event data<ms>self.requestVoip<ms><special> <B><Shape>9<B>216<B>573<B>216,573<special>Tool Tip<ms>Join blocks shape<ms><special> <B><Shape>14<B>295<B>185<B> extra <special>Tool Tip<ms>Catch the creation
+of the sound node<ms><special>Event sought (Python code)<ms><ms><special>Event sought (Regular Exp)<ms>soundREQU<ms><special>Python variable to hold event data<ms>self.soundNode<ms><special> <B><Shape>14<B>202<B>162<B> extra <special>Tool Tip<ms>Catch the creation of
+the voip node<ms><special>Event sought (Python code)<ms><ms><special>Event sought (Regular Exp)<ms>voipREQ<ms><special>Python variable to hold event data<ms>self.voipNode<ms><special> <B><Shape>13<B>189<B>210<B> extra <special>Tool Tip<ms>Stop Timer<ms><special>Timer to stop<ms>requestvoip<ms><special> <B><Shape>14<B>333<B>211<B> extra <special>Tool Tip<ms>Catch the timer which, when fired,
+indicates the end of this call<ms><special>Event sought (Python code)<ms><ms><special>Event sought (Regular Exp)<ms>hanguptime<ms><special>Python variable to hold event data<ms>self.hanguptime<ms><special> <B><Shape>15<B>190<B>450<B> extra <special>Tool Tip<ms>Transfer Media<ms><special>First SofaSwitch worker (python)<ms>self.voipNode<ms><special>Second SofaSwitch worker (python)<ms>self.soundNode<ms><special> <B><Shape>7<B>440<B>632<B> extra <special>Tool Tip<ms>End Call<ms><special>Worker node to activate (python code)<ms>self.voipNode<ms><special> <B><Shape>5<B>193<B>579<B> extra <special>Tool Tip<ms>Conditional<ms><special>Test (Python code)<ms>self.dtmfData=="9"<ms><special> <B><Shape>5<B>189<B>304<B> extra <special>Tool Tip<ms>Conditional<ms><special>Test (Python code)<ms>(self.voipNode != None) and (self.soundNode != None)<ms><special> <B><Shape>9<B>506<B>388<B>506,388<special>Tool Tip<ms>Join blocks shape<ms><special> <B><Shape>10<B>293<B>279<B> extra <special>Tool Tip<ms>Python<ms><special>Python Code<ms>print " have a sound node of ", self.soundNode<ms><special> <B><Shape>15<B>439<B>579<B> extra <special>Tool Tip<ms>Transfer Media<ms><special>First SofaSwitch worker (python)<ms>"sound"<ms><special>Second SofaSwitch worker (python)<ms>"sound"<ms><special> <B><Shape>20<B>336<B>255<B> extra <special>Tool Tip<ms>Death<ms><special> <B><Shape>9<B>458<B>279<B>458,279,511,279<special>Tool Tip<ms>Join blocks shape<ms><special> <B><Shape>9<B>497<B>330<B>511,330,497,418<special>Tool Tip<ms>Join blocks shape<ms><special> <B><Shape>14<B>498<B>280<B> extra <special>Tool Tip<ms>The voip node has died.<ms><special>Event sought (Python code)<ms><ms><special>Event sought (Regular Exp)<ms>voip[0-9]*Terminating<ms><special>Python variable to hold event data<ms>self.eventData<ms><special> <B><Shape>9<B>464<B>478<B>497,478,495,572,464,578<special>Tool Tip<ms>Join blocks shape<ms><special> <B><Shape>11<B>191<B>109<B> extra <special>Tool Tip<ms>Request Node<ms><special>Request node from (Python code)<ms>"sound"<ms><special>Timer period (seconds)<ms>1<ms><special>Timer label<ms>requestsound<ms><special>Additional information (Python code)<ms><ms><special> <B><Shape>9<B>419<B>504<B>419,504,420,570,464,578<special>Tool Tip<ms>Join blocks shape<ms><special> <B><Shape>5<B>397<B>310<B> extra <special>Tool Tip<ms>Conditional<ms><special>Test (Python code)<ms>(self.requestVoip==None) or(self.requestSound==None)<ms><special> <B><Shape>
1
0
Author: derek
Date: Mon Jan 8 15:23:24 2007
New Revision: 225
Modified:
sofaswitch/trunk/voip/mymanager.cxx
Log:
sort out spaces.
Modified: sofaswitch/trunk/voip/mymanager.cxx
==============================================================================
--- sofaswitch/trunk/voip/mymanager.cxx (original)
+++ sofaswitch/trunk/voip/mymanager.cxx Mon Jan 8 15:23:24 2007
@@ -465,7 +465,7 @@
PStringStream status;
status << call->GetPartyA() << "-" << call->GetPartyB() << endl;
- status << (PTime() - call->GetStartTime()) << "duration" << endl;
+ status << (PTime() - call->GetStartTime()) << " duration" << endl;
status << "Call token " << call->GetToken() << endl;
return status;
@@ -578,7 +578,7 @@
}
PStringStream duration;
- duration << (PTime() - call->GetStartTime()) << "duration" << endl;
+ duration << (PTime() - call->GetStartTime()) << " duration" << endl;
return duration;
}
1
0
[Sofaswitch-svn] [commit] r224 - in sofaswitch/trunk: callflow/src callflow/tests mcu voip
by SofaSWITCH SVN 08 Jan '07
by SofaSWITCH SVN 08 Jan '07
08 Jan '07
Author: derek
Date: Sun Jan 7 22:25:04 2007
New Revision: 224
Modified:
sofaswitch/trunk/callflow/src/callstartstop.cpp
sofaswitch/trunk/callflow/src/dnd.cpp
sofaswitch/trunk/callflow/src/shapelist.cpp
sofaswitch/trunk/callflow/tests/makevoipcall.src
sofaswitch/trunk/mcu/participant.cxx
sofaswitch/trunk/voip/jocall.h
sofaswitch/trunk/voip/mymanager.cxx
Log:
Various reliability fixes.
Better reporting in the voip module, better exceptions in python to cope
will callflow errors.
Modified: sofaswitch/trunk/callflow/src/callstartstop.cpp
==============================================================================
--- sofaswitch/trunk/callflow/src/callstartstop.cpp (original)
+++ sofaswitch/trunk/callflow/src/callstartstop.cpp Sun Jan 7 22:25:04 2007
@@ -46,7 +46,7 @@
file.AddLine(" self.rhost = eval(self.data[a][\"worker node\"]) ");
file.AddLine(" except: ");
file.AddLine(" print \"The worker node string \", self.data[a][\"worker node\"], \" could not be evaluated as a python string\" ");
- file.AddLine(" self.rhost = None ");
+ file.AddLine(" self.rhost = \"\" ");
if (kind == MakeCall) {
file.AddLine(" try: ");
file.AddLine(" self.dest = eval(self.data[a][\"call destination\"]) ");
Modified: sofaswitch/trunk/callflow/src/dnd.cpp
==============================================================================
--- sofaswitch/trunk/callflow/src/dnd.cpp (original)
+++ sofaswitch/trunk/callflow/src/dnd.cpp Sun Jan 7 22:25:04 2007
@@ -564,11 +564,6 @@
bool DndShape::Intersects(const wxPoint & testPoint) const
{
-#if 0
- printf("Intersecst %d %d with %d %d __ %d %d\n",
- testPoint.x, testPoint.y,
- m_rect.x, m_rect.y, m_rect.GetWidth(), m_rect.GetHeight());
- #endif
return m_rect.Inside(testPoint);
}
@@ -579,12 +574,7 @@
bool DndShape::Intersects(const wxRect & testR) const
{
-#if 0
- printf("Test is %d,%d by %d %d Shape is %d %d by %d %d\n",
- testR.x, testR.y, testR.GetWidth(), testR.GetHeight(),
- m_rect.x, m_rect.y, m_rect.GetWidth(), m_rect.GetHeight());
-#endif
- if ((testR.y + testR.GetHeight() - 1) < m_rect.y) { //test region above this shape
+ if ((testR.y + testR.GetHeight() - 1) < m_rect.y) { //test region above this shape
return false;
}
Modified: sofaswitch/trunk/callflow/src/shapelist.cpp
==============================================================================
--- sofaswitch/trunk/callflow/src/shapelist.cpp (original)
+++ sofaswitch/trunk/callflow/src/shapelist.cpp Sun Jan 7 22:25:04 2007
@@ -457,7 +457,10 @@
file.AddLine(" while self.keepGoing: ");
file.AddLine(" self.currentNode=a ");
file.AddLine(" command = \"self.\" + str(c) + \"(\" + str(sTuple) + \")\"");
- file.AddLine(" sTuple = eval(command) ");
+ file.AddLine(" try: ");
+ file.AddLine(" sTuple = eval(command) ");
+ file.AddLine(" except: ");
+ file.AddLine(" sTuple = None ");
file.AddLine(" if sTuple == None: ");
file.AddLine(" self.keepGoing = False ");
file.AddLine(" else: ");
Modified: sofaswitch/trunk/callflow/tests/makevoipcall.src
==============================================================================
--- sofaswitch/trunk/callflow/tests/makevoipcall.src (original)
+++ sofaswitch/trunk/callflow/tests/makevoipcall.src Sun Jan 7 22:25:04 2007
@@ -1,4 +1,4 @@
-9<B>216<B>573<B>216,573<special>Tool Tip<ms>Join blocks shape<ms><special> <B><Shape>6<B>189<B>402<B> extra <special>Tool Tip<ms>Make Call<ms><special>Worker node to activate (python code)<ms>self.voipNode<ms><special>Call destination (python code)<ms>"h323:h323.voxgratia.org"<ms><special> <B><Shape>1<B>190<B>19<B> extra <special>Tool Tip<ms>Start Processing<ms><special> <B><Shape>7<B>42<B>303<B> extra <special>Tool Tip<ms>End Call<ms><special>Worker node to activate (python code)<ms>self.voipNode<ms><special> <B><Shape>14<B>373<B>236<B> extra <special>Tool Tip<ms>Eventer<ms><special>Event sought (Python code)<ms><ms><special>Event sought (Regular Exp)<ms>requestvoip<ms><special>Python variable to hold event data<ms>self.requestVoip<ms><special> <B><Shape>14<B>409<B>257<B> extra <special>Tool Tip<ms>Eventer<ms><special>Event sought (Python code)<ms><ms><special>Event sought (Regular Exp)<ms>requestsound<ms><special>Python variable to hold event data<ms>self.requestSound<ms><special> <B><Shape>5<B>397<B>310<B> extra <special>Tool Tip<ms>Conditional<ms><special>Test (Python code)<ms>(self.requestVoip==None) or(self.requestSound==None)<ms><special> <B><Shape>2<B>44<B>394<B> extra <special>Tool Tip<ms>End Processing<ms><special> <B><Shape>9<B>214<B>307<B>214,307,308,331<special>Tool Tip<ms>Join blocks shape<ms><special> <B><Shape>13<B>284<B>231<B> extra <special>Tool Tip<ms>Stop Timer<ms><special>Timer to stop<ms>requestsound<ms><special> <B><Shape>2<B>227<B>517<B> extra <special>Tool Tip<ms>End Processing<ms><special> <B><Shape>9<B>506<B>388<B>506,388<special>Tool Tip<ms>Join blocks shape<ms><special> <B><Shape>2<B>218<B>330<B> extra <special>Tool Tip<ms>End Processing<ms><special> <B><Shape>2<B>215<B>653<B> extra <special>Tool Tip<ms>End Processing<ms><special> <B><Shape>19<B>216<B>606<B> extra <special>Tool Tip<ms>Send Dtmf<ms><special>Worker node to activate (python code)<ms>self.voipNode<ms><special>DTMF to send to worker node (python code)<ms>self.dtmfData<ms><special> <B><Shape>11<B>191<B>71<B> extra <special>Tool Tip<ms>Request Node<ms><special>Request node from (Python code)<ms>"voip"<ms><special>Timer period (seconds)<ms>1<ms><special>Timer label<ms>requestvoip<ms><special>Additional information (Python code)<ms><ms><special> <B><Shape>10<B>293<B>279<B> extra <special>Tool Tip<ms>Python<ms><special>Python Code<ms>print " have a sound node of ", self.soundNode<ms><special> <B><Shape>13<B>189<B>210<B> extra <special>Tool Tip<ms>Stop Timer<ms><special>Timer to stop<ms>requestvoip<ms><special> <B><Shape>9<B>65<B>199<B>218,629,124,630,119,203,65,199,69,215<special>Tool Tip<ms>Join blocks shape<ms><special> <B><Shape>9<B>418<B>359<B>421,359,418,448<special>Tool Tip<ms>Join blocks shape<ms><special> <B><Shape>15<B>42<B>257<B> extra <special>Tool Tip<ms>Transfer Media<ms><special>First SofaSwitch worker (python)<ms>"sound"<ms><special>Second SofaSwitch worker (python)<ms>"sound"<ms><special> <B><Shape>12<B>44<B>346<B> extra <special>Tool Tip<ms>Timer<ms><special>Timer period (seconds, Python code)<ms>1<ms><special>Timer label (Python code)<ms>"hanguptime"<ms><special> <B><Shape>15<B>190<B>450<B> extra <special>Tool Tip<ms>Transfer Media<ms><special>First SofaSwitch worker (python)<ms>self.voipNode<ms><special>Second SofaSwitch worker (python)<ms>self.soundNode<ms><special> <B><Shape>10<B>403<B>444<B> extra <special>Tool Tip<ms>Python<ms><special>Python Code<ms>print "End this as the voip or sound did not respond in time"<ms><special> <B><Shape>20<B>336<B>255<B> extra <special>Tool Tip<ms>Death<ms><special> <B><Shape>14<B>202<B>162<B> extra <special>Tool Tip<ms>Catch the creation of
-the voip node<ms><special>Event sought (Python code)<ms><ms><special>Event sought (Regular Exp)<ms>voipREQ<ms><special>Python variable to hold event data<ms>self.voipNode<ms><special> <B><Shape>9<B>386<B>284<B>386,284,386,313,424,314<special>Tool Tip<ms>Join blocks shape<ms><special> <B><Shape>9<B>248<B>182<B>248,183,308,182<special>Tool Tip<ms>Join blocks shape<ms><special> <B><Shape>2<B>435<B>276<B> extra <special>Tool Tip<ms>End Processing<ms><special> <B><Shape>10<B>198<B>252<B> extra <special>Tool Tip<ms>Python<ms><special>Python Code<ms>print "Have a new voip node on ", self.voipNode<ms><special> <B><Shape>10<B>50<B>213<B> extra <special>Tool Tip<ms>Python<ms><special>Python Code<ms>print "hangup, as dtmf 9 has been received"<ms><special> <B><Shape>14<B>204<B>496<B> extra <special>Tool Tip<ms>Catch DTMF events<ms><special>Event sought (Python code)<ms><ms><special>Event sought (Regular Exp)<ms>DTMF<ms><special>Python variable to hold event data<ms>self.dtmfData<ms><special> <B><Shape>11<B>191<B>109<B> extra <special>Tool Tip<ms>Request Node<ms><special>Request node from (Python code)<ms>"sound"<ms><special>Timer period (seconds)<ms>1<ms><special>Timer label<ms>requestsound<ms><special>Additional information (Python code)<ms><ms><special> <B><Shape>5<B>189<B>304<B> extra <special>Tool Tip<ms>Conditional<ms><special>Test (Python code)<ms>(self.voipNode != None) and (self.soundNode != None)<ms><special> <B><Shape>9<B>214<B>353<B>214,353,216,402<special>Tool Tip<ms>Join blocks shape<ms><special> <B><Shape>9<B>7<B>260<B>418,498,391,731,7,726,18,260,66,260<special>Tool Tip<ms>Join blocks shape<ms><special> <B><Shape>14<B>333<B>211<B> extra <special>Tool Tip<ms>Catch the timer which, when fired,
-indicates the end of this call<ms><special>Event sought (Python code)<ms><ms><special>Event sought (Regular Exp)<ms>hanguptime<ms><special>Python variable to hold event data<ms>self.hanguptime<ms><special> <B><Shape>5<B>193<B>579<B> extra <special>Tool Tip<ms>Conditional<ms><special>Test (Python code)<ms>self.dtmfData=="9"<ms><special> <B><Shape>10<B>200<B>531<B> extra <special>Tool Tip<ms>Python<ms><special>Python Code<ms>print "dtmf received of ", self.dtmfData<ms><special> <B><Shape>2<B>425<B>333<B> extra <special>Tool Tip<ms>End Processing<ms><special> <B><Shape>14<B>295<B>185<B> extra <special>Tool Tip<ms>Catch the creation
-of the sound node<ms><special>Event sought (Python code)<ms><ms><special>Event sought (Regular Exp)<ms>soundREQU<ms><special>Python variable to hold event data<ms>self.soundNode<ms><special> <B><Shape>
+5<B>189<B>304<B> extra <special>Tool Tip<ms>Conditional<ms><special>Test (Python code)<ms>(self.voipNode != None) and (self.soundNode != None)<ms><special> <B><Shape>11<B>191<B>71<B> extra <special>Tool Tip<ms>Request Node<ms><special>Request node from (Python code)<ms>"voip"<ms><special>Timer period (seconds)<ms>1<ms><special>Timer label<ms>requestvoip<ms><special>Additional information (Python code)<ms><ms><special> <B><Shape>9<B>214<B>307<B>214,307,308,331<special>Tool Tip<ms>Join blocks shape<ms><special> <B><Shape>2<B>227<B>517<B> extra <special>Tool Tip<ms>End Processing<ms><special> <B><Shape>9<B>248<B>182<B>248,183,308,182<special>Tool Tip<ms>Join blocks shape<ms><special> <B><Shape>9<B>214<B>353<B>214,353,216,402<special>Tool Tip<ms>Join blocks shape<ms><special> <B><Shape>5<B>193<B>579<B> extra <special>Tool Tip<ms>Conditional<ms><special>Test (Python code)<ms>self.dtmfData=="9"<ms><special> <B><Shape>9<B>466<B>471<B>499,471,493,554,466,567<special>Tool Tip<ms>Join blocks shape<ms><special> <B><Shape>20<B>336<B>255<B> extra <special>Tool Tip<ms>Death<ms><special> <B><Shape>10<B>198<B>252<B> extra <special>Tool Tip<ms>Python<ms><special>Python Code<ms>print "Have a new voip node on ", self.voipNode<ms><special> <B><Shape>10<B>293<B>279<B> extra <special>Tool Tip<ms>Python<ms><special>Python Code<ms>print " have a sound node of ", self.soundNode<ms><special> <B><Shape>6<B>189<B>402<B> extra <special>Tool Tip<ms>Make Call<ms><special>Worker node to activate (python code)<ms>self.voipNode<ms><special>Call destination (python code)<ms>"h323:h323.voxgratia.org"<ms><special> <B><Shape>9<B>496<B>330<B>511,330,496,421<special>Tool Tip<ms>Join blocks shape<ms><special> <B><Shape>14<B>333<B>211<B> extra <special>Tool Tip<ms>Catch the timer which, when fired,
+indicates the end of this call<ms><special>Event sought (Python code)<ms><ms><special>Event sought (Regular Exp)<ms>hanguptime<ms><special>Python variable to hold event data<ms>self.hanguptime<ms><special> <B><Shape>10<B>200<B>531<B> extra <special>Tool Tip<ms>Python<ms><special>Python Code<ms>print "dtmf received of ", self.dtmfData<ms><special> <B><Shape>9<B>506<B>388<B>506,388<special>Tool Tip<ms>Join blocks shape<ms><special> <B><Shape>10<B>403<B>444<B> extra <special>Tool Tip<ms>Python<ms><special>Python Code<ms>print "End this as the voip or sound did not respond in time"<ms><special> <B><Shape>15<B>438<B>571<B> extra <special>Tool Tip<ms>Transfer Media<ms><special>First SofaSwitch worker (python)<ms>"sound"<ms><special>Second SofaSwitch worker (python)<ms>"sound"<ms><special> <B><Shape>14<B>204<B>496<B> extra <special>Tool Tip<ms>Catch DTMF events<ms><special>Event sought (Python code)<ms><ms><special>Event sought (Regular Exp)<ms>DTMF<ms><special>Python variable to hold event data<ms>self.dtmfData<ms><special> <B><Shape>9<B>218<B>518<B>218,628,463,518<special>Tool Tip<ms>Join blocks shape<ms><special> <B><Shape>9<B>418<B>359<B>421,359,418,448<special>Tool Tip<ms>Join blocks shape<ms><special> <B><Shape>13<B>284<B>231<B> extra <special>Tool Tip<ms>Stop Timer<ms><special>Timer to stop<ms>requestsound<ms><special> <B><Shape>14<B>498<B>280<B> extra <special>Tool Tip<ms>The voip node has died.<ms><special>Event sought (Python code)<ms><ms><special>Event sought (Regular Exp)<ms>voip[0-9]*Terminating<ms><special>Python variable to hold event data<ms>self.eventData<ms><special> <B><Shape>7<B>438<B>617<B> extra <special>Tool Tip<ms>End Call<ms><special>Worker node to activate (python code)<ms>self.voipNode<ms><special> <B><Shape>9<B>458<B>279<B>458,279,511,279<special>Tool Tip<ms>Join blocks shape<ms><special> <B><Shape>9<B>216<B>573<B>216,573<special>Tool Tip<ms>Join blocks shape<ms><special> <B><Shape>13<B>189<B>210<B> extra <special>Tool Tip<ms>Stop Timer<ms><special>Timer to stop<ms>requestvoip<ms><special> <B><Shape>2<B>215<B>653<B> extra <special>Tool Tip<ms>End Processing<ms><special> <B><Shape>11<B>191<B>109<B> extra <special>Tool Tip<ms>Request Node<ms><special>Request node from (Python code)<ms>"sound"<ms><special>Timer period (seconds)<ms>1<ms><special>Timer label<ms>requestsound<ms><special>Additional information (Python code)<ms><ms><special> <B><Shape>12<B>440<B>660<B> extra <special>Tool Tip<ms>Timer<ms><special>Timer period (seconds, Python code)<ms>1<ms><special>Timer label (Python code)<ms>"hanguptime"<ms><special> <B><Shape>14<B>295<B>185<B> extra <special>Tool Tip<ms>Catch the creation
+of the sound node<ms><special>Event sought (Python code)<ms><ms><special>Event sought (Regular Exp)<ms>soundREQU<ms><special>Python variable to hold event data<ms>self.soundNode<ms><special> <B><Shape>1<B>190<B>19<B> extra <special>Tool Tip<ms>Start Processing<ms><special> <B><Shape>14<B>373<B>236<B> extra <special>Tool Tip<ms>Eventer<ms><special>Event sought (Python code)<ms><ms><special>Event sought (Regular Exp)<ms>requestvoip<ms><special>Python variable to hold event data<ms>self.requestVoip<ms><special> <B><Shape>14<B>409<B>257<B> extra <special>Tool Tip<ms>Eventer<ms><special>Event sought (Python code)<ms><ms><special>Event sought (Regular Exp)<ms>requestsound<ms><special>Python variable to hold event data<ms>self.requestSound<ms><special> <B><Shape>9<B>411<B>496<B>421,496,411,560,465,571<special>Tool Tip<ms>Join blocks shape<ms><special> <B><Shape>9<B>386<B>284<B>386,284,386,313,424,314<special>Tool Tip<ms>Join blocks shape<ms><special> <B><Shape>10<B>481<B>418<B> extra <special>Tool Tip<ms>Python<ms><special>Python Code<ms>print "the voip node has died ", self.eventData<ms><special> <B><Shape>2<B>440<B>708<B> extra <special>Tool Tip<ms>End Processing<ms><special> <B><Shape>2<B>425<B>333<B> extra <special>Tool Tip<ms>End Processing<ms><special> <B><Shape>15<B>190<B>450<B> extra <special>Tool Tip<ms>Transfer Media<ms><special>First SofaSwitch worker (python)<ms>self.voipNode<ms><special>Second SofaSwitch worker (python)<ms>self.soundNode<ms><special> <B><Shape>5<B>397<B>310<B> extra <special>Tool Tip<ms>Conditional<ms><special>Test (Python code)<ms>(self.requestVoip==None) or(self.requestSound==None)<ms><special> <B><Shape>2<B>218<B>330<B> extra <special>Tool Tip<ms>End Processing<ms><special> <B><Shape>14<B>202<B>162<B> extra <special>Tool Tip<ms>Catch the creation of
+the voip node<ms><special>Event sought (Python code)<ms><ms><special>Event sought (Regular Exp)<ms>voipREQ<ms><special>Python variable to hold event data<ms>self.voipNode<ms><special> <B><Shape>19<B>216<B>606<B> extra <special>Tool Tip<ms>Send Dtmf<ms><special>Worker node to activate (python code)<ms>self.voipNode<ms><special>DTMF to send to worker node (python code)<ms>self.dtmfData<ms><special> <B><Shape>10<B>448<B>518<B> extra <special>Tool Tip<ms>Python<ms><special>Python Code<ms>print "hangup, as dtmf 9 has been received"<ms><special> <B><Shape>2<B>523<B>304<B> extra <special>Tool Tip<ms>End Processing<ms><special> <B><Shape>
Modified: sofaswitch/trunk/mcu/participant.cxx
==============================================================================
--- sofaswitch/trunk/mcu/participant.cxx (original)
+++ sofaswitch/trunk/mcu/participant.cxx Sun Jan 7 22:25:04 2007
@@ -143,7 +143,7 @@
/////////////////////////////////////////////////////////////////////////////
ParticipantDict::ParticipantDict()
{
- countEntries = 0;
+ countEntries.SetValue(0);
SetAutoDeleteObjects();
shuttingDown = FALSE;
Modified: sofaswitch/trunk/voip/jocall.h
==============================================================================
--- sofaswitch/trunk/voip/jocall.h (original)
+++ sofaswitch/trunk/voip/jocall.h Sun Jan 7 22:25:04 2007
@@ -131,6 +131,8 @@
/**Get a pointer to the PUDPSocket used by this particular call for audio datas */
PUDPSocket & GetAudioSocket();
+ /**Report the ID (as used by sofaswitch) of this comms instance. */
+ PString GetOurId() { return comms.GetOurId(); }
protected:
Modified: sofaswitch/trunk/voip/mymanager.cxx
==============================================================================
--- sofaswitch/trunk/voip/mymanager.cxx (original)
+++ sofaswitch/trunk/voip/mymanager.cxx Sun Jan 7 22:25:04 2007
@@ -520,15 +520,15 @@
}
PSortedStringList currentNames;
- for (PSafePtr<OpalCall> call = activeCalls; call != NULL; ++call)
- currentNames.AppendString(call->GetToken());
+ for (PSafePtr<OpalCall>call = activeCalls; call != NULL; ++call)
+ currentNames.AppendString((PSafePtrCast<OpalCall, MyOpalCall>(call))->GetOurId());
if (currentNames.GetSize() > 0) {
status << "Current active calls " << endl;
for (PINDEX i = 0; i < currentNames.GetSize(); i++)
- status << " " << prebuilts[i] << endl;
+ status << " " << currentNames[i] << endl;
status << endl;
- }
+ }
if (deadNames.GetSize() > 0) {
status << "Calls that are being cleaned up " << endl;
1
0
Author: derek
Date: Sun Jan 7 20:24:44 2007
New Revision: 223
Modified:
sofaswitch/trunk/voip/comms.cxx
sofaswitch/trunk/voip/comms.h
sofaswitch/trunk/voip/counts.cxx
sofaswitch/trunk/voip/counts.h
sofaswitch/trunk/voip/jocall.cxx
sofaswitch/trunk/voip/jocall.h
sofaswitch/trunk/voip/main.cxx
sofaswitch/trunk/voip/main.h
sofaswitch/trunk/voip/mymanager.cxx
sofaswitch/trunk/voip/mymanager.h
sofaswitch/trunk/voip/supervisor.cxx
sofaswitch/trunk/voip/supervisor.h
sofaswitch/trunk/voip/udpconnection.cxx
sofaswitch/trunk/voip/udpconnection.h
sofaswitch/trunk/voip/udpep.cxx
sofaswitch/trunk/voip/udpep.h
sofaswitch/trunk/voip/udpsound.cxx
sofaswitch/trunk/voip/udpsound.h
sofaswitch/trunk/voip/version.h
Log:
Rework comment level slightly. Add auto emacs space setting code.
Modified: sofaswitch/trunk/voip/comms.cxx
==============================================================================
--- sofaswitch/trunk/voip/comms.cxx (original)
+++ sofaswitch/trunk/voip/comms.cxx Sun Jan 7 20:24:44 2007
@@ -319,5 +319,16 @@
PThread::Sleep(400);
}
}
+/* The comment below is magic for those who use emacs to edit this file. */
+/* With the comment below, the tab key does auto indent to 2 spaces. */
+
+/*
+ * Local Variables:
+ * mode:c
+ * c-file-style:linux
+ * c-basic-offset:2
+ * End:
+ */
+
/////////////////////////////////////////////////////////////////////////////
Modified: sofaswitch/trunk/voip/comms.h
==============================================================================
--- sofaswitch/trunk/voip/comms.h (original)
+++ sofaswitch/trunk/voip/comms.h Sun Jan 7 20:24:44 2007
@@ -226,5 +226,16 @@
#endif // _COMMS_H
+/* The comment below is magic for those who use emacs to edit this file. */
+/* With the comment below, the tab key does auto indent to 2 spaces. */
+
+/*
+ * Local Variables:
+ * mode:c
+ * c-file-style:linux
+ * c-basic-offset:2
+ * End:
+ */
+
// End of File ///////////////////////////////////////////////////////////////
Modified: sofaswitch/trunk/voip/counts.cxx
==============================================================================
--- sofaswitch/trunk/voip/counts.cxx (original)
+++ sofaswitch/trunk/voip/counts.cxx Sun Jan 7 20:24:44 2007
@@ -139,4 +139,15 @@
+/* The comment below is magic for those who use emacs to edit this file. */
+/* With the comment below, the tab key does auto indent to 2 spaces. */
+
+/*
+ * Local Variables:
+ * mode:c
+ * c-file-style:linux
+ * c-basic-offset:2
+ * End:
+ */
+
/////////////////////////////////////////////////////////////////////////////
Modified: sofaswitch/trunk/voip/counts.h
==============================================================================
--- sofaswitch/trunk/voip/counts.h (original)
+++ sofaswitch/trunk/voip/counts.h Sun Jan 7 20:24:44 2007
@@ -75,4 +75,15 @@
#endif // _COUNTS_H
+/* The comment below is magic for those who use emacs to edit this file. */
+/* With the comment below, the tab key does auto indent to 2 spaces. */
+
+/*
+ * Local Variables:
+ * mode:c
+ * c-file-style:linux
+ * c-basic-offset:2
+ * End:
+ */
+
// End of File ///////////////////////////////////////////////////////////////
Modified: sofaswitch/trunk/voip/jocall.cxx
==============================================================================
--- sofaswitch/trunk/voip/jocall.cxx (original)
+++ sofaswitch/trunk/voip/jocall.cxx Sun Jan 7 20:24:44 2007
@@ -220,4 +220,15 @@
return duration;
}
+/* The comment below is magic for those who use emacs to edit this file. */
+/* With the comment below, the tab key does auto indent to 2 spaces. */
+
+/*
+ * Local Variables:
+ * mode:c
+ * c-file-style:linux
+ * c-basic-offset:2
+ * End:
+ */
+
/////////////////////////////////////////////////////////////////////////////
Modified: sofaswitch/trunk/voip/jocall.h
==============================================================================
--- sofaswitch/trunk/voip/jocall.h (original)
+++ sofaswitch/trunk/voip/jocall.h Sun Jan 7 20:24:44 2007
@@ -157,6 +157,17 @@
+/* The comment below is magic for those who use emacs to edit this file. */
+/* With the comment below, the tab key does auto indent to 2 spaces. */
+
+/*
+ * Local Variables:
+ * mode:c
+ * c-file-style:linux
+ * c-basic-offset:2
+ * End:
+ */
+
#endif // _JOCALL_H
Modified: sofaswitch/trunk/voip/main.cxx
==============================================================================
--- sofaswitch/trunk/voip/main.cxx (original)
+++ sofaswitch/trunk/voip/main.cxx Sun Jan 7 20:24:44 2007
@@ -301,4 +301,15 @@
+/* The comment below is magic for those who use emacs to edit this file. */
+/* With the comment below, the tab key does auto indent to 2 spaces. */
+
+/*
+ * Local Variables:
+ * mode:c
+ * c-file-style:linux
+ * c-basic-offset:2
+ * End:
+ */
+
// End of File ///////////////////////////////////////////////////////////////
Modified: sofaswitch/trunk/voip/main.h
==============================================================================
--- sofaswitch/trunk/voip/main.h (original)
+++ sofaswitch/trunk/voip/main.h Sun Jan 7 20:24:44 2007
@@ -74,4 +74,15 @@
#endif // _Voip_MAIN_H
+/* The comment below is magic for those who use emacs to edit this file. */
+/* With the comment below, the tab key does auto indent to 2 spaces. */
+
+/*
+ * Local Variables:
+ * mode:c
+ * c-file-style:linux
+ * c-basic-offset:2
+ * End:
+ */
+
// End of File ///////////////////////////////////////////////////////////////
Modified: sofaswitch/trunk/voip/mymanager.cxx
==============================================================================
--- sofaswitch/trunk/voip/mymanager.cxx (original)
+++ sofaswitch/trunk/voip/mymanager.cxx Sun Jan 7 20:24:44 2007
@@ -595,15 +595,17 @@
BOOL MyManager::SendThisDtmf(const PString & token, const PString & thisDtmf)
{
+ PTRACE(3, "MyManager\tSend this dtmf " << thisDtmf << " to call " << token);
OpalCall *oCall = FindCallWithLock(token);
if (oCall == NULL) {
+ PTRACE(3, "MyManager\tSend this dtmf " << thisDtmf << " to call " << token << " FAILED - call not found");
return FALSE;
}
-
+
MyOpalCall *call;
call = PSafePtrCast<OpalCall, MyOpalCall>(oCall);
call->SendThisDtmf(thisDtmf);
-
+ PTRACE(3, "MyManager\tSend this dtmf " << thisDtmf << " to call " << token << " sent ok");
return TRUE;
}
@@ -918,6 +920,17 @@
OpalManager::OnAlerting(connection);
}
+/* The comment below is magic for those who use emacs to edit this file. */
+/* With the comment below, the tab key does auto indent to 2 spaces. */
+
+/*
+ * Local Variables:
+ * mode:c
+ * c-file-style:linux
+ * c-basic-offset:2
+ * End:
+ */
+
// End of File ///////////////////////////////////////////////////////////////
Modified: sofaswitch/trunk/voip/mymanager.h
==============================================================================
--- sofaswitch/trunk/voip/mymanager.h (original)
+++ sofaswitch/trunk/voip/mymanager.h Sun Jan 7 20:24:44 2007
@@ -272,5 +272,16 @@
#endif // _Voip_MANAGER_H
+/* The comment below is magic for those who use emacs to edit this file. */
+/* With the comment below, the tab key does auto indent to 2 spaces. */
+
+/*
+ * Local Variables:
+ * mode:c
+ * c-file-style:linux
+ * c-basic-offset:2
+ * End:
+ */
+
// End of File ///////////////////////////////////////////////////////////////
Modified: sofaswitch/trunk/voip/supervisor.cxx
==============================================================================
--- sofaswitch/trunk/voip/supervisor.cxx (original)
+++ sofaswitch/trunk/voip/supervisor.cxx Sun Jan 7 20:24:44 2007
@@ -124,4 +124,15 @@
VoipProcess::Current().GetManager()->RequestNewId(sender);
}
+/* The comment below is magic for those who use emacs to edit this file. */
+/* With the comment below, the tab key does auto indent to 2 spaces. */
+
+/*
+ * Local Variables:
+ * mode:c
+ * c-file-style:linux
+ * c-basic-offset:2
+ * End:
+ */
+
// End of File ///////////////////////////////////////////////////////////////
Modified: sofaswitch/trunk/voip/supervisor.h
==============================================================================
--- sofaswitch/trunk/voip/supervisor.h (original)
+++ sofaswitch/trunk/voip/supervisor.h Sun Jan 7 20:24:44 2007
@@ -110,5 +110,16 @@
#endif // _SUPERVISOR_H
+/* The comment below is magic for those who use emacs to edit this file. */
+/* With the comment below, the tab key does auto indent to 2 spaces. */
+
+/*
+ * Local Variables:
+ * mode:c
+ * c-file-style:linux
+ * c-basic-offset:2
+ * End:
+ */
+
// End of File ///////////////////////////////////////////////////////////////
Modified: sofaswitch/trunk/voip/udpconnection.cxx
==============================================================================
--- sofaswitch/trunk/voip/udpconnection.cxx (original)
+++ sofaswitch/trunk/voip/udpconnection.cxx Sun Jan 7 20:24:44 2007
@@ -215,7 +215,7 @@
BOOL OpalUdpSsConnection::SendUserInputString(const PString & value)
{
- PTRACE(3, "UdpSs\tSendUserInputString(" << value << ") drives nowhere");
+ PTRACE(5, "UdpSs\tSendUserInputString(" << value << ") drives nowhere");
return TRUE;
}
@@ -268,4 +268,15 @@
}
+/* The comment below is magic for those who use emacs to edit this file. */
+/* With the comment below, the tab key does auto indent to 2 spaces. */
+
+/*
+ * Local Variables:
+ * mode:c
+ * c-file-style:linux
+ * c-basic-offset:2
+ * End:
+ */
+
/////////////////////////////////////////////////////////////////////////////
Modified: sofaswitch/trunk/voip/udpconnection.h
==============================================================================
--- sofaswitch/trunk/voip/udpconnection.h (original)
+++ sofaswitch/trunk/voip/udpconnection.h Sun Jan 7 20:24:44 2007
@@ -189,6 +189,17 @@
OpalUdpSsEndPoint & endpoint;
};
+/* The comment below is magic for those who use emacs to edit this file. */
+/* With the comment below, the tab key does auto indent to 2 spaces. */
+
+/*
+ * Local Variables:
+ * mode:c
+ * c-file-style:linux
+ * c-basic-offset:2
+ * End:
+ */
+
#endif // __OPAL_UDP_CONNECTION_H
Modified: sofaswitch/trunk/voip/udpep.cxx
==============================================================================
--- sofaswitch/trunk/voip/udpep.cxx (original)
+++ sofaswitch/trunk/voip/udpep.cxx Sun Jan 7 20:24:44 2007
@@ -190,4 +190,15 @@
}
+/* The comment below is magic for those who use emacs to edit this file. */
+/* With the comment below, the tab key does auto indent to 2 spaces. */
+
+/*
+ * Local Variables:
+ * mode:c
+ * c-file-style:linux
+ * c-basic-offset:2
+ * End:
+ */
+
//////////////////////////END Of FILE/////////////////////////////////////
Modified: sofaswitch/trunk/voip/udpep.h
==============================================================================
--- sofaswitch/trunk/voip/udpep.h (original)
+++ sofaswitch/trunk/voip/udpep.h Sun Jan 7 20:24:44 2007
@@ -208,5 +208,16 @@
#endif // __OPAL_UDPEP_H
+/* The comment below is magic for those who use emacs to edit this file. */
+/* With the comment below, the tab key does auto indent to 2 spaces. */
+
+/*
+ * Local Variables:
+ * mode:c
+ * c-file-style:linux
+ * c-basic-offset:2
+ * End:
+ */
+
// End of File ///////////////////////////////////////////////////////////////
Modified: sofaswitch/trunk/voip/udpsound.cxx
==============================================================================
--- sofaswitch/trunk/voip/udpsound.cxx (original)
+++ sofaswitch/trunk/voip/udpsound.cxx Sun Jan 7 20:24:44 2007
@@ -262,4 +262,15 @@
+/* The comment below is magic for those who use emacs to edit this file. */
+/* With the comment below, the tab key does auto indent to 2 spaces. */
+
+/*
+ * Local Variables:
+ * mode:c
+ * c-file-style:linux
+ * c-basic-offset:2
+ * End:
+ */
+
// End of File ///////////////////////////////////////////////////////////////
Modified: sofaswitch/trunk/voip/udpsound.h
==============================================================================
--- sofaswitch/trunk/voip/udpsound.h (original)
+++ sofaswitch/trunk/voip/udpsound.h Sun Jan 7 20:24:44 2007
@@ -246,5 +246,16 @@
#endif // __OPAL_UDPSOUND_H
+/* The comment below is magic for those who use emacs to edit this file. */
+/* With the comment below, the tab key does auto indent to 2 spaces. */
+
+/*
+ * Local Variables:
+ * mode:c
+ * c-file-style:linux
+ * c-basic-offset:2
+ * End:
+ */
+
// End of File ///////////////////////////////////////////////////////////////
Modified: sofaswitch/trunk/voip/version.h
==============================================================================
--- sofaswitch/trunk/voip/version.h (original)
+++ sofaswitch/trunk/voip/version.h Sun Jan 7 20:24:44 2007
@@ -46,5 +46,16 @@
#endif // _Voip_VERSION_H
+/* The comment below is magic for those who use emacs to edit this file. */
+/* With the comment below, the tab key does auto indent to 2 spaces. */
+
+/*
+ * Local Variables:
+ * mode:c
+ * c-file-style:linux
+ * c-basic-offset:2
+ * End:
+ */
+
// End of File ///////////////////////////////////////////////////////////////
1
0
Author: derek
Date: Thu Jan 4 23:24:35 2007
New Revision: 222
Modified:
sofaswitch/trunk/voip/main.cxx
sofaswitch/trunk/voip/mymanager.cxx
sofaswitch/trunk/voip/udpep.cxx
sofaswitch/trunk/voip/udpep.h
Log:
Bring it up to date, so that it compiles with the latest openh323 code.
Modified: sofaswitch/trunk/voip/main.cxx
==============================================================================
--- sofaswitch/trunk/voip/main.cxx (original)
+++ sofaswitch/trunk/voip/main.cxx Thu Jan 4 23:24:35 2007
@@ -45,7 +45,7 @@
#endif
#include <lids/lidep.h>
-#include <lids/ixjlid.h>
+
#include <ptclib/pstun.h>
#include "main.h"
Modified: sofaswitch/trunk/voip/mymanager.cxx
==============================================================================
--- sofaswitch/trunk/voip/mymanager.cxx (original)
+++ sofaswitch/trunk/voip/mymanager.cxx Thu Jan 4 23:24:35 2007
@@ -54,7 +54,7 @@
#endif
#include <lids/lidep.h>
-#include <lids/ixjlid.h>
+
#include <ptclib/pstun.h>
#ifdef OPAL_STATIC_LINK
@@ -220,18 +220,11 @@
}
cout << "TCP ports: " << GetTCPPortBase() << '-' << GetTCPPortMax() << "\n"
- "UDP ports: " << GetUDPPortBase() << '-' << GetUDPPortMax() << "\n"
- "RTP ports: " << GetRtpIpPortBase() << '-' << GetRtpIpPortMax() << "\n"
- "RTP IP TOS: 0x" << hex << (unsigned)GetRtpIpTypeofService() << dec << "\n"
- "STUN server: " << flush;
-
- if (args.HasOption("stun"))
- SetSTUNServer(args.GetOptionString("stun"));
-
- if (stun != NULL)
- cout << stun->GetServer() << " replies " << stun->GetNatTypeName();
- else
- cout << "None";
+ "UDP ports: " << GetUDPPortBase() << '-' << GetUDPPortMax() << "\n"
+ "RTP ports: " << GetRtpIpPortBase() << '-' << GetRtpIpPortMax() << "\n"
+ "RTP IP TOS: 0x" << hex << (unsigned)GetRtpIpTypeofService() << dec << "\n" << flush;
+
+
cout << '\n';
Modified: sofaswitch/trunk/voip/udpep.cxx
==============================================================================
--- sofaswitch/trunk/voip/udpep.cxx (original)
+++ sofaswitch/trunk/voip/udpep.cxx Thu Jan 4 23:24:35 2007
@@ -64,7 +64,7 @@
{
IncOpalUdpSsEndPoint();
PTRACE(3, "UdpSs\tCreated UDP sound system endpoint.");
- connectionTokenIndex = 0;
+ connectionTokenIndex.SetValue(0);
}
@@ -79,7 +79,8 @@
BOOL OpalUdpSsEndPoint::MakeConnection(OpalCall & call,
const PString & remoteParty,
- void * userData)
+ void * userData,
+ unsigned int /*options*/)
{
// First strip of the prefix if present
PINDEX prefixLength = 0;
Modified: sofaswitch/trunk/voip/udpep.h
==============================================================================
--- sofaswitch/trunk/voip/udpep.h (original)
+++ sofaswitch/trunk/voip/udpep.h Thu Jan 4 23:24:35 2007
@@ -101,9 +101,10 @@
The default behaviour is pure.
*/
virtual BOOL MakeConnection(
- OpalCall & call, /// Owner of connection
- const PString & party, /// Remote party to call
- void * userData = NULL /// Arbitrary data to pass to connection
+ OpalCall & call, ///< Owner of connection
+ const PString & party, ///< Remote party to call
+ void * userData = NULL, ///< Arbitrary data to pass to connection
+ unsigned int options = 0 ///< options to pass to conneciton
);
/**Get the data formats this endpoint is capable of operating.
1
0
Author: derek
Date: Thu Jan 4 17:33:15 2007
New Revision: 221
Modified:
sofaswitch/trunk/sound/comms.cxx
sofaswitch/trunk/sound/comms.h
sofaswitch/trunk/sound/main.cxx
Log:
Remove the notion of tar and taw pointers.
Remove the need for the read write mutex on the tar/taw objects.
Check the sound device opens for reading, before we use it to capture audio.
Modified: sofaswitch/trunk/sound/comms.cxx
==============================================================================
--- sofaswitch/trunk/sound/comms.cxx (original)
+++ sofaswitch/trunk/sound/comms.cxx Thu Jan 4 17:33:15 2007
@@ -38,14 +38,13 @@
////////////////////////////////////////////////////////////////////////////////
-Comms::Comms(LaunchNewId & lid)
- : MessageFrame(lid, 63000)
+Comms::Comms(LaunchNewId & lid, PSoundChannel & _soundPlayer, PSoundChannel & _soundRecorder)
+ : MessageFrame(lid, 63000),
+ tar(* new TestAudioRead(audioSocket, _soundRecorder)),
+ taw(* new TestAudioWrite(audioSocket, _soundPlayer))
{
stopByExit = FALSE;
stopByHangup = TRUE;
-
- tar = NULL;
- taw = NULL;
}
Comms::~Comms()
@@ -53,13 +52,6 @@
PTRACE(3, "Comms destructor ");
Terminate();
WaitForTermination();
- PWaitAndSignal m(lockReaderWriter);
-
- if (tar != NULL)
- delete tar;
-
- if (taw != NULL)
- delete taw;
}
void Comms::OnTermination()
@@ -73,21 +65,11 @@
void Comms::Terminate()
{
PTRACE(3, "Terminate comms instance ");
- PWaitAndSignal m(lockReaderWriter);
+ PTRACE(3, "Set tar to terminate");
+ tar.Terminate();
- if (tar != NULL) {
- PTRACE(3, "Set tar to terminate");
- tar->Terminate();
- } else {
- PTRACE(3, "NO tar to terminate");
- }
-
- if (taw != NULL) {
- PTRACE(3, "Set taw to terminate");
- taw->Terminate();
- } else {
- PTRACE(3, "NO taw to terminate");
- }
+ PTRACE(3, "Set taw to terminate");
+ taw.Terminate();
}
void Comms::WaitForTermination()
@@ -96,15 +78,8 @@
while (keepGoing) {
{
PTRACE(6, "Comms\tWaitForTermination");
- PWaitAndSignal m(lockReaderWriter);
- if (tar != NULL) {
- keepGoing = !tar->IsTerminated();
- }
- if (taw != NULL) {
- keepGoing = keepGoing || (!taw->IsTerminated());
- }
- if ((taw == NULL) && (tar == NULL))
- keepGoing = !MessageFrame::IsTerminated();
+ keepGoing = !tar.IsTerminated();
+ keepGoing = keepGoing || (!taw.IsTerminated());
}
PThread::Sleep(100);
}
@@ -116,22 +91,19 @@
{
PString newVolume;
- PWaitAndSignal m(lockReaderWriter);
- TestAudio *ta;
+ TestAudio * ta;
if (dir == PSoundChannel::Player)
- ta = taw;
+ ta = &taw;
else
- ta = tar;
+ ta = &tar;
- if (ta != NULL) {
- if (doRaise)
- ta->RaiseVolume();
- else
- ta->LowerVolume();
- return ta->GetDeviceDirName() + PString(" ") + ta->GetVolumeString();
- }
- return PString("No current sound device");
+ if (doRaise)
+ ta->RaiseVolume();
+ else
+ ta->LowerVolume();
+
+ return ta->GetDeviceDirName() + PString(" ") + ta->GetVolumeString();
}
void Comms::SilentlyEndAll()
@@ -171,22 +143,14 @@
{
PStringStream countMessage;
countMessage << "sound card handler" << endl;
- {
- PWaitAndSignal m(lockReaderWriter);
- if (tar != NULL)
- countMessage << PString("Reader = ") << PString(tar->GetCountPackets())
+ countMessage << PString("Reader = ") << PString(tar.GetCountPackets())
<< PString(" packets");
- else
- countMessage << PString(" no read count available");
- countMessage << endl << endl;
+ countMessage << endl << endl;
- if (taw != NULL)
- countMessage << PString("writer = ") << PString(taw->GetCountPackets())
- << PString(" packets");
- else
- countMessage << PString(" no write count available");
- countMessage << endl << endl;
- }
+ countMessage << PString("writer = ") << PString(taw.GetCountPackets())
+ << PString(" packets");
+ countMessage << endl << endl;
+
PString partner = GetMediaPartner();
countMessage << "other node is: " << (partner.IsEmpty() ? " not specified" : partner);
countMessage << endl << endl << "............................ ";
@@ -231,36 +195,5 @@
}
-BOOL Comms::ConstructReader(PSoundChannel & sound)
-{
- PWaitAndSignal m(lockReaderWriter);
-
- tar = new TestAudioRead(audioSocket, sound);
- PThread::Sleep(100);
-
- if (tar->IsTerminated()) {
- PTRACE(3, "OOPS TestAudioRead has finished real quick");
- return FALSE;
- }
- return TRUE;
-}
-
-BOOL Comms::ConstructWriter(PSoundChannel & sound)
-{
- PWaitAndSignal m(lockReaderWriter);
-
- taw = new TestAudioWrite(audioSocket, sound);
- PThread::Sleep(100);
-
- if (taw->IsTerminated()) {
- PTRACE(3, "OOPS TestAudioWrite has finished real quick");
- return FALSE;
- }
-
- return TRUE;
-}
-
-
-
// End of File ///////////////////////////////////////////////////////////////
Modified: sofaswitch/trunk/sound/comms.h
==============================================================================
--- sofaswitch/trunk/sound/comms.h (original)
+++ sofaswitch/trunk/sound/comms.h Thu Jan 4 17:33:15 2007
@@ -49,20 +49,12 @@
public:
/**Constuctor */
- Comms(LaunchNewId & lid);
+ Comms(LaunchNewId & lid, PSoundChannel & _soundPlayer, PSoundChannel & _soundRecorder);
/**Terminate, wait for threads to exit, and destroy the tar & taw
threads */
~Comms();
-
- /**Open the test audio read thread..
- Return TRUE if successfull, FALSE on failure */
- BOOL ConstructReader(PSoundChannel & sound);
-
- /**Open the test audio write thread.
- Return TRUE if successfull, FALSE on failure */
- BOOL ConstructWriter(PSoundChannel & sound);
-
+
/**Shut down the read and write methods */
virtual void Terminate();
@@ -146,17 +138,14 @@
/**We have a comms error, so just close everything right now. Send
no message to the remote node - just end end end. */
virtual void SilentlyEndAll();
-
+
/**@name manage the audio streams of data to the sound device */
//@{
- /**class that writes audio data to sound device */
- TestAudioWrite *taw;
-
/**Class that reads audio from the sound device */
- TestAudioRead *tar;
-
- /**Mutex which protects access to the tar/taw variables */
- PMutex lockReaderWriter;
+ TestAudioRead & tar;
+
+ /**class that writes audio data to sound device */
+ TestAudioWrite & taw;
//@}
/**The terminating condition was */
Modified: sofaswitch/trunk/sound/main.cxx
==============================================================================
--- sofaswitch/trunk/sound/main.cxx (original)
+++ sofaswitch/trunk/sound/main.cxx Thu Jan 4 17:33:15 2007
@@ -269,10 +269,7 @@
PString ourPassword = "audio";
PTRACE(3, "Select a default password of audio");
-
- LaunchNewId lid(ourId, ourPassword);
- Comms c(lid);
-
+
PTRACE(3, "Constructed the comms device ");
if (!OpenSoundDevice(soundRecorder, PSoundChannel::Recorder)) {
@@ -290,18 +287,15 @@
PTRACE(3, msg);
return;
}
-
- if (!c.ConstructReader(soundRecorder)) {
- cerr << "Failed to consturct a reader for audio.... OOPs srry " << endl;
- PTRACE(3, "Failed to construct a reader for the audio. Exit now ");
- return;
- }
-
- if (!c.ConstructWriter(soundPlayer)) {
- cerr << "Failed to consturct a writer for audio.... OOPs srry " << endl;
- PTRACE(3, "Failed to construct a writer for the audio. Exit now ");
- return;
- }
+
+ PTRACE(3, "Have opended the sound device just fine, now do a test read");
+ BYTE nullBuffer[480];
+ soundRecorder.Read(nullBuffer, 480);
+ soundRecorder.Read(nullBuffer, 480);
+ PTRACE(3, "finished test read");
+
+ LaunchNewId lid(ourId, ourPassword);
+ Comms c(lid, soundPlayer, soundRecorder);
c.Resume(); //Get the coms to start working
PThread::Sleep(200); //Wait for the comms to work
@@ -338,6 +332,7 @@
}
if (!sound.IsOpen()) {
PTRACE(3, "just opened the device, but it is not open ");
+ return FALSE;
}
PINDEX currentVolume = 90;
@@ -345,11 +340,13 @@
sound.SetBuffers(480, 2);
- if (!sound.IsOpen()) {
+ if (sound.IsOpen()) {
+ PTRACE(3, "End of OpenAudio, sound device is opened just fine");
+ return TRUE;
+ } else {
PTRACE(3, "End of OpenAudio, but the sound device is closed");
+ return FALSE;
}
-
- return TRUE;
}
////////////////////////////////////////////////////////////////////////////////
1
0
Author: derek
Date: Wed Jan 3 22:52:52 2007
New Revision: 220
Modified:
sofaswitch/trunk/sound/audio.cxx
sofaswitch/trunk/sound/audio.h
sofaswitch/trunk/sound/comms.cxx
sofaswitch/trunk/sound/comms.h
sofaswitch/trunk/sound/main.cxx
Log:
Add ability to control volume while it runs.
Remove surplus code, some minor tidyups.
Modified: sofaswitch/trunk/sound/audio.cxx
==============================================================================
--- sofaswitch/trunk/sound/audio.cxx (original)
+++ sofaswitch/trunk/sound/audio.cxx Wed Jan 3 22:52:52 2007
@@ -191,8 +191,7 @@
if ((currentVolume + 5) < 101)
currentVolume += 5;
sound.SetVolume(currentVolume);
- cout << name << " volume is " << currentVolume << endl;
- PTRACE(3, "TestAudio\tRaise volume for " << name << " to " << currentVolume);
+ PTRACE(3, "TestAudio\tRaise volume for " << GetDeviceDirName() << " to " << currentVolume);
}
void TestAudio::LowerVolume()
@@ -200,9 +199,16 @@
if ((currentVolume - 5) >= 0)
currentVolume -= 5;
sound.SetVolume(currentVolume);
- cout << name << " volume is " << currentVolume << endl;
- PTRACE(3, "TestAudio\tLower volume for " << name << " to " << currentVolume);
+ PTRACE(3, "TestAudio\tLower volume for " << GetDeviceDirName() << " to " << currentVolume);
}
+
+PString TestAudio::GetVolumeString()
+{
+ PStringStream answer;
+ answer << name << " volume is " << currentVolume << endl;
+ return answer;
+}
+
////////////////////////////////////////////////////////////////////////////////
Modified: sofaswitch/trunk/sound/audio.h
==============================================================================
--- sofaswitch/trunk/sound/audio.h (original)
+++ sofaswitch/trunk/sound/audio.h Wed Jan 3 22:52:52 2007
@@ -40,6 +40,12 @@
/**Reporting function */
PINDEX GetCountPackets() { return countPackets; }
+ /**Report the current volume */
+ PString GetVolumeString();
+
+ /**Report the direction of this device as a string */
+ virtual PString GetDeviceDirName() { return " Undefined direction "; }
+
protected:
/**the socket that we do comms over */
PUDPSocket &socket;
@@ -83,6 +89,9 @@
/**the main entry point, where this thread starts */
void Main();
+
+ /**Report the direction of this device as a string */
+ virtual PString GetDeviceDirName() { return PString("Recorder"); }
};
/////////////////////////////////////////////////////////////////////////////
@@ -100,6 +109,8 @@
/**the main entry point, where this thread starts */
void Main();
+ /**Report the direction of this device as a string */
+ virtual PString GetDeviceDirName() { return PString("Player"); }
protected:
Modified: sofaswitch/trunk/sound/comms.cxx
==============================================================================
--- sofaswitch/trunk/sound/comms.cxx (original)
+++ sofaswitch/trunk/sound/comms.cxx Wed Jan 3 22:52:52 2007
@@ -112,6 +112,28 @@
MessageFrame::WaitForTermination();
}
+PString Comms::AlterVolume(PSoundChannel::Directions dir, BOOL doRaise)
+{
+ PString newVolume;
+
+ PWaitAndSignal m(lockReaderWriter);
+ TestAudio *ta;
+
+ if (dir == PSoundChannel::Player)
+ ta = taw;
+ else
+ ta = tar;
+
+ if (ta != NULL) {
+ if (doRaise)
+ ta->RaiseVolume();
+ else
+ ta->LowerVolume();
+ return ta->GetDeviceDirName() + PString(" ") + ta->GetVolumeString();
+ }
+ return PString("No current sound device");
+}
+
void Comms::SilentlyEndAll()
{
Modified: sofaswitch/trunk/sound/comms.h
==============================================================================
--- sofaswitch/trunk/sound/comms.h (original)
+++ sofaswitch/trunk/sound/comms.h Wed Jan 3 22:52:52 2007
@@ -80,9 +80,21 @@
are two sources of a status query - the remote controller or the
keybaord */
void GetStatusInformation(PString & statusInfo);
-
+
+ /**Raise the volume for the specified sound device. Return a
+ string describing the new volume */
+ PString RaiseVolume(PSoundChannel::Directions dir)
+ { return AlterVolume(dir, TRUE); }
+
+ /**Lower the volume for the specified sound device. Return a
+ string describing the new volume */
+ PString LowerVolume(PSoundChannel::Directions dir)
+ { return AlterVolume(dir, FALSE); }
+
protected:
-
+ /**Increase or decrease the volume on the specified device */
+ PString AlterVolume(PSoundChannel::Directions dir, BOOL doRaise);
+
/**We have a DTMF string from our current master. Display this DTMF on the console.
We always return TRUE, cause we can always do this right. */
virtual BOOL SendDtmf(const PString & dtmfVals);
Modified: sofaswitch/trunk/sound/main.cxx
==============================================================================
--- sofaswitch/trunk/sound/main.cxx (original)
+++ sofaswitch/trunk/sound/main.cxx Wed Jan 3 22:52:52 2007
@@ -50,6 +50,8 @@
PStringStream help;
help << "Press : " << endl
+ << " [ ] to raise or lower the play volume" << endl
+ << " { } to raise or lower the record volume" << endl
<< " H or ? help on this interface" << endl
<< " D dtmf Send dtmf message text to the controller" << endl
<< " S Report the status of this device" << endl
@@ -65,31 +67,54 @@
break;
switch (tolower(ch)) {
- case 'd' : {
- PString message;
- console >> message;
- comms.DtmfReceivedFromTheWorld(message);
- cout << "Command ? " << flush;
- }
- break;
- case 'x' :
- case 'q' : {
- endNow = TRUE;
- PTRACE(3, "End this program now ");
- }
- break;
- case 's' : {
- PString status;
- comms.GetStatusInformation(status);
- cout << status << endl;
- }
- break;
- case '?' :
- case 'h' :
- cout << help << endl;
- cout << "Command ? " << flush;
- default:
- break;
+ case '[' : {
+ cout << comms.LowerVolume(PSoundChannel::Player) << endl;
+ cout << "Command ? " << flush;
+ }
+ break;
+ case '{' : {
+ cout << comms.LowerVolume(PSoundChannel::Recorder) << endl;
+ cout << "Command ? " << flush;
+ }
+ break;
+
+
+ case ']' : {
+ cout << comms.RaiseVolume(PSoundChannel::Player) << endl;
+ cout << "Command ? " << flush;
+ }
+ break;
+ case '}' : {
+ cout << comms.RaiseVolume(PSoundChannel::Recorder) << endl;
+ cout << "Command ? " << flush;
+ }
+ break;
+
+ case 'd' : {
+ PString message;
+ console >> message;
+ comms.DtmfReceivedFromTheWorld(message);
+ cout << "Command ? " << flush;
+ }
+ break;
+ case 'x' :
+ case 'q' : {
+ endNow = TRUE;
+ PTRACE(3, "End this program now ");
+ }
+ break;
+ case 's' : {
+ PString status;
+ comms.GetStatusInformation(status);
+ cout << status << endl;
+ }
+ break;
+ case '?' :
+ case 'h' :
+ cout << help << endl;
+ cout << "Command ? " << flush;
+ default:
+ break;
} // end switch
} // end for
@@ -110,9 +135,9 @@
}
-PCREATE_PROCESS(Audio)
+PCREATE_PROCESS(Audio);
- void Audio::Main()
+void Audio::Main()
{
PArgList & args = GetArguments();
args.Parse(
@@ -247,7 +272,6 @@
LaunchNewId lid(ourId, ourPassword);
Comms c(lid);
- c.Resume();
PTRACE(3, "Constructed the comms device ");
@@ -278,7 +302,9 @@
PTRACE(3, "Failed to construct a writer for the audio. Exit now ");
return;
}
-
+
+ c.Resume(); //Get the coms to start working
+ PThread::Sleep(200); //Wait for the comms to work
UserInterface ui(c, soundPlayer, soundRecorder);
c.WaitForTermination();
1
0