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
- 390 discussions
Author: derek
Date: Thu Jan 11 21:53:57 2007
New Revision: 232
Modified:
sofaswitch/trunk/message.cxx
Log:
Add documentation on the "reporttome" command.
Modified: sofaswitch/trunk/message.cxx
==============================================================================
--- sofaswitch/trunk/message.cxx (original)
+++ sofaswitch/trunk/message.cxx Thu Jan 11 21:53:57 2007
@@ -219,6 +219,9 @@
detect DTMF, and is passing this on to the controller. The sound node, and
telephone line handlers can also detect DTMF events (which are alternatively
key pad presses) </td> </tr>
+<tr><td> reporttome </td><td> A supervisor (or worker) this message. A controller will send this message. The
+ recipient of this message will then send all queries (e.g. answer call) to the source
+ of this mesasge </td></tr>
<tr><td> requestnewid </td><td> A Supervisor will receive this message, create a new Worker, and reply with the
id of the created Worker.
An argument can be supplied. Currently, the only entity which uses this is the
1
0
Author: derek
Date: Thu Jan 11 21:53:19 2007
New Revision: 231
Modified:
sofaswitch/trunk/sofa/src/messages.cxx
Log:
Add handling of the message, "reporttome", so any controller can ask
any sofa node to send all messages to a new controlling entity.
Modified: sofaswitch/trunk/sofa/src/messages.cxx
==============================================================================
--- sofaswitch/trunk/sofa/src/messages.cxx (original)
+++ sofaswitch/trunk/sofa/src/messages.cxx Thu Jan 11 21:53:19 2007
@@ -106,10 +106,12 @@
availableCommands += PString(/* 14 */ "REQUESTNEWID");
availableCommands += PString(/* 15 */ "SETRECEIVEDMSGFILE");
availableCommands += PString(/* 16 */ "SETANNOUNCEMENTFILE");
+ availableCommands += PString(/* 17 */ "REPORTTOME");
#ifdef PMEMORY_CHECK
- availableCommands += PString(/* 17 */ "DUMPMEM");
+ availableCommands += PString(/* 18 */ "DUMPMEM");
#endif
+
WORD localPort = preferredPort;
for (; preferredPort != 0;) {
if (audioSocket.Listen(INADDR_ANY, 0, localPort)) {
@@ -577,8 +579,14 @@
return;
}
-#ifdef PMEMORY_CHECK
if (cmds[0] *= availableCommands[17]) {
+ PTRACE(2, "ReportToMe " << cmds[0]);
+ SetRemoteController(sender);
+ return;
+ }
+
+#ifdef PMEMORY_CHECK
+ if (cmds[0] *= availableCommands[18]) {
PTRACE(2, "ProcessMemoryDump " << cmds[0]);
ProcessMemoryDump(cmds, sender);
return;
1
0
Author: derek
Date: Thu Jan 11 21:52:03 2007
New Revision: 230
Modified:
sofaswitch/trunk/voip/comms.cxx
sofaswitch/trunk/voip/counts.cxx
sofaswitch/trunk/voip/jocall.h
sofaswitch/trunk/voip/main.cxx
sofaswitch/trunk/voip/mymanager.cxx
sofaswitch/trunk/voip/mymanager.h
sofaswitch/trunk/voip/udpconnection.cxx
sofaswitch/trunk/voip/udpep.cxx
sofaswitch/trunk/voip/udpep.h
sofaswitch/trunk/voip/udpsound.cxx
Log:
Tidy tidy tidy. Alter log levels to be less verbose.
Modified: sofaswitch/trunk/voip/comms.cxx
==============================================================================
--- sofaswitch/trunk/voip/comms.cxx (original)
+++ sofaswitch/trunk/voip/comms.cxx Thu Jan 11 21:52:03 2007
@@ -241,7 +241,7 @@
PUDPSocket & Comms::GetAudioSocket()
{
- PTRACE(3, "Return reference to audio socket");
+ PTRACE(6, "Return reference to audio socket");
return audioSocket;
}
////////////////////////////////////////////////////////////////////////////////
Modified: sofaswitch/trunk/voip/counts.cxx
==============================================================================
--- sofaswitch/trunk/voip/counts.cxx (original)
+++ sofaswitch/trunk/voip/counts.cxx Thu Jan 11 21:52:03 2007
@@ -113,29 +113,24 @@
<< ::setw(6) << PString(countDelUdpSoundChannel)
<< ::setw(6) << PString(countUdpSoundChannel - countDelUdpSoundChannel)
<< ::setw(0);
- PTRACE(1, "Get count udp sound channel " << msg);
return msg;
}
-void DecComms() { ++countDelComms; }
-void DecMyManager() { ++countDelMyManager; }
-void DecMyOpalCall() { ++countDelMyOpalCall; }
+void DecComms() { ++countDelComms; }
+void DecMyManager() { ++countDelMyManager; }
+void DecMyOpalCall() { ++countDelMyOpalCall; }
void DecOpalUdpSsConnection() { ++countDelOpalUdpSsConnection; }
-void DecOpalUdpSsEndPoint() { ++countDelOpalUdpSsEndPoint; }
-void DecSupervisor() { ++countDelSupervisor; }
-void DecUdpSoundChannel() { ++countDelUdpSoundChannel; }
-
-void IncComms() { ++countComms; }
-void IncMyManager() { ++countMyManager; }
-void IncMyOpalCall() { ++countMyOpalCall; }
+void DecOpalUdpSsEndPoint() { ++countDelOpalUdpSsEndPoint; }
+void DecSupervisor() { ++countDelSupervisor; }
+void DecUdpSoundChannel() { ++countDelUdpSoundChannel; }
+
+void IncComms() { ++countComms; }
+void IncMyManager() { ++countMyManager; }
+void IncMyOpalCall() { ++countMyOpalCall; }
void IncOpalUdpSsConnection() { ++countOpalUdpSsConnection; }
-void IncOpalUdpSsEndPoint() { ++countOpalUdpSsEndPoint; }
-void IncSupervisor() { ++countSupervisor; }
-void IncUdpSoundChannel()
-{
- PTRACE(1, "Inc count udp sound channel");
- ++countUdpSoundChannel;
-}
+void IncOpalUdpSsEndPoint() { ++countOpalUdpSsEndPoint; }
+void IncSupervisor() { ++countSupervisor; }
+void IncUdpSoundChannel() { ++countUdpSoundChannel; }
Modified: sofaswitch/trunk/voip/jocall.h
==============================================================================
--- sofaswitch/trunk/voip/jocall.h (original)
+++ sofaswitch/trunk/voip/jocall.h Thu Jan 11 21:52:03 2007
@@ -37,8 +37,8 @@
#endif
#include <opal/call.h>
+#include "comms.h"
-class Comms;
class MyManager;
/**
A class the combines the OpalCall structure from OPAL with our protocol
Modified: sofaswitch/trunk/voip/main.cxx
==============================================================================
--- sofaswitch/trunk/voip/main.cxx (original)
+++ sofaswitch/trunk/voip/main.cxx Thu Jan 11 21:52:03 2007
@@ -107,7 +107,6 @@
"s-server:"
"i-id:"
"-password:"
- "-controller:"
#if PTRACING
"o-output:"
#endif
@@ -234,7 +233,6 @@
" -h --help : This help message.\n"
" --server srv/id : server to connect to, which labels us as ID \n"
" --password pwd : password to use\n"
- " --controller cntrl : remote entity which controls us\n"
"\n"
<< endl;
return;
@@ -277,17 +275,8 @@
PTRACE(3, "Select a default password of " << ourPassword);
}
- PString ourController;
- if (args.HasOption("controller")) {
- ourController = args.GetOptionString("controller");
- PTRACE(3, "remote controller is " << ourController);
- } else {
- ourController = "controller";
- PTRACE(3, "remote controller is set to " << ourController << " which is the default");
- }
-
LaunchNewId lid(ourId, ourPassword);
- opal = new MyManager(lid, ourController, ourId, ourPassword);
+ opal = new MyManager(lid, ourId, ourPassword);
if (opal->Initialise(args)) {
opal->Main(args);
Modified: sofaswitch/trunk/voip/mymanager.cxx
==============================================================================
--- sofaswitch/trunk/voip/mymanager.cxx (original)
+++ sofaswitch/trunk/voip/mymanager.cxx Thu Jan 11 21:52:03 2007
@@ -80,7 +80,6 @@
///////////////////////////////////////////////////////////////
MyManager::MyManager(LaunchNewId & _lid,
- PString & _controllerId,
PString & _ourId, PString & _ourPassword)
: lid(_lid),
supervisor(*(new Supervisor(lid)))
@@ -89,8 +88,6 @@
allocationNumber = 0;
IncMyManager();
-
- controllerId = _controllerId;
ourId = _ourId;
ourPassword = _ourPassword;
@@ -702,7 +699,7 @@
}
PTRACE(3, "Now, we have to leave a wait period");
- cerr << "Allow all the current comms instances to end " << endl;
+
PThread::Sleep(2000);
PTRACE(3, "Finished the 2 second wait for comms to die");
@@ -920,6 +917,12 @@
OpalManager::OnAlerting(connection);
}
+PString MyManager::GetControllerId()
+{
+ return supervisor.GetRemoteController();
+}
+
+
/* 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. */
Modified: sofaswitch/trunk/voip/mymanager.h
==============================================================================
--- sofaswitch/trunk/voip/mymanager.h (original)
+++ sofaswitch/trunk/voip/mymanager.h Thu Jan 11 21:52:03 2007
@@ -61,7 +61,7 @@
public:
/**Constructor */
- MyManager(LaunchNewId & lid, PString & controllerId, PString & ourId, PString & ourPassword);
+ MyManager(LaunchNewId & lid, PString & ourId, PString & ourPassword);
/**destructor */
~MyManager();
@@ -136,7 +136,7 @@
PString GetOurId() { return ourId; }
/**Return the id of the remote controller */
- PString GetControllerId() { return controllerId; }
+ PString GetControllerId();
/**Set up a call between two parties.
This is used to initiate a call. Incoming calls are "answered" using a
@@ -249,11 +249,6 @@
/**The IAX2 endpoint that is used for controlling h323 calls */
IAX2EndPoint * iax2EP;
#endif
-
- /**The unique ID that identifies the remote controller who is
- responsible for the overview of this sofaswitch */
- PString controllerId;
-
/**An enity which could be used when logging in to the server */
PString ourPassword;
Modified: sofaswitch/trunk/voip/udpconnection.cxx
==============================================================================
--- sofaswitch/trunk/voip/udpconnection.cxx (original)
+++ sofaswitch/trunk/voip/udpconnection.cxx Thu Jan 11 21:52:03 2007
@@ -117,7 +117,7 @@
if (mediaStreams.IsEmpty())
phase = ConnectedPhase;
else {
- PTRACE(3, "ZZZ\t there are " << mediaStreams.GetSize() << " current media stream ");
+ PTRACE(5, "UdpSs\t there are " << mediaStreams.GetSize() << " current media stream ");
phase = EstablishedPhase;
OnEstablished();
}
Modified: sofaswitch/trunk/voip/udpep.cxx
==============================================================================
--- sofaswitch/trunk/voip/udpep.cxx (original)
+++ sofaswitch/trunk/voip/udpep.cxx Thu Jan 11 21:52:03 2007
@@ -74,7 +74,13 @@
DecOpalUdpSsEndPoint();
}
-
+BOOL OpalUdpSsEndPoint::MakeConnection(OpalCall & call,
+ const PString & remoteParty,
+ void * userData)
+{
+ return MakeConnection(call, remoteParty, userData, 0);
+}
+
BOOL OpalUdpSsEndPoint::MakeConnection(OpalCall & call,
Modified: sofaswitch/trunk/voip/udpep.h
==============================================================================
--- sofaswitch/trunk/voip/udpep.h (original)
+++ sofaswitch/trunk/voip/udpep.h Thu Jan 11 21:52:03 2007
@@ -107,6 +107,16 @@
unsigned int options = 0 ///< options to pass to conneciton
);
+ /**This filler method is identical to that above, and is provided as a
+ convenience, when working against different library versions.*/
+ virtual BOOL MakeConnection(
+ OpalCall & call, ///< Owner of connection
+ const PString & party, ///< Remote party to call
+ void * userData = NULL ///< Arbitrary data to pass to connection
+ );
+
+
+
/**Get the data formats this endpoint is capable of operating.
This provides a list of media data format names that may be used by an
OpalMediaStream may be created by a connection from this endpoint.
Modified: sofaswitch/trunk/voip/udpsound.cxx
==============================================================================
--- sofaswitch/trunk/voip/udpsound.cxx (original)
+++ sofaswitch/trunk/voip/udpsound.cxx Thu Jan 11 21:52:03 2007
@@ -59,7 +59,7 @@
audioSocket(_myOpalCall.GetAudioSocket()), isSource(_isSource)
{
IncUdpSoundChannel();
- PTRACE(3, "ZZZ\tCreate UdpSoundSocket for " << GetSSLabel(isSource));
+ PTRACE(6, "ZZZ\tCreate UdpSoundSocket for " << GetSSLabel(isSource));
os_handle = -2;
}
@@ -68,7 +68,7 @@
os_handle = -1;
readQueue.Close();
- PTRACE(3, "UdpSoundChannel " << *this << " destroyed.");
+ PTRACE(6, "UdpSoundChannel " << *this << " destroyed.");
DecUdpSoundChannel();
}
@@ -103,7 +103,7 @@
{
PTRACE(6, "Write " << amount << " bytes to the socket");
if (!IsOpen()) {
- PTRACE(1, "Write failed as this sound channel is closed");
+ PTRACE(3, "Write failed as this sound channel is closed");
return FALSE;
}
@@ -130,7 +130,7 @@
BOOL UdpSoundChannel::Read(void * buffer, PINDEX amount)
{
if (!IsOpen()) {
- PTRACE(1, "Read failed as this sound channel is closed");
+ PTRACE(3, "Read failed as this sound channel is closed");
return FALSE;
}
@@ -147,7 +147,7 @@
PTRACE(1, "The read of a packet from a socket failed for " << GetSSLabel(isSource));
return FALSE;
}
- PTRACE(4, "The socket provided us with " << audioSocket.GetLastReadCount() << " bytes");
+ PTRACE(5, "The socket provided us with " << audioSocket.GetLastReadCount() << " bytes");
readOk = readQueue.Write(readBuffer.GetPointer(), audioSocket.GetLastReadCount());
PTRACE(5, "The readqueue now has a size of " << readQueue.GetLength() << " bytes");
@@ -167,7 +167,7 @@
BOOL UdpSoundChannel::Close()
{
PTRACE(3, "Close audio channel now for " << GetSSLabel(isSource));
- PTRACE(5, "os_handle or fd = " << os_handle);
+ PTRACE(6, "os_handle or fd = " << os_handle);
audioSocket.Close();
os_handle = -1;
1
0
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
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
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
[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