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
May 2007
- 1 participants
- 16 discussions
31 May '07
Author: derek
Date: Thu May 31 18:52:16 2007
New Revision: 263
Modified:
sofaswitch/trunk/callflow/src/eventer.cpp
Log:
Change the name of the default event in the regular expression
field.
Modified: sofaswitch/trunk/callflow/src/eventer.cpp
==============================================================================
--- sofaswitch/trunk/callflow/src/eventer.cpp (original)
+++ sofaswitch/trunk/callflow/src/eventer.cpp Thu May 31 18:52:16 2007
@@ -32,7 +32,7 @@
InformationSection(wxT("Event sought (Python code)"), wxT(""));
displayData[displayData.size()] =
- InformationSection(wxT("Event sought (Regular Exp)"), wxT("*DTMF"));
+ InformationSection(wxT("Event sought (Regular Exp)"), wxT("DTMF"));
displayData[displayData.size()] =
InformationSection(wxT("Python variable: source of the event"), wxT("self.eventSource"));
1
0
22 May '07
Author: derek
Date: Tue May 22 00:30:07 2007
New Revision: 262
Modified:
sofaswitch/trunk/callflow/src/callflow.cpp
Log:
Make sure that it selects the correct extension when loading
& saving image files, and when compiling to python.
Modified: sofaswitch/trunk/callflow/src/callflow.cpp
==============================================================================
--- sofaswitch/trunk/callflow/src/callflow.cpp (original)
+++ sofaswitch/trunk/callflow/src/callflow.cpp Tue May 22 00:30:07 2007
@@ -229,7 +229,7 @@
void MyFrame::OnFileOpen (wxCommandEvent & WXUNUSED(event))
{
- wxFileDialog filedlg(this, _T("Select a file to read data from"));
+ wxFileDialog filedlg(this, _T("Select a file to read data from"), _T(""), _T(""), _T("*.src"));
if ( filedlg.ShowModal() != wxID_OK )
return;
@@ -284,7 +284,7 @@
void MyFrame::OnFileSave__As (wxCommandEvent & WXUNUSED(event))
{
- wxFileDialog filedlg(this, _T("Select a file to save this data to"));
+ wxFileDialog filedlg(this, _T("Select a file to contain this image"), _T(""), _T(""), _T("*.src"));
if (filedlg.ShowModal() != wxID_OK)
return;
@@ -604,24 +604,24 @@
void MyFrame::OnCompile (wxCommandEvent & WXUNUSED(event))
{
- wxFileDialog filedlg(this, _T("Select a file to place code in"));
- if (filedlg.ShowModal() != wxID_OK)
- return;
-
- wxTextFile file(filedlg.GetPath());
-
- if (!file.Exists())
- file.Create();
- file.Open();
- if (!file.IsOpened()) {
- wxMessageBox(wxString::Format("Unable to open the file %s to write data to", filedlg.GetFilename().c_str()));
- return;
- }
-
- if (canvas->Compile(file))
- SetStatusText(wxString::Format("wrote compiled code to %s", filedlg.GetFilename().c_str()));
- else
- wxMessageBox(wxString::Format("failed - could not compile code to %s", filedlg.GetFilename().c_str()));
-
- file.Close();
+ wxFileDialog filedlg(this, _T("Select a file to contain the python code"), _T(""), _T(""), _T("*.py"));
+ if (filedlg.ShowModal() != wxID_OK)
+ return;
+
+ wxTextFile file(filedlg.GetPath());
+
+ if (!file.Exists())
+ file.Create();
+ file.Open();
+ if (!file.IsOpened()) {
+ wxMessageBox(wxString::Format("Unable to open the file %s to write data to", filedlg.GetFilename().c_str()));
+ return;
+ }
+
+ if (canvas->Compile(file))
+ SetStatusText(wxString::Format("wrote compiled code to %s", filedlg.GetFilename().c_str()));
+ else
+ wxMessageBox(wxString::Format("failed - could not compile code to %s", filedlg.GetFilename().c_str()));
+
+ file.Close();
}
1
0
[Sofaswitch-svn] [commit] r261 - in sofaswitch/trunk/callflow: src tests
by SofaSWITCH SVN 22 May '07
by SofaSWITCH SVN 22 May '07
22 May '07
Author: derek
Date: Mon May 21 23:19:38 2007
New Revision: 261
Modified:
sofaswitch/trunk/callflow/src/callflow.cpp
sofaswitch/trunk/callflow/tests/amtest.src
Log:
Add tests on the presence of the named file, when doing saveas.
Modified: sofaswitch/trunk/callflow/src/callflow.cpp
==============================================================================
--- sofaswitch/trunk/callflow/src/callflow.cpp (original)
+++ sofaswitch/trunk/callflow/src/callflow.cpp Mon May 21 23:19:38 2007
@@ -197,8 +197,9 @@
int w, h;
GetSize(&w, &h);
- w= w << 1;
- SetSize(w, h);
+ w = w << 1;
+ h = h << 1;
+ SetSize(1100, 700);
}
@@ -289,8 +290,16 @@
wxTextFile file(filedlg.GetPath());
- if (!file.Exists())
+ if (file.Exists()) {
+ wxString msg = wxString::Format("The file \n%s\n exists. Overwrite ? ", (const char *)filedlg.GetPath());
+ wxMessageDialog *dlg= new wxMessageDialog(this, msg, "Overwrite existing file", wxYES_DEFAULT | wxYES_NO);
+ if (wxID_NO == dlg->ShowModal())
+ return;
+ }
+
+ if (!file.Exists())
file.Create();
+
file.Open();
if (!file.IsOpened()) {
wxMessageBox(wxString::Format("Unable to open the file %s to write data to", filedlg.GetFilename().c_str()));
Modified: sofaswitch/trunk/callflow/tests/amtest.src
==============================================================================
--- sofaswitch/trunk/callflow/tests/amtest.src (original)
+++ sofaswitch/trunk/callflow/tests/amtest.src Mon May 21 23:19:38 2007
@@ -1,3 +1,3 @@
-9<B>248<B>182<B>248,183,308,182<special>Tool Tip<ms>Join blocks shape<ms><special> <B><Shape>14<B>298<B>186<B> extra <special>Tool Tip<ms>Catch the timer, which when fired,
-indicates no am node was found<ms><special>Event sought (Python code)<ms><ms><special>Event sought (Regular Exp)<ms>requestam<ms><special>Python variable: source of the event<ms>self.eventSource<ms><special>Python variable: name of the event<ms>self.eventName<ms><special>Python variable: data associated<ms>self.nonodefound<ms><special> <B><Shape>20<B>304<B>383<B> extra <special>Tool Tip<ms>Death<ms><special> <B><Shape>11<B>190<B>110<B> extra <special>Tool Tip<ms>Request Node<ms><special>Request node from (Python code)<ms>"am"<ms><special>Timer period (seconds)<ms>1<ms><special>Timer label<ms>requestam<ms><special>Additional information (Python code)<ms><ms><special> <B><Shape>1<B>191<B>15<B> extra <special>Tool Tip<ms>Start Processing<ms><special> <B><Shape>17<B>190<B>357<B> extra <special>Tool Tip<ms>Write To File<ms><special>Filename to contain new audio (Python code)<ms>"recorded_audio.wav"<ms><special>answering machine node<ms>self.amNode<ms><special> <B><Shape>2<B>362<B>231<B> extra <special>Tool Tip<ms>End Processing<ms><special> <B><Shape>9<B>318<B>262<B>347,262,318,294<special>Tool Tip<ms>Join blocks shape<ms><special> <B><Shape>2<B>190<B>446<B> extra <special>Tool Tip<ms>End Processing<ms><special> <B><Shape>10<B>198<B>248<B> extra <special>Tool Tip<ms>Python<ms><special>Python Code<ms>print "Have a new am node on ", self.amNode<ms><special> <B><Shape>9<B>311<B>236<B>311,236,318,294<special>Tool Tip<ms>Join blocks shape<ms><special> <B><Shape>21<B>301<B>339<B> extra <special>Tool Tip<ms>terminate the am node<ms><special>Message to send (Python code)<ms>self.amNode + ":hangup"<ms><special> <B><Shape>15<B>190<B>310<B> extra <special>Tool Tip<ms>Transfer Media<ms><special>First SofaSwitch worker (python)<ms>self.amNode<ms><special>Second SofaSwitch worker (python)<ms>"sound"<ms><special> <B><Shape>21<B>199<B>67<B> extra <special>Tool Tip<ms>sound messages come here<ms><special>Message to send (Python code)<ms>"sound:reporttome"<ms><special> <B><Shape>16<B>190<B>401<B> extra <special>Tool Tip<ms>initial wav file<ms><special>Filename to read audio from (Python code)<ms>"../prompts/instructions.wav"<ms><special>answering machine node<ms>self.amNode<ms><special> <B><Shape>15<B>292<B>298<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>334<B>212<B> extra <special>Tool Tip<ms>wait for incoming DTMF<ms><special>Event sought (Python code)<ms><ms><special>Event sought (Regular Exp)<ms>DTMF<ms><special>Python variable: source of the event<ms>self.eventSource<ms><special>Python variable: name of the event<ms>self.eventName<ms><special>Python variable: generated data<ms>self.eventData<ms><special> <B><Shape>14<B>201<B>161<B> extra <special>Tool Tip<ms>Wait for an event to indicate
-that the am node is created<ms><special>Event sought (Python code)<ms><ms><special>Event sought (Regular Exp)<ms>amREQ<ms><special>Python variable: source of the event<ms>self.eventSource<ms><special>Python variable: name of the event<ms>self.eventName<ms><special>Python variable: data associated<ms>self.amNode<ms><special> <B><Shape>13<B>190<B>210<B> extra <special>Tool Tip<ms>Stop Timer<ms><special>Timer to stop<ms>requestam<ms><special> <B><Shape>
+14<B>334<B>212<B> extra <special>Tool Tip<ms>wait for incoming DTMF<ms><special>Event sought (Python code)<ms><ms><special>Event sought (Regular Exp)<ms>DTMF<ms><special>Python variable: source of the event<ms>self.eventSource<ms><special>Python variable: name of the event<ms>self.eventName<ms><special>Python variable: generated data<ms>self.eventData<ms><special> <B><Shape>20<B>304<B>383<B> extra <special>Tool Tip<ms>Death<ms><special> <B><Shape>14<B>298<B>186<B> extra <special>Tool Tip<ms>Catch the timer, which when fired,
+indicates no am node was found<ms><special>Event sought (Python code)<ms><ms><special>Event sought (Regular Exp)<ms>requestam<ms><special>Python variable: source of the event<ms>self.eventSource<ms><special>Python variable: name of the event<ms>self.eventName<ms><special>Python variable: data associated<ms>self.nonodefound<ms><special> <B><Shape>16<B>190<B>401<B> extra <special>Tool Tip<ms>initial wav file<ms><special>Filename to read audio from (Python code)<ms>"../prompts/instructions.wav"<ms><special>answering machine node<ms>self.amNode<ms><special> <B><Shape>1<B>191<B>15<B> extra <special>Tool Tip<ms>Start Processing<ms><special> <B><Shape>9<B>311<B>236<B>311,236,318,294<special>Tool Tip<ms>Join blocks shape<ms><special> <B><Shape>15<B>190<B>310<B> extra <special>Tool Tip<ms>Transfer Media<ms><special>First SofaSwitch worker (python)<ms>self.amNode<ms><special>Second SofaSwitch worker (python)<ms>"sound"<ms><special> <B><Shape>2<B>190<B>446<B> extra <special>Tool Tip<ms>End Processing<ms><special> <B><Shape>9<B>318<B>262<B>347,262,318,294<special>Tool Tip<ms>Join blocks shape<ms><special> <B><Shape>11<B>190<B>110<B> extra <special>Tool Tip<ms>Request Node<ms><special>Request node from (Python code)<ms>"am"<ms><special>Timer period (seconds)<ms>1<ms><special>Timer label<ms>requestam<ms><special>Additional information (Python code)<ms><ms><special> <B><Shape>17<B>190<B>357<B> extra <special>Tool Tip<ms>Write To File<ms><special>Filename to contain new audio (Python code)<ms>"recorded_audio.wav"<ms><special>answering machine node<ms>self.amNode<ms><special> <B><Shape>10<B>198<B>248<B> extra <special>Tool Tip<ms>Python<ms><special>Python Code<ms>print "Have a new am node on ", self.amNode<ms><special> <B><Shape>13<B>190<B>210<B> extra <special>Tool Tip<ms>Stop Timer<ms><special>Timer to stop<ms>requestam<ms><special> <B><Shape>2<B>362<B>231<B> extra <special>Tool Tip<ms>End Processing<ms><special> <B><Shape>15<B>292<B>298<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>9<B>248<B>182<B>248,183,308,182<special>Tool Tip<ms>Join blocks shape<ms><special> <B><Shape>21<B>199<B>67<B> extra <special>Tool Tip<ms>sound messages come here<ms><special>Message to send (Python code)<ms>"sound:reporttome"<ms><special> <B><Shape>14<B>201<B>161<B> extra <special>Tool Tip<ms>Wait for an event to indicate
+that the am node is created<ms><special>Event sought (Python code)<ms><ms><special>Event sought (Regular Exp)<ms>amREQ<ms><special>Python variable: source of the event<ms>self.eventSource<ms><special>Python variable: name of the event<ms>self.eventName<ms><special>Python variable: data associated<ms>self.amNode<ms><special> <B><Shape>21<B>301<B>339<B> extra <special>Tool Tip<ms>terminate the am node<ms><special>Message to send (Python code)<ms>self.amNode + ":hangup"<ms><special> <B><Shape>
1
0
22 May '07
Author: derek
Date: Mon May 21 22:15:20 2007
New Revision: 260
Modified:
sofaswitch/trunk/callflow/tests/makevoipcall.src
Log:
Tidy up hints. Remove surplus registration request to am.
Modified: sofaswitch/trunk/callflow/tests/makevoipcall.src
==============================================================================
--- sofaswitch/trunk/callflow/tests/makevoipcall.src (original)
+++ sofaswitch/trunk/callflow/tests/makevoipcall.src Mon May 21 22:15:20 2007
@@ -1,3 +1,4 @@
-2<B>203<B>769<B> extra <special>Tool Tip<ms>End Processing<ms><special> <B><Shape>15<B>423<B>395<B> extra <special>Tool Tip<ms>Make sound node
-talk to itself<ms><special>First SofaSwitch worker (python)<ms>"sound"<ms><special>Second SofaSwitch worker (python)<ms>"sound"<ms><special> <B><Shape>22<B>71<B>65<B> extra <special>Tool Tip<ms>Register for events from voip node<ms><special>Node to receive events from (Python code)<ms>"voip"<ms><special> <B><Shape>2<B>420<B>527<B> extra <special>Tool Tip<ms>End Processing<ms><special> <B><Shape>14<B>77<B>242<B> extra <special>Tool Tip<ms>have a voip node from the voip module<ms><special>Event sought (Python code)<ms><ms><special>Event sought (Regular Exp)<ms>voipREQ<ms><special>Python variable: source of the event<ms>self.eventSource<ms><special>Python variable: name of the event<ms>self.eventName<ms><special>Python variable: generated data<ms>self.voipNode<ms><special> <B><Shape>22<B>71<B>108<B> extra <special>Tool Tip<ms>Register for events from am node<ms><special>Node to receive events from (Python code)<ms>"am"<ms><special> <B><Shape>9<B>130<B>262<B>130,263,190,262<special>Tool Tip<ms>Join blocks shape<ms><special> <B><Shape>20<B>287<B>343<B> extra <special>Tool Tip<ms>Death<ms><special> <B><Shape>9<B>166<B>439<B>166,439,212,440<special>Tool Tip<ms>Join blocks shape<ms><special> <B><Shape>9<B>140<B>391<B>140,655,149,713,369,710,376,391,448,395<special>Tool Tip<ms>Join blocks shape<ms><special> <B><Shape>2<B>591<B>357<B> extra <special>Tool Tip<ms>End Processing<ms><special> <B><Shape>11<B>63<B>152<B> extra <special>Tool Tip<ms>Request voip 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>140<B>655<B>140,655,149,717<special>Tool Tip<ms>Join blocks shape<ms><special> <B><Shape>5<B>115<B>605<B> extra <special>Tool Tip<ms>Test for dtmf data of "9"<ms><special>Test (Python code)<ms>self.dtmfData=="9"<ms><special> <B><Shape>2<B>187<B>440<B> extra <special>Tool Tip<ms>End Processing<ms><special> <B><Shape>11<B>65<B>196<B> extra <special>Tool Tip<ms>Request sound 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>141<B>411<B>190,411,141,414<special>Tool Tip<ms>Join blocks shape<ms><special> <B><Shape>7<B>422<B>440<B> extra <special>Tool Tip<ms>End Call<ms><special>Worker node to activate (python code)<ms>self.voipNode<ms><special> <B><Shape>19<B>201<B>724<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>14<B>564<B>337<B> extra <special>Tool Tip<ms>Test timer on request of sound<ms><special>Event sought (Python code)<ms><ms><special>Event sought (Regular Exp)<ms>requestsound<ms><special>Python variable: source of the event<ms>self.eventSource<ms><special>Python variable: name of the event<ms>self.eventName<ms><special>Python variable: generated data<ms>self.eventData<ms><special> <B><Shape>9<B>448<B>363<B>540,363,448,395<special>Tool Tip<ms>Join blocks shape<ms><special> <B><Shape>10<B>74<B>325<B> extra <special>Tool Tip<ms>report we have a voip node<ms><special>Python Code<ms>print "Have a new voip node on ", self.voipNode<ms><special> <B><Shape>1<B>62<B>24<B> extra <special>Tool Tip<ms>Start Processing<ms><special> <B><Shape>9<B>178<B>584<B>178,584,223,585<special>Tool Tip<ms>Join blocks shape<ms><special> <B><Shape>9<B>223<B>382<B>223,635,355,637,359,382,448,395<special>Tool Tip<ms>Join blocks shape<ms><special> <B><Shape>9<B>165<B>630<B>165,630,221,678,226,724<special>Tool Tip<ms>Join blocks shape<ms><special> <B><Shape>9<B>448<B>387<B>577,387,448,395<special>Tool Tip<ms>Join blocks shape<ms><special> <B><Shape>9<B>90<B>385<B>90,385,141,414<special>Tool Tip<ms>Join blocks shape<ms><special> <B><Shape>14<B>175<B>264<B> extra <special>Tool Tip<ms>wait for arrival of sound node<ms><special>Event sought (Python code)<ms><ms><special>Event sought (Regular Exp)<ms>soundREQ<ms><special>Python variable: source of the event<ms>self.eventSource<ms><special>Python variable: name of the event<ms>self.eventName<ms><special>Python variable: generated data<ms>self.soundNode<ms><special> <B><Shape>10<B>174<B>351<B> extra <special>Tool Tip<ms>report we have a sound node<ms><special>Python Code<ms>print " have a sound node of ", self.soundNode<ms><special> <B><Shape>9<B>225<B>286<B>225,286,300,286<special>Tool Tip<ms>Join blocks shape<ms><special> <B><Shape>6<B>116<B>463<B> extra <special>Tool Tip<ms>Make Call to a remote entity<ms><special>Worker node to activate (python code)<ms>self.voipNode<ms><special>Call destination (python code)<ms>self.scriptArgs<ms><special> <B><Shape>2<B>238<B>608<B> extra <special>Tool Tip<ms>End Processing<ms><special> <B><Shape>15<B>116<B>514<B> extra <special>Tool Tip<ms>Transfer Media between the voip and sound node<ms><special>First SofaSwitch worker (python)<ms>self.voipNode<ms><special>Second SofaSwitch worker (python)<ms>self.soundNode<ms><special> <B><Shape>9<B>335<B>311<B>335,311,542,311<special>Tool Tip<ms>Join blocks shape<ms><special> <B><Shape>13<B>164<B>307<B> extra <special>Tool Tip<ms>Stop Timer on the request for a sound node<ms><special>Timer to stop<ms>requestsound<ms><special> <B><Shape>14<B>527<B>313<B> extra <special>Tool Tip<ms>test timer on request of voip<ms><special>Event sought (Python code)<ms><ms><special>Event sought (Regular Exp)<ms>requestvoip<ms><special>Python variable: source of the event<ms>self.eventSource<ms><special>Python variable: name of the event<ms>self.eventName<ms><special>Python variable: generated data<ms>self.eventData<ms><special> <B><Shape>13<B>65<B>286<B> extra <special>Tool Tip<ms>Stop Timer on the voip request<ms><special>Timer to stop<ms>requestvoip<ms><special> <B><Shape>14<B>210<B>585<B> extra <special>Tool Tip<ms>Wait for voip call to end<ms><special>Event sought (Python code)<ms><ms><special>Event sought (Regular Exp)<ms>Terminating<ms><special>Python variable: source of the event<ms>self.eventSource<ms><special>Python variable: name of the event<ms>self.eventName<ms><special>Python variable: generated data<ms>self.eventData<ms><special> <B><Shape>12<B>421<B>483<B> extra <special>Tool Tip<ms>Timer which initates a shutdown, after some tidyup
- messages etc have been sent.<ms><special>Timer period (seconds, Python code)<ms>1<ms><special>Timer label (Python code)<ms>"endeverything"<ms><special> <B><Shape>5<B>116<B>414<B> extra <special>Tool Tip<ms>TEST: have a sound and voip node.<ms><special>Test (Python code)<ms>(self.voipNode != None) and (self.soundNode != None)<ms><special> <B><Shape>14<B>285<B>289<B> extra <special>Tool Tip<ms>Eventer<ms><special>Event sought (Python code)<ms><ms><special>Event sought (Regular Exp)<ms>endeverything<ms><special>Python variable: source of the event<ms>self.eventSource<ms><special>Python variable: name of the event<ms>self.eventName<ms><special>Python variable: generated data<ms>self.eventData<ms><special> <B><Shape>14<B>128<B>562<B> extra <special>Tool Tip<ms>Wait for DTMF data<ms><special>Event sought (Python code)<ms><ms><special>Event sought (Regular Exp)<ms>DTMF<ms><special>Python variable: source of the event<ms>self.eventSource<ms><special>Python variable: name of the event<ms>self.eventName<ms><special>Python variable: generated data<ms>self.dtmfData<ms><special> <B><Shape>
+9<B>165<B>334<B>165,598,174,656,394,653,401,334,473,338<special>Tool Tip<ms>Join blocks shape<ms><special> <B><Shape>9<B>155<B>205<B>155,206,215,205<special>Tool Tip<ms>Join blocks shape<ms><special> <B><Shape>14<B>200<B>207<B> extra <special>Tool Tip<ms>wait for arrival of sound node<ms><special>Event sought (Python code)<ms><ms><special>Event sought (Regular Exp)<ms>soundREQ<ms><special>Python variable: source of the event<ms>self.eventSource<ms><special>Python variable: name of the event<ms>self.eventName<ms><special>Python variable: generated data<ms>self.soundNode<ms><special> <B><Shape>9<B>203<B>527<B>203,527,248,528<special>Tool Tip<ms>Join blocks shape<ms><special> <B><Shape>5<B>140<B>548<B> extra <special>Tool Tip<ms>Test for dtmf data of "9"<ms><special>Test (Python code)<ms>self.dtmfData=="9"<ms><special> <B><Shape>14<B>102<B>185<B> extra <special>Tool Tip<ms>have a voip node from the voip module<ms><special>Event sought (Python code)<ms><ms><special>Event sought (Regular Exp)<ms>voipREQ<ms><special>Python variable: source of the event<ms>self.eventSource<ms><special>Python variable: name of the event<ms>self.eventName<ms><special>Python variable: generated data<ms>self.voipNode<ms><special> <B><Shape>14<B>552<B>256<B> extra <special>Tool Tip<ms>test timer on request of voip<ms><special>Event sought (Python code)<ms><ms><special>Event sought (Regular Exp)<ms>requestvoip<ms><special>Python variable: source of the event<ms>self.eventSource<ms><special>Python variable: name of the event<ms>self.eventName<ms><special>Python variable: generated data<ms>self.eventData<ms><special> <B><Shape>13<B>90<B>229<B> extra <special>Tool Tip<ms>Stop Timer on the voip request<ms><special>Timer to stop<ms>requestvoip<ms><special> <B><Shape>15<B>141<B>457<B> extra <special>Tool Tip<ms>Transfer Media between the voip and sound node<ms><special>First SofaSwitch worker (python)<ms>self.voipNode<ms><special>Second SofaSwitch worker (python)<ms>self.soundNode<ms><special> <B><Shape>20<B>312<B>286<B> extra <special>Tool Tip<ms>Death<ms><special> <B><Shape>2<B>263<B>551<B> extra <special>Tool Tip<ms>End Processing<ms><special> <B><Shape>10<B>99<B>268<B> extra <special>Tool Tip<ms>report we have a voip node<ms><special>Python Code<ms>print "Have a new voip node on ", self.voipNode<ms><special> <B><Shape>19<B>226<B>667<B> extra <special>Tool Tip<ms>Send Dtmf to the voip node<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>14<B>589<B>280<B> extra <special>Tool Tip<ms>Test timer on request of sound<ms><special>Event sought (Python code)<ms><ms><special>Event sought (Regular Exp)<ms>requestsound<ms><special>Python variable: source of the event<ms>self.eventSource<ms><special>Python variable: name of the event<ms>self.eventName<ms><special>Python variable: generated data<ms>self.eventData<ms><special> <B><Shape>13<B>189<B>250<B> extra <special>Tool Tip<ms>Stop Timer on the request for a sound node<ms><special>Timer to stop<ms>requestsound<ms><special> <B><Shape>14<B>310<B>232<B> extra <special>Tool Tip<ms>Wait for timer, which
+indicates end everything<ms><special>Event sought (Python code)<ms><ms><special>Event sought (Regular Exp)<ms>endeverything<ms><special>Python variable: source of the event<ms>self.eventSource<ms><special>Python variable: name of the event<ms>self.eventName<ms><special>Python variable: generated data<ms>self.eventData<ms><special> <B><Shape>2<B>445<B>470<B> extra <special>Tool Tip<ms>End Processing<ms><special> <B><Shape>14<B>235<B>528<B> extra <special>Tool Tip<ms>Wait for voip call to end<ms><special>Event sought (Python code)<ms><ms><special>Event sought (Regular Exp)<ms>Terminating<ms><special>Python variable: source of the event<ms>self.eventSource<ms><special>Python variable: name of the event<ms>self.eventName<ms><special>Python variable: generated data<ms>self.eventData<ms><special> <B><Shape>9<B>190<B>573<B>190,573,246,621,251,667<special>Tool Tip<ms>Join blocks shape<ms><special> <B><Shape>7<B>447<B>383<B> extra <special>Tool Tip<ms>End Call<ms><special>Worker node to activate (python code)<ms>self.voipNode<ms><special> <B><Shape>11<B>88<B>95<B> extra <special>Tool Tip<ms>Request voip 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>22<B>97<B>52<B> extra <special>Tool Tip<ms>Register for events from voip node<ms><special>Node to receive events from (Python code)<ms>"voip"<ms><special> <B><Shape>1<B>88<B>9<B> extra <special>Tool Tip<ms>Start Processing<ms><special> <B><Shape>14<B>153<B>505<B> extra <special>Tool Tip<ms>Wait for DTMF data<ms><special>Event sought (Python code)<ms><ms><special>Event sought (Regular Exp)<ms>DTMF<ms><special>Python variable: source of the event<ms>self.eventSource<ms><special>Python variable: name of the event<ms>self.eventName<ms><special>Python variable: generated data<ms>self.dtmfData<ms><special> <B><Shape>15<B>448<B>338<B> extra <special>Tool Tip<ms>Make sound node
+talk to itself<ms><special>First SofaSwitch worker (python)<ms>"sound"<ms><special>Second SofaSwitch worker (python)<ms>"sound"<ms><special> <B><Shape>9<B>250<B>229<B>250,229,325,229<special>Tool Tip<ms>Join blocks shape<ms><special> <B><Shape>9<B>360<B>254<B>360,254,567,254<special>Tool Tip<ms>Join blocks shape<ms><special> <B><Shape>9<B>166<B>354<B>215,354,166,357<special>Tool Tip<ms>Join blocks shape<ms><special> <B><Shape>9<B>115<B>328<B>115,328,166,357<special>Tool Tip<ms>Join blocks shape<ms><special> <B><Shape>9<B>473<B>330<B>602,330,473,338<special>Tool Tip<ms>Join blocks shape<ms><special> <B><Shape>12<B>446<B>426<B> extra <special>Tool Tip<ms>Timer which initates a shutdown, after some tidyup
+ messages etc have been sent.<ms><special>Timer period (seconds, Python code)<ms>1<ms><special>Timer label (Python code)<ms>"endeverything"<ms><special> <B><Shape>9<B>248<B>325<B>248,578,380,580,384,325,473,338<special>Tool Tip<ms>Join blocks shape<ms><special> <B><Shape>9<B>165<B>598<B>165,598,174,660<special>Tool Tip<ms>Join blocks shape<ms><special> <B><Shape>6<B>141<B>406<B> extra <special>Tool Tip<ms>Make Call to a remote entity<ms><special>Worker node to activate (python code)<ms>self.voipNode<ms><special>Call destination (python code)<ms>self.scriptArgs<ms><special> <B><Shape>9<B>473<B>306<B>565,306,473,338<special>Tool Tip<ms>Join blocks shape<ms><special> <B><Shape>9<B>191<B>382<B>191,382,237,383<special>Tool Tip<ms>Join blocks shape<ms><special> <B><Shape>10<B>199<B>294<B> extra <special>Tool Tip<ms>report we have a sound node<ms><special>Python Code<ms>print " have a sound node of ", self.soundNode<ms><special> <B><Shape>11<B>90<B>139<B> extra <special>Tool Tip<ms>Request sound 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>2<B>616<B>300<B> extra <special>Tool Tip<ms>End Processing<ms><special> <B><Shape>2<B>212<B>383<B> extra <special>Tool Tip<ms>End Processing<ms><special> <B><Shape>5<B>141<B>357<B> extra <special>Tool Tip<ms>TEST: have a sound and voip node.<ms><special>Test (Python code)<ms>(self.voipNode != None) and (self.soundNode != None)<ms><special> <B><Shape>2<B>228<B>712<B> extra <special>Tool Tip<ms>End Processing<ms><special> <B><Shape>
1
0
18 May '07
Author: derek
Date: Thu May 17 22:25:36 2007
New Revision: 259
Added:
sofaswitch/trunk/callflow/src/masternode.cpp
sofaswitch/trunk/callflow/src/masternode.h
Log:
Put these files in, which handle the case when the controller
wants to receive events from a remote sofa node.
Added: sofaswitch/trunk/callflow/src/masternode.cpp
==============================================================================
--- (empty file)
+++ sofaswitch/trunk/callflow/src/masternode.cpp Thu May 17 22:25:36 2007
@@ -0,0 +1,96 @@
+#include "wx/wxprec.h"
+
+#ifdef __BORLANDC__
+#pragma hdrstop
+#endif
+
+
+#ifndef WX_PRECOMP
+#include "wx/wx.h"
+#endif
+#include <wx/textfile.h>
+#include <wx/tokenzr.h>
+#include "shapelist.h"
+
+
+#include "masternode.h"
+#include "bitmaps/masternode.xpm"
+
+/////////////////////////////////////////////////////////////////////////////
+DndShapeMasterNode::DndShapeMasterNode()
+ : DndShape(MasterNode)
+{
+ wxSize newSize(30, 40);
+ SetSize(newSize);
+
+ relInputPoints.Add(16, 0);
+ relOutputPoints.Add(16, 40);
+
+ displayData[0] = InformationSection(wxT("Tool Tip"), "Register for events from voip2");
+
+ displayData[displayData.size()] =
+ InformationSection(wxT("Node to receive events from (Python code)"), wxT("\"voip2\""));
+
+ AdjustIoPoints();
+}
+
+void DndShapeMasterNode::Draw(wxDC& dc)
+{
+ DrawCompileError(dc);
+ dc.SetBrush(wxBrush(*wxBLACK, wxSOLID));
+ dc.SetPen(*wxBLACK_PEN);
+
+ wxPoint p1(m_rect.GetPosition());
+ wxPoint pA(p1.x + 16, p1.y + 12);
+ wxPoint pB(p1.x + 16, p1.y + 0);
+ wxPoint pC(p1.x + 16, p1.y + 50);
+ wxPoint pD(p1.x + 16, p1.y + 36);
+
+ DrawArrow(dc, pA, ArrowDown, InputPointConnected(0) ? Connected : Loose);
+ DrawArrow(dc, pC, ArrowDown, OutputPointConnected(0) ? Connected : Loose);
+ dc.DrawLine(pA, pB);
+ dc.DrawLine(pD, pC);
+
+ dc.DrawBitmap(masternode_xpm, p1.x + 6, p1.y + 15, true);
+
+ DndShape::Draw(dc);
+}
+
+bool DndShapeMasterNode::WriteSystemCode(wxTextFile & file)
+{
+ file.AddLine(" def Master_Node(self, sTuple): ");
+ file.AddLine(" a,b,c = sTuple ");
+ file.AddLine(" try: ");
+ file.AddLine(" mesg = eval(self.data[a][\"Master Node Code\"]) ");
+ file.AddLine(" mesg = mesg + \":reporttome\" + \"\\0\" ");
+ file.AddLine(" self.transport.write(mesg) ");
+ file.AddLine(" except: ");
+ file.AddLine(" print \"target for Master Node \", self.data[a][\"Master Node Code\"], \" could not be parsed\" ");
+ file.AddLine(" return self.data[a][\"Output\"] ");
+ file.AddLine("");
+
+ return true;
+}
+
+bool DndShapeMasterNode::WriteThisShapeInfo(wxTextFile & file)
+{
+ file.AddLine(wxString::Format(" \"%s\" : { ", GetKey().c_str()));
+
+ wxNode *inputNode = (wxNode *)GetInputPoints().GetFirst();
+ const wxString & inputLabel = ((LabelledPoint *)inputNode->GetData())->GetFullLabel();
+ file.AddLine(wxString::Format(" \"Input\" : "));
+ file.AddLine(wxString::Format(" %s, ", inputLabel.c_str()));
+
+ wxNode *outputNode = (wxNode *)GetOutputPoints().GetFirst();
+ const wxString & outputLabel = ((LabelledPoint *)outputNode->GetData())->GetFullLabel();
+ file.AddLine(wxString::Format(" \"Output\" : "));
+ file.AddLine(wxString::Format(" %s, ", outputLabel.c_str()));
+
+ file.AddLine(wxString::Format(" \"Master Node Code\" : "));
+ wxString dest = ProtectString(displayData[1].data);
+ file.AddLine(wxString::Format(" \"%s\", ", dest.c_str()));
+
+ file.AddLine(wxString::Format(" },"));
+
+ return true;
+}
Added: sofaswitch/trunk/callflow/src/masternode.h
==============================================================================
--- (empty file)
+++ sofaswitch/trunk/callflow/src/masternode.h Thu May 17 22:25:36 2007
@@ -0,0 +1,36 @@
+#ifndef SHAPE_MASTER_NODE_H
+
+#define SHAPE_MASTER_NODE_H
+
+#include "dnd.h"
+
+//////////////////////////////////////////////////////////////////////////
+/**Define a shape to indicate this controller should receive event info
+ */
+class DndShapeMasterNode : public DndShape
+{
+public:
+ /**Construtor, Define this shape in terms of size and points etc */
+ DndShapeMasterNode();
+
+ /**Destroy this shape, and log it */
+ virtual ~DndShapeMasterNode()
+ {
+ }
+
+ /**Draw this particular shape to the screen..*/
+ virtual void Draw(wxDC& dc);
+
+ /** Used to report the name of this particular class. */
+ static wxString GetKindName() { return wxString("Master Node"); }
+
+ /**Write the code generic to this MasterNode code shape */
+ virtual bool WriteSystemCode(wxTextFile & file);
+
+ /**Write the dictionary containing relevant points for this shape */
+ virtual bool WriteThisShapeInfo(wxTextFile & file);
+};
+
+
+#endif // SHAPE_SEND_MESSAGE_H
+
1
0
[Sofaswitch-svn] [commit] r258 - in sofaswitch/trunk/callflow: bitmaps src tests
by SofaSWITCH SVN 17 May '07
by SofaSWITCH SVN 17 May '07
17 May '07
Author: derek
Date: Thu May 17 19:45:54 2007
New Revision: 258
Modified:
sofaswitch/trunk/callflow/bitmaps/AcceptCall.png
sofaswitch/trunk/callflow/bitmaps/acceptcall.xpm
sofaswitch/trunk/callflow/src/acceptcall.cpp
sofaswitch/trunk/callflow/src/callflow.cpp
sofaswitch/trunk/callflow/src/callflow.h
sofaswitch/trunk/callflow/src/callstartstop.cpp
sofaswitch/trunk/callflow/src/shapelist.cpp
sofaswitch/trunk/callflow/tests/makevoipcall.src
sofaswitch/trunk/callflow/tests/recordincomingvoip.src
Log:
tidyups for callflow utility. Get widgets to work correctly.
Add option handling to generated python script, with help options.
Add multiple toolbars to main window, which displays all options nicely.
MakeVoipCall diagram now responds to voip node termination, and uses
command line option in making a call.
Modified: sofaswitch/trunk/callflow/bitmaps/AcceptCall.png
==============================================================================
Binary files. No diff available.
Modified: sofaswitch/trunk/callflow/bitmaps/acceptcall.xpm
==============================================================================
--- sofaswitch/trunk/callflow/bitmaps/acceptcall.xpm (original)
+++ sofaswitch/trunk/callflow/bitmaps/acceptcall.xpm Thu May 17 19:45:54 2007
@@ -1,12 +1,12 @@
/* XPM */
static char *acceptcall_xpm[]={
"32 32 6 1",
-"d c None",
". c None",
"# c #000000",
-"b c #00c0c0",
+"d c #00c0c0",
"c c #00ff00",
"a c #585858",
+"b c #ffff00",
"................................",
"................###.............",
"..............##a.a##...........",
@@ -14,28 +14,28 @@
"..........##a..a.a..aa.##.......",
".......###.a.aa.a.a.a.a..##.....",
".....##..a..a..####..a.aa.a##...",
-"...##.aaa.a.###....##a.a.aa.a##.",
-"###.aa.a####bb.......##a.a.aaa.#",
-".###.###bbbb.........bb##.a.a..#",
-"....#bbbb.............bbb##..a#.",
-"...bbb.#cccc.aaaa..accccccb###..",
-"..bbb.ccca#ccc##a..cc#a..ccbb...",
-".....cc##a#..c#a#..#aaa...cbb...",
-".....c.##a#..cc##..###a...c.....",
-".......##a#..ccaa..aaaa..cc.....",
-"............cc...........c......",
-"...........cc..........ccc......",
-".......a##cc.aaaa..a#ccc........",
-".......cccc..a###..a#cc.........",
-".......cca#..aaaa..aacc.........",
-".......ccaa..###a..a#cc.........",
-".......cca#..aaaa..aacc.........",
-".......cc............ccd........",
-".......cc............ccd........",
-".......ccaa..aaaa..aaccd........",
-".......cc#a..a##a..a#cc.........",
-".......cca#..aaaa..aacc.........",
-".....ddddddddddddddddddd........",
-"......dddddddddddddddddd........",
-".......cc............cc.........",
-".......cc............cc........."};
+"...##.abbba.###....##abb.aa.a##.",
+"###.aabbcbb#dd......bbbbbb.aaa.#",
+".###.bbcccbb......bbbccccba.a..#",
+"....#bccccccb....bbccccccbb..a#.",
+"...dbbcccbbcbbaaabcccbbbbcb###..",
+"..dbbcccbabbccb#bbccbba.bcbdd...",
+"...bcccb#a#bbcba#bbbbaa.bcbbd...",
+"..bccbb##a#.bcb##..###abbccb....",
+"..bccb.##a#bccbaa..aaaabccbb....",
+"..bbb.....bcccb.......bbccb.....",
+".........bcccb.......bbccbb.....",
+"......bbbcccbaaaa..bbbcccb......",
+"......bccccb.a###..bccccb.......",
+"......bccccb.aaaa..bccccb.......",
+"......bccccb.###a..bccccb.......",
+"......bccccb.aaaa..bccccb.......",
+"......bccccb.......bccccb.......",
+"......bccccb.......bccccb.......",
+"......bccccb.aaaa..bccccb.......",
+"......bccccb.a##a..bccccb.......",
+"......bccccb.aaaa..bccccb.......",
+"......bbbbbb.......bbbbbb.......",
+"......bccccb.......bccccb.......",
+"......bccccb.......bccccb.......",
+"......bbbbbb.......bbbbbb......."};
Modified: sofaswitch/trunk/callflow/src/acceptcall.cpp
==============================================================================
--- sofaswitch/trunk/callflow/src/acceptcall.cpp (original)
+++ sofaswitch/trunk/callflow/src/acceptcall.cpp Thu May 17 19:45:54 2007
@@ -21,10 +21,10 @@
: DndShapeCallStartStop(AcceptCall)
{
displayData[0] =
- InformationSection(wxT("Accept incoming voip call at node voip1"), wxT("\"yes\""));
+ InformationSection(wxT("Tool tip"), wxT("\"Accept incoming voip call at sofa node \"voip1\""));
displayData[1] =
- InformationSection(wxT("SofaSwitch node to advise as to accepting the call"), wxT("\"voip1\""));
+ InformationSection(wxT("SofaSwitch node to advise as to accepting the call (Python code)"), wxT("\"voip1\""));
displayData[displayData.size()] =
InformationSection(wxT("Answer call yes or no (Python code)"), wxT("\"yes\""));
Modified: sofaswitch/trunk/callflow/src/callflow.cpp
==============================================================================
--- sofaswitch/trunk/callflow/src/callflow.cpp (original)
+++ sofaswitch/trunk/callflow/src/callflow.cpp Thu May 17 19:45:54 2007
@@ -73,6 +73,7 @@
#include "callflow.h"
BEGIN_EVENT_TABLE(MyFrame, wxFrame)
+ EVT_SIZE(MyFrame::OnSize)
EVT_MENU ( wxH_CONTROLSCOMPILE, MyFrame::OnCompile)
EVT_MENU ( wxH_CONTROLSCONNECT_OBJECTS, MyFrame::OnControlsConnectObjects)
EVT_MENU ( wxH_CONTROLSDEATH, MyFrame::OnControlsDeath)
@@ -142,7 +143,7 @@
canvas = new MyCanvas(this);
// menu setup goes here
-
+ tbarVertical = NULL;
wxMenu * Edit_menu = new wxMenu ;
wxMenu * Help_menu = new wxMenu ;
wxMenu * Controls_menu = new wxMenu ;
@@ -188,8 +189,8 @@
menuBar->Append (Controls_menu, wxT("&Controls") );
menuBar->Append (Help_menu, wxT("Help") );
SetMenuBar (menuBar);
- CreateToolBar(wxNO_BORDER | wxTB_FLAT | wxTB_HORIZONTAL);
- InitToolBar(GetToolBar());
+
+ BuildToolBars();
CreateStatusBar();
SetStatusText(" Welcome to Call Flow. ");
@@ -310,26 +311,8 @@
Close();
}
-
-void MyFrame::InitToolBar(wxToolBar* toolBar)
+void MyFrame::InitToolBarOne(wxToolBar* toolBar)
{
- toolBar->SetToolSeparation(2);
- toolBar->AddTool(wxH_FILENEW, wxBitmap ( FileNew_xpm ), wxT("Start over - create a new diagram"));
- toolBar->AddTool(wxH_FILEOPEN, wxBitmap ( FileOpen_xpm ), wxT("open a file"));
- toolBar->AddTool(wxH_FILESAVE, wxBitmap ( FileSave_xpm ), wxT("Save to the current file"));
- toolBar->AddTool(wxH_FILESAVE__AS, wxBitmap ( FileSave_As_xpm ), wxT("Save to the file you specify"));
- toolBar->AddTool(wxH_FILEE_XIT, wxBitmap ( FileE_xit_xpm ), wxT("End this program now"));
- toolBar->AddTool(wxH_CONTROLSCOMPILE, wxBitmap ( compile_xpm ), wxT("Compile to code"));
-
- toolBar->AddSeparator() ;
-
- toolBar->AddTool(wxH_EDITCUT, wxBitmap ( EditCut_xpm ), wxT(""));
- toolBar->AddTool(wxH_EDITPASTE, wxBitmap ( EditPaste_xpm ),
- wxT("Copy current clipboard contents to screen"));
- toolBar->AddTool(wxH_EDITCOPY, wxBitmap ( EditCopy_xpm ), wxT("Copy selected shape to clipboard "));
-
- 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"));
@@ -353,12 +336,81 @@
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->Realize();
+}
+
+void MyFrame::InitToolBarTwo(wxToolBar * toolBar)
+{
+ toolBar->SetToolPacking(0);
+ toolBar->SetMargins(0,0);
+ toolBar->SetToolSeparation(0);
+ toolBar->AddTool(wxH_FILENEW, wxBitmap ( FileNew_xpm ), wxT("Start over - create a new diagram"));
+ toolBar->AddTool(wxH_FILEOPEN, wxBitmap ( FileOpen_xpm ), wxT("open a file"));
+ toolBar->AddTool(wxH_FILESAVE, wxBitmap ( FileSave_xpm ), wxT("Save to the current file"));
+ toolBar->AddTool(wxH_FILESAVE__AS, wxBitmap ( FileSave_As_xpm ), wxT("Save to the file you specify"));
+ toolBar->AddTool(wxH_FILEE_XIT, wxBitmap ( FileE_xit_xpm ), wxT("End this program now"));
+ toolBar->AddTool(wxH_CONTROLSCOMPILE, wxBitmap ( compile_xpm ), wxT("Compile to code"));
+
+ toolBar->AddSeparator() ;
+
+ toolBar->AddTool(wxH_EDITCUT, wxBitmap ( EditCut_xpm ), wxT(""));
+ toolBar->AddTool(wxH_EDITPASTE, wxBitmap ( EditPaste_xpm ),
+ wxT("Copy current clipboard contents to screen"));
+ toolBar->AddTool(wxH_EDITCOPY, wxBitmap ( EditCopy_xpm ), wxT("Copy selected shape to clipboard "));
+
+ toolBar->AddSeparator() ;
+
toolBar->AddSeparator() ;
toolBar->AddTool(wxH_HELPMANUAL, wxBitmap ( HelpManual_xpm ), wxT("help on using this program"));
toolBar->AddTool(wxH_HELPABOUT, wxBitmap ( HelpAbout ), wxT("Author name etc"));
+
toolBar->Realize();
-}
+}
+
+void MyFrame::BuildToolBars()
+{
+ long style = wxDEFAULT_FRAME_STYLE;
+ style |= wxTB_HORIZONTAL;
+ style &= ~wxTB_VERTICAL;
+
+ wxToolBar *tbarOne = CreateToolBar();
+ InitToolBarOne(tbarOne);
+
+
+ style = tbarOne->GetWindowStyle();
+ style &= ~wxTB_HORIZONTAL;
+ style |= wxTB_VERTICAL;
+ tbarVertical = new wxToolBar(this, wxID_ANY,
+ wxDefaultPosition, wxDefaultSize,
+ style);
+ InitToolBarTwo(tbarVertical);
+ LayoutChildren();
+}
+
+void MyFrame::LayoutChildren()
+{
+ wxSize size = GetClientSize();
+
+ int offset;
+ if (tbarVertical != NULL) {
+ tbarVertical->SetSize(0, 0, wxDefaultCoord, size.y);
+ offset = tbarVertical->GetSize().x;
+ } else {
+ offset = 0;
+ }
+
+ canvas->SetSize(offset, 0, size.x - offset, size.y);
+}
+
+void MyFrame::OnSize(wxSizeEvent& event)
+{
+ if (tbarVertical != NULL)
+ LayoutChildren();
+ else
+ event.Skip();
+}
void MyFrame::OnControlsstarthere (wxCommandEvent & WXUNUSED(event))
Modified: sofaswitch/trunk/callflow/src/callflow.h
==============================================================================
--- sofaswitch/trunk/callflow/src/callflow.h (original)
+++ sofaswitch/trunk/callflow/src/callflow.h Thu May 17 19:45:54 2007
@@ -92,8 +92,16 @@
void OnFileE_xit (wxCommandEvent & event);
/**Generic method to initialise the tool bar. This will add all our custom icons
- to the tool bar.*/
- void InitToolBar(wxToolBar* toolBar);
+ to the first (horizontal) tool bar.*/
+ void InitToolBarOne(wxToolBar* toolBar);
+
+ /**Generic method to initialise the tool bar. This will add all our custom icons
+ to the second (vertical) tool bar.*/
+ void InitToolBarTwo(wxToolBar* toolBar);
+
+ /**Get the two tool bars (vertical and horizontal) build, filled with widgets, and
+ onto the page */
+ void BuildToolBars();
/**Called in response to a user comand to add a "Start here" widget to the
current graph */
@@ -227,6 +235,11 @@
/**Called in response to a user comand to copy the contents of the
clipboard to the current graph */
void OnEditPaste (wxCommandEvent & event);
+
+ /**Window has been resized. Adjust the vertical toolbar accordingly */
+ void OnSize(wxSizeEvent& event);
+
+
DECLARE_EVENT_TABLE()
public:
@@ -251,6 +264,10 @@
void CloseJoinBlocks();
protected:
+
+ /**get the vertical toolbar to show correct size etc */
+ void LayoutChildren();
+
/**Write a new name to the top of the window - the current file has changed, and
display the new name of the current file on the window */
void SetNewWindowName(wxString & newFileName);
@@ -265,6 +282,9 @@
/**The canvas this window frame gets to write on */
MyCanvas * canvas ;
+
+ /**Pointer to the vertical toolbar, on the left of the screen */
+ wxToolBar *tbarVertical;
};
#endif
Modified: sofaswitch/trunk/callflow/src/callstartstop.cpp
==============================================================================
--- sofaswitch/trunk/callflow/src/callstartstop.cpp (original)
+++ sofaswitch/trunk/callflow/src/callstartstop.cpp Thu May 17 19:45:54 2007
@@ -46,7 +46,19 @@
bool DndShapeCallStartStop::WriteSystemCode(wxTextFile & file)
{
- wxString header = wxString::Format(" def %s(self, sTuple):", (kind == MakeCall ? "Make_Call" : "End_Call"));
+ wxString label;
+ switch(kind) {
+ case MakeCall:
+ label = "Make_Call";
+ break;
+ case EndCall:
+ label = "End_Call";
+ break;
+ case AcceptCall:
+ label = "Accept_Call";
+ break;
+ }
+ wxString header = wxString::Format(" def %s(self, sTuple):", (const char *)label);
file.AddLine(header);
file.AddLine(" a,b,c = sTuple ");
file.AddLine(" try: ");
Modified: sofaswitch/trunk/callflow/src/shapelist.cpp
==============================================================================
--- sofaswitch/trunk/callflow/src/shapelist.cpp (original)
+++ sofaswitch/trunk/callflow/src/shapelist.cpp Thu May 17 19:45:54 2007
@@ -302,10 +302,21 @@
file.AddLine("import distutils ");
file.AddLine("import re ");
file.AddLine("from twisted.internet import reactor, protocol ");
+ file.AddLine("from optparse import OptionParser ");
+ file.AddLine(" ");
+ file.AddLine("usage = \"usage: %prog [-s|--server srv] [-o|--opts opt]\" ");
+ file.AddLine("parser = OptionParser(usage) ");
+ file.AddLine("parser.add_option(\"-s\", \"--server\", dest=\"sofaServer\",");
+ file.AddLine(" help=\"location of the sofa switch message server\", ");
+ file.AddLine(" default=\"localhost\") ");
+ file.AddLine("parser.add_option(\"-o\", \"--opts\", dest=\"scriptArgs\", ");
+ file.AddLine(" help=\"text passed to the running python code, as self.scriptArgs\",");
+ file.AddLine(" default=\"\") ");
+ file.AddLine("(options, args) = parser.parse_args() ");
+ file.AddLine(" ");
+ file.AddLine("sofaServer = options.sofaServer ");
+ file.AddLine("scriptArgs = options.scriptArgs ");
file.AddLine(" ");
- file.AddLine("sofaServer = \"localhost\" ");
- file.AddLine("if len(sys.argv) > 1: ");
- file.AddLine(" sofaServer = sys.argv[1] ");
file.AddLine(" ");
file.AddLine("class Controller(protocol.Protocol): ");
file.AddLine(" \"\"\" The class which holds all the information on how to manage each entity");
@@ -338,6 +349,13 @@
file.AddLine(" \"\"\" ");
file.AddLine(" self.isMaster = newIsMaster ");
file.AddLine(" ");
+ file.AddLine(" def setScriptArgs(self, newScriptArgs): ");
+ file.AddLine(" \"\"\"Pass to the running python code the arguements that");
+ file.AddLine(" were on the command line. This is a feature that enables");
+ file.AddLine(" (for example) one command file to call different hosts.");
+ file.AddLine(" \"\"\" ");
+ file.AddLine(" self.scriptArgs = newScriptArgs ");
+ file.AddLine(" ");
file.AddLine(" def setUserData(self, newData): ");
file.AddLine(" \"\"\"transfer data process, which is required when we ");
file.AddLine(" create a child graph of a parent graph, when we have ");
@@ -617,6 +635,7 @@
file.AddLine(" self.myController.setGraphData(self.myGraphName) ");
file.AddLine(" self.myController.setMaster(self.isMaster) ");
file.AddLine(" self.myController.setUserData(self.userData) ");
+ file.AddLine(" self.myController.setScriptArgs(self.scriptArgs) ");
file.AddLine(" return p ");
file.AddLine(" ");
file.AddLine(" def setGraph(self, newName): ");
@@ -628,9 +647,13 @@
file.AddLine(" def setUserData(self, newData): ");
file.AddLine(" self.userData = newData ");
file.AddLine(" ");
+ file.AddLine(" def setScriptArgs(self, newData): ");
+ file.AddLine(" self.scriptArgs = newData ");
+ file.AddLine(" ");
file.AddLine(" ");
file.AddLine("f = MyFactory() ");
file.AddLine(wxString::Format("f.setGraph(\"%s\") ", graphFileName.c_str()));
+ file.AddLine(wxString::Format("f.setScriptArgs(scriptArgs)") );
file.AddLine("f.setMaster(True) ");
file.AddLine("f.setUserData((None, None)) ");
file.AddLine("reactor.connectTCP(sofaServer, 5000, f) ");
Modified: sofaswitch/trunk/callflow/tests/makevoipcall.src
==============================================================================
--- sofaswitch/trunk/callflow/tests/makevoipcall.src (original)
+++ sofaswitch/trunk/callflow/tests/makevoipcall.src Thu May 17 19:45:54 2007
@@ -1 +1,3 @@
-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>14<B>202<B>158<B> extra <special>Tool Tip<ms>Eventer<ms><special>Event sought (Python code)<ms><ms><special>Event sought (Regular Exp)<ms>voipREQ<ms><special>Python variable: source of the event<ms>self.eventSource<ms><special>Python variable: name of the event<ms>self.eventName<ms><special>Python variable: generated data<ms>self.voipNode<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>13<B>284<B>231<B> extra <special>Tool Tip<ms>Stop Timer<ms><special>Timer to stop<ms>requestsound<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>9<B>464<B>478<B>497,478,495,572,464,578<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>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>2<B>215<B>653<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>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>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>14<B>338<B>210<B> extra <special>Tool Tip<ms>Eventer<ms><special>Event sought (Python code)<ms><ms><special>Event sought (Regular Exp)<ms>hanguptime<ms><special>Python variable: source of the event<ms>self.eventSource<ms><special>Python variable: name of the event<ms>self.eventName<ms><special>Python variable: generated data<ms>self.hanguptime<ms><special> <B><Shape>14<B>412<B>261<B> extra <special>Tool Tip<ms>Did we rceive a sound node in time<ms><special>Event sought (Python code)<ms><ms><special>Event sought (Regular Exp)<ms>requestsound<ms><special>Python variable: source of the event<ms>self.eventSource<ms><special>Python variable: name of the event<ms>self.eventName<ms><special>Python variable: generated data<ms>self.requestSound<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>497<B>330<B>511,330,497,418<special>Tool Tip<ms>Join blocks shape<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>418<B>359<B>421,359,418,448<special>Tool Tip<ms>Join blocks shape<ms><special> <B><Shape>1<B>190<B>19<B> extra <special>Tool Tip<ms>Start Processing<ms><special> <B><Shape>2<B>523<B>304<B> extra <special>Tool Tip<ms>End Processing<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>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>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>9<B>458<B>279<B>458,279,511,279<special>Tool Tip<ms>Join blocks shape<ms><special> <B><Shape>14<B>501<B>279<B> extra <special>Tool Tip<ms>Eventer<ms><special>Event sought (Python code)<ms><ms><special>Event sought (Regular Exp)<ms>voip[0-9]*Terminat<ms><special>Python variable: source of the event<ms>self.eventSource<ms><special>Python variable: name of the event<ms>self.eventName<ms><special>Python variable: generated data<ms>self.eventData<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>14<B>375<B>236<B> extra <special>Tool Tip<ms>A timer - did we receive a voip node before this timer fires<ms><special>Event sought (Python code)<ms><ms><special>Event sought (Regular Exp)<ms>requestvoip<ms><special>Python variable: source of the event<ms>self.eventSource<ms><special>Python variable: name of the event<ms>self.eventName<ms><special>Python variable: generated data<ms>self.requestVoip<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>214<B>353<B>214,353,216,402<special>Tool Tip<ms>Join blocks shape<ms><special> <B><Shape>2<B>425<B>333<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>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>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>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>14<B>204<B>491<B> extra <special>Tool Tip<ms>Eventer<ms><special>Event sought (Python code)<ms><ms><special>Event sought (Regular Exp)<ms>DTMF<ms><special>Python variable: source of the event<ms>self.eventSource<ms><special>Python variable: name of the event<ms>self.eventName<ms><special>Python variable: generated data<ms>self.dtmfData<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>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>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>20<B>336<B>255<B> extra <special>Tool Tip<ms>Death<ms><special> <B><Shape>14<B>297<B>184<B> extra <special>Tool Tip<ms>Eventer<ms><special>Event sought (Python code)<ms><ms><special>Event sought (Regular Exp)<ms>soundREQ<ms><special>Python variable: source of the event<ms>self.eventSource<ms><special>Python variable: name of the event<ms>self.eventName<ms><special>Python variable: generated data<ms>self.soundNode<ms><special> <B><Shape>2<B>438<B>731<B> extra <special>Tool Tip<ms>End Processing<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>216<B>573<B>216,573<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>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>203<B>769<B> extra <special>Tool Tip<ms>End Processing<ms><special> <B><Shape>15<B>423<B>395<B> extra <special>Tool Tip<ms>Make sound node
+talk to itself<ms><special>First SofaSwitch worker (python)<ms>"sound"<ms><special>Second SofaSwitch worker (python)<ms>"sound"<ms><special> <B><Shape>22<B>71<B>65<B> extra <special>Tool Tip<ms>Register for events from voip node<ms><special>Node to receive events from (Python code)<ms>"voip"<ms><special> <B><Shape>2<B>420<B>527<B> extra <special>Tool Tip<ms>End Processing<ms><special> <B><Shape>14<B>77<B>242<B> extra <special>Tool Tip<ms>have a voip node from the voip module<ms><special>Event sought (Python code)<ms><ms><special>Event sought (Regular Exp)<ms>voipREQ<ms><special>Python variable: source of the event<ms>self.eventSource<ms><special>Python variable: name of the event<ms>self.eventName<ms><special>Python variable: generated data<ms>self.voipNode<ms><special> <B><Shape>22<B>71<B>108<B> extra <special>Tool Tip<ms>Register for events from am node<ms><special>Node to receive events from (Python code)<ms>"am"<ms><special> <B><Shape>9<B>130<B>262<B>130,263,190,262<special>Tool Tip<ms>Join blocks shape<ms><special> <B><Shape>20<B>287<B>343<B> extra <special>Tool Tip<ms>Death<ms><special> <B><Shape>9<B>166<B>439<B>166,439,212,440<special>Tool Tip<ms>Join blocks shape<ms><special> <B><Shape>9<B>140<B>391<B>140,655,149,713,369,710,376,391,448,395<special>Tool Tip<ms>Join blocks shape<ms><special> <B><Shape>2<B>591<B>357<B> extra <special>Tool Tip<ms>End Processing<ms><special> <B><Shape>11<B>63<B>152<B> extra <special>Tool Tip<ms>Request voip 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>140<B>655<B>140,655,149,717<special>Tool Tip<ms>Join blocks shape<ms><special> <B><Shape>5<B>115<B>605<B> extra <special>Tool Tip<ms>Test for dtmf data of "9"<ms><special>Test (Python code)<ms>self.dtmfData=="9"<ms><special> <B><Shape>2<B>187<B>440<B> extra <special>Tool Tip<ms>End Processing<ms><special> <B><Shape>11<B>65<B>196<B> extra <special>Tool Tip<ms>Request sound 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>141<B>411<B>190,411,141,414<special>Tool Tip<ms>Join blocks shape<ms><special> <B><Shape>7<B>422<B>440<B> extra <special>Tool Tip<ms>End Call<ms><special>Worker node to activate (python code)<ms>self.voipNode<ms><special> <B><Shape>19<B>201<B>724<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>14<B>564<B>337<B> extra <special>Tool Tip<ms>Test timer on request of sound<ms><special>Event sought (Python code)<ms><ms><special>Event sought (Regular Exp)<ms>requestsound<ms><special>Python variable: source of the event<ms>self.eventSource<ms><special>Python variable: name of the event<ms>self.eventName<ms><special>Python variable: generated data<ms>self.eventData<ms><special> <B><Shape>9<B>448<B>363<B>540,363,448,395<special>Tool Tip<ms>Join blocks shape<ms><special> <B><Shape>10<B>74<B>325<B> extra <special>Tool Tip<ms>report we have a voip node<ms><special>Python Code<ms>print "Have a new voip node on ", self.voipNode<ms><special> <B><Shape>1<B>62<B>24<B> extra <special>Tool Tip<ms>Start Processing<ms><special> <B><Shape>9<B>178<B>584<B>178,584,223,585<special>Tool Tip<ms>Join blocks shape<ms><special> <B><Shape>9<B>223<B>382<B>223,635,355,637,359,382,448,395<special>Tool Tip<ms>Join blocks shape<ms><special> <B><Shape>9<B>165<B>630<B>165,630,221,678,226,724<special>Tool Tip<ms>Join blocks shape<ms><special> <B><Shape>9<B>448<B>387<B>577,387,448,395<special>Tool Tip<ms>Join blocks shape<ms><special> <B><Shape>9<B>90<B>385<B>90,385,141,414<special>Tool Tip<ms>Join blocks shape<ms><special> <B><Shape>14<B>175<B>264<B> extra <special>Tool Tip<ms>wait for arrival of sound node<ms><special>Event sought (Python code)<ms><ms><special>Event sought (Regular Exp)<ms>soundREQ<ms><special>Python variable: source of the event<ms>self.eventSource<ms><special>Python variable: name of the event<ms>self.eventName<ms><special>Python variable: generated data<ms>self.soundNode<ms><special> <B><Shape>10<B>174<B>351<B> extra <special>Tool Tip<ms>report we have a sound node<ms><special>Python Code<ms>print " have a sound node of ", self.soundNode<ms><special> <B><Shape>9<B>225<B>286<B>225,286,300,286<special>Tool Tip<ms>Join blocks shape<ms><special> <B><Shape>6<B>116<B>463<B> extra <special>Tool Tip<ms>Make Call to a remote entity<ms><special>Worker node to activate (python code)<ms>self.voipNode<ms><special>Call destination (python code)<ms>self.scriptArgs<ms><special> <B><Shape>2<B>238<B>608<B> extra <special>Tool Tip<ms>End Processing<ms><special> <B><Shape>15<B>116<B>514<B> extra <special>Tool Tip<ms>Transfer Media between the voip and sound node<ms><special>First SofaSwitch worker (python)<ms>self.voipNode<ms><special>Second SofaSwitch worker (python)<ms>self.soundNode<ms><special> <B><Shape>9<B>335<B>311<B>335,311,542,311<special>Tool Tip<ms>Join blocks shape<ms><special> <B><Shape>13<B>164<B>307<B> extra <special>Tool Tip<ms>Stop Timer on the request for a sound node<ms><special>Timer to stop<ms>requestsound<ms><special> <B><Shape>14<B>527<B>313<B> extra <special>Tool Tip<ms>test timer on request of voip<ms><special>Event sought (Python code)<ms><ms><special>Event sought (Regular Exp)<ms>requestvoip<ms><special>Python variable: source of the event<ms>self.eventSource<ms><special>Python variable: name of the event<ms>self.eventName<ms><special>Python variable: generated data<ms>self.eventData<ms><special> <B><Shape>13<B>65<B>286<B> extra <special>Tool Tip<ms>Stop Timer on the voip request<ms><special>Timer to stop<ms>requestvoip<ms><special> <B><Shape>14<B>210<B>585<B> extra <special>Tool Tip<ms>Wait for voip call to end<ms><special>Event sought (Python code)<ms><ms><special>Event sought (Regular Exp)<ms>Terminating<ms><special>Python variable: source of the event<ms>self.eventSource<ms><special>Python variable: name of the event<ms>self.eventName<ms><special>Python variable: generated data<ms>self.eventData<ms><special> <B><Shape>12<B>421<B>483<B> extra <special>Tool Tip<ms>Timer which initates a shutdown, after some tidyup
+ messages etc have been sent.<ms><special>Timer period (seconds, Python code)<ms>1<ms><special>Timer label (Python code)<ms>"endeverything"<ms><special> <B><Shape>5<B>116<B>414<B> extra <special>Tool Tip<ms>TEST: have a sound and voip node.<ms><special>Test (Python code)<ms>(self.voipNode != None) and (self.soundNode != None)<ms><special> <B><Shape>14<B>285<B>289<B> extra <special>Tool Tip<ms>Eventer<ms><special>Event sought (Python code)<ms><ms><special>Event sought (Regular Exp)<ms>endeverything<ms><special>Python variable: source of the event<ms>self.eventSource<ms><special>Python variable: name of the event<ms>self.eventName<ms><special>Python variable: generated data<ms>self.eventData<ms><special> <B><Shape>14<B>128<B>562<B> extra <special>Tool Tip<ms>Wait for DTMF data<ms><special>Event sought (Python code)<ms><ms><special>Event sought (Regular Exp)<ms>DTMF<ms><special>Python variable: source of the event<ms>self.eventSource<ms><special>Python variable: name of the event<ms>self.eventName<ms><special>Python variable: generated data<ms>self.dtmfData<ms><special> <B><Shape>
Modified: sofaswitch/trunk/callflow/tests/recordincomingvoip.src
==============================================================================
--- sofaswitch/trunk/callflow/tests/recordincomingvoip.src (original)
+++ sofaswitch/trunk/callflow/tests/recordincomingvoip.src Thu May 17 19:45:54 2007
@@ -1,2 +1,3 @@
-7<B>625<B>356<B> extra <special>Tool Tip<ms>End AM node<ms><special>Worker node for termination (python code)<ms>self.amNode<ms><special> <B><Shape>14<B>716<B>313<B> extra <special>Tool Tip<ms>Eventer<ms><special>Event sought (Python code)<ms><ms><special>Event sought (Regular Exp)<ms>hanguptime<ms><special>Python variable: source of the event<ms>self.eventSource<ms><special>Python variable: name of the event<ms>self.eventName<ms><special>Python variable: generated data<ms>self.hanguptime<ms><special> <B><Shape>11<B>239<B>200<B> extra <special>Tool Tip<ms>Request Node from AM module<ms><special>Request node from (Python code)<ms>"am"<ms><special>Timer period (seconds)<ms>1<ms><special>Timer label<ms>requestam<ms><special>Additional information (Python code)<ms><ms><special> <B><Shape>10<B>248<B>301<B> extra <special>Tool Tip<ms>Report - have an am node<ms><special>Python Code<ms>print " have a am node of ", self.amNode<ms><special> <B><Shape>14<B>252<B>93<B> extra <special>Tool Tip<ms>Wait for an incoming voip call<ms><special>Event sought (Python code)<ms><ms><special>Event sought (Regular Exp)<ms>QueryAccept<ms><special>Python variable: source of the event<ms>self.voipNode<ms><special>Python variable: name of the event<ms>self.eventName<ms><special>Python variable: generated data<ms>self.voipData<ms><special> <B><Shape>7<B>625<B>311<B> extra <special>Tool Tip<ms>End voip node<ms><special>Worker node for termination (python code)<ms>self.voipNode<ms><special> <B><Shape>14<B>252<B>252<B> extra <special>Tool Tip<ms>DETECT the AM node to
-connect to the incoming call.<ms><special>Event sought (Python code)<ms><ms><special>Event sought (Regular Exp)<ms>amREQ<ms><special>Python variable: source of the event<ms>self.amMasterNode<ms><special>Python variable: name of the event<ms>self.eventName<ms><special>Python variable: generated data<ms>self.amNode<ms><special> <B><Shape>10<B>248<B>141<B> extra <special>Tool Tip<ms>report: incoming voip call<ms><special>Python Code<ms>print "have received an incoming voip call from ",self.voipNode<ms><special> <B><Shape>9<B>302<B>113<B>302,464,496,466,499,113,644,126<special>Tool Tip<ms>Join blocks shape<ms><special> <B><Shape>2<B>278<B>117<B> extra <special>Tool Tip<ms>End Processing<ms><special> <B><Shape>14<B>252<B>442<B> extra <special>Tool Tip<ms>Eventer<ms><special>Event sought (Python code)<ms><ms><special>Event sought (Regular Exp)<ms>Terminating<ms><special>Python variable: source of the event<ms>self.eventSource<ms><special>Python variable: name of the event<ms>self.eventName<ms><special>Python variable: generated data<ms>self.eventData<ms><special> <B><Shape>9<B>650<B>363<B>650,406,729,363<special>Tool Tip<ms>Join blocks shape<ms><special> <B><Shape>2<B>328<B>282<B> extra <special>Tool Tip<ms>End Processing<ms><special> <B><Shape>9<B>264<B>307<B>264,489,567,497,549,307,646,313<special>Tool Tip<ms>Join blocks shape<ms><special> <B><Shape>21<B>249<B>357<B> extra <special>Tool Tip<ms>accept incoming call.<ms><special>Message to send (Python code)<ms>self.voipNode + ":answer yes"<ms><special> <B><Shape>9<B>166<B>93<B>166,134,265,93<special>Tool Tip<ms>Join blocks shape<ms><special> <B><Shape>2<B>744<B>332<B> extra <special>Tool Tip<ms>End Processing<ms><special> <B><Shape>1<B>141<B>41<B> extra <special>Tool Tip<ms>Start Processing<ms><special> <B><Shape>21<B>249<B>401<B> extra <special>Tool Tip<ms>Send Message<ms><special>Message to send (Python code)<ms>self.voipNode + ":reporttome"<ms><special> <B><Shape>9<B>684<B>288<B>684,288,729,313<special>Tool Tip<ms>Join blocks shape<ms><special> <B><Shape>14<B>634<B>266<B> extra <special>Tool Tip<ms>Wait for hangup of the voip call<ms><special>Event sought (Python code)<ms><ms><special>Event sought (Regular Exp)<ms>hangup<ms><special>Python variable: source of the event<ms>self.eventSource<ms><special>Python variable: name of the event<ms>self.eventName<ms><special>Python variable: generated data<ms>self.hangupdata<ms><special> <B><Shape>17<B>621<B>217<B> extra <special>Tool Tip<ms>Write To File<ms><special>Filename to contain new audio (Python code)<ms>"message.wav"<ms><special>answering machine node<ms>self.amNode<ms><special> <B><Shape>9<B>302<B>274<B>302,274,355,286,355,286<special>Tool Tip<ms>Join blocks shape<ms><special> <B><Shape>20<B>718<B>420<B> extra <special>Tool Tip<ms>Death<ms><special> <B><Shape>21<B>150<B>94<B> extra <special>Tool Tip<ms>Send Message<ms><special>Message to send (Python code)<ms>"voip:reporttome"<ms><special> <B><Shape>16<B>618<B>170<B> extra <special>Tool Tip<ms>Play the instructions<ms><special>Filename to read audio from (Python code)<ms>"../prompts/record.wav"<ms><special>answering machine node (Python code)<ms>self.amNode<ms><special> <B><Shape>15<B>619<B>126<B> extra <special>Tool Tip<ms>Transfer Media<ms><special>First SofaSwitch worker (python)<ms>self.amNode<ms><special>Second SofaSwitch worker (python)<ms>self.voipNode<ms><special> <B><Shape>10<B>713<B>361<B> extra <special>Tool Tip<ms>Python<ms><special>Python Code<ms>print "DEATH NOW."<ms><special> <B><Shape>
+22<B>150<B>94<B> extra <special>Tool Tip<ms>Register for events from voip<ms><special>Node to receive events from (Python code)<ms>"voip"<ms><special> <B><Shape>9<B>684<B>288<B>684,288,729,313<special>Tool Tip<ms>Join blocks shape<ms><special> <B><Shape>9<B>302<B>274<B>302,274,355,286,355,286<special>Tool Tip<ms>Join blocks shape<ms><special> <B><Shape>14<B>634<B>266<B> extra <special>Tool Tip<ms>Wait for hangup of the voip call<ms><special>Event sought (Python code)<ms><ms><special>Event sought (Regular Exp)<ms>hangup<ms><special>Python variable: source of the event<ms>self.eventSource<ms><special>Python variable: name of the event<ms>self.eventName<ms><special>Python variable: generated data<ms>self.hangupdata<ms><special> <B><Shape>22<B>246<B>398<B> extra <special>Tool Tip<ms>Register for events from voip node
+that has just answered the call<ms><special>Node to receive events from (Python code)<ms>self.voipNode<ms><special> <B><Shape>15<B>619<B>126<B> extra <special>Tool Tip<ms>Transfer Media<ms><special>First SofaSwitch worker (python)<ms>self.amNode<ms><special>Second SofaSwitch worker (python)<ms>self.voipNode<ms><special> <B><Shape>7<B>241<B>488<B> extra <special>Tool Tip<ms>End voip node<ms><special>Worker node for termination (python code)<ms>self.voipNode<ms><special> <B><Shape>2<B>278<B>117<B> extra <special>Tool Tip<ms>End Processing<ms><special> <B><Shape>14<B>252<B>252<B> extra <special>Tool Tip<ms>DETECT the AM node to
+connect to the incoming call.<ms><special>Event sought (Python code)<ms><ms><special>Event sought (Regular Exp)<ms>amREQ<ms><special>Python variable: source of the event<ms>self.amMasterNode<ms><special>Python variable: name of the event<ms>self.eventName<ms><special>Python variable: generated data<ms>self.amNode<ms><special> <B><Shape>14<B>252<B>442<B> extra <special>Tool Tip<ms>A node (voip or am) has died<ms><special>Event sought (Python code)<ms><ms><special>Event sought (Regular Exp)<ms>Terminating<ms><special>Python variable: source of the event<ms>self.eventSource<ms><special>Python variable: name of the event<ms>self.eventName<ms><special>Python variable: generated data<ms>self.eventData<ms><special> <B><Shape>2<B>328<B>282<B> extra <special>Tool Tip<ms>End Processing<ms><special> <B><Shape>9<B>266<B>375<B>647,375,605,527,266,488<special>Tool Tip<ms>Join blocks shape<ms><special> <B><Shape>10<B>250<B>586<B> extra <special>Tool Tip<ms>Python<ms><special>Python Code<ms>print "DEATH NOW."<ms><special> <B><Shape>1<B>141<B>41<B> extra <special>Tool Tip<ms>Start Processing<ms><special> <B><Shape>9<B>302<B>113<B>302,464,496,466,499,113,644,126<special>Tool Tip<ms>Join blocks shape<ms><special> <B><Shape>2<B>702<B>313<B> extra <special>Tool Tip<ms>End Processing<ms><special> <B><Shape>9<B>166<B>93<B>166,134,265,93<special>Tool Tip<ms>Join blocks shape<ms><special> <B><Shape>10<B>631<B>315<B> extra <special>Tool Tip<ms>Python<ms><special>Python Code<ms>print "the voip call has ended with ", self.remotePerson<ms><special> <B><Shape>17<B>621<B>217<B> extra <special>Tool Tip<ms>Write To File<ms><special>Filename to contain new audio (Python code)<ms>"message.wav"<ms><special>answering machine node<ms>self.amNode<ms><special> <B><Shape>10<B>248<B>301<B> extra <special>Tool Tip<ms>Report - have an am node<ms><special>Python Code<ms>print " have a am node of ", self.amNode<ms><special> <B><Shape>14<B>252<B>93<B> extra <special>Tool Tip<ms>Wait for an incoming voip call<ms><special>Event sought (Python code)<ms><ms><special>Event sought (Regular Exp)<ms>QueryAccept<ms><special>Python variable: source of the event<ms>self.voipNode<ms><special>Python variable: name of the event<ms>self.eventName<ms><special>Python variable: generated data<ms>self.remotePerson<ms><special> <B><Shape>11<B>239<B>200<B> extra <special>Tool Tip<ms>Request Node from AM module<ms><special>Request node from (Python code)<ms>"am"<ms><special>Timer period (seconds)<ms>1<ms><special>Timer label<ms>requestam<ms><special>Additional information (Python code)<ms><ms><special> <B><Shape>10<B>248<B>141<B> extra <special>Tool Tip<ms>report: incoming voip call<ms><special>Python Code<ms>print "have received an incoming voip call from ",self.remotePerson<ms><special> <B><Shape>16<B>618<B>170<B> extra <special>Tool Tip<ms>Play the instructions<ms><special>Filename to read audio from (Python code)<ms>"../prompts/record.wav"<ms><special>answering machine node (Python code)<ms>self.amNode<ms><special> <B><Shape>7<B>240<B>537<B> extra <special>Tool Tip<ms>End AM node<ms><special>Worker node for termination (python code)<ms>self.amNode<ms><special> <B><Shape>20<B>251<B>637<B> extra <special>Tool Tip<ms>Death<ms><special> <B><Shape>23<B>237<B>354<B> extra <special>Tool tip<ms>Accept incoming voip call at sofa node<ms><special>SofaSwitch node to advise as to accepting the call (Python code)<ms>self.voipNode<ms><special>Answer call yes or no (Python code)<ms>"yes"<ms><special> <B><Shape>
1
0
[Sofaswitch-svn] [commit] r257 - in sofaswitch/trunk/callflow: bitmaps src
by SofaSWITCH SVN 16 May '07
by SofaSWITCH SVN 16 May '07
16 May '07
Author: derek
Date: Wed May 16 01:00:31 2007
New Revision: 257
Added:
sofaswitch/trunk/callflow/src/acceptcall.cpp
sofaswitch/trunk/callflow/src/acceptcall.h
Modified:
sofaswitch/trunk/callflow/bitmaps/acceptcall.xpm
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/callstartstop.cpp
sofaswitch/trunk/callflow/src/dnd.cpp
sofaswitch/trunk/callflow/src/dnd.h
sofaswitch/trunk/callflow/src/drawshape.h
sofaswitch/trunk/callflow/src/makecall.cpp
Log:
Add code to indicate acceptance of an incoming voip/tdm call.
Modified: sofaswitch/trunk/callflow/bitmaps/acceptcall.xpm
==============================================================================
--- sofaswitch/trunk/callflow/bitmaps/acceptcall.xpm (original)
+++ sofaswitch/trunk/callflow/bitmaps/acceptcall.xpm Wed May 16 01:00:31 2007
@@ -1,5 +1,5 @@
/* XPM */
-static char *acceptcall[]={
+static char *acceptcall_xpm[]={
"32 32 6 1",
"d c None",
". c None",
Modified: sofaswitch/trunk/callflow/src/Makefile.am
==============================================================================
--- sofaswitch/trunk/callflow/src/Makefile.am (original)
+++ sofaswitch/trunk/callflow/src/Makefile.am Wed May 16 01:00:31 2007
@@ -2,108 +2,35 @@
bin_PROGRAMS = callflow
-
callflow_LDADD = $(WX_LIBS)
-override CXXFLAGS = @CXXFLAGS@ -I..
+override CXXFLAGS = @CXXFLAGS@ -I.. -I../bitmaps
-callflow_SOURCES = \
- ../bitmaps/ContEnd.xpm \
- ../bitmaps/ContEndFor.xpm \
- ../bitmaps/ContFor.xpm \
- ../bitmaps/ContStart.xpm \
- ../bitmaps/ControlsEndHere.xpm \
- ../bitmaps/ControlsIf.xpm \
- ../bitmaps/Controlsend.xpm \
- ../bitmaps/Controlsend_for.xpm \
- ../bitmaps/Controlsfor.xpm \
- ../bitmaps/Controlsstart.xpm \
- ../bitmaps/EditCopy.xpm \
- ../bitmaps/EditCut.xpm \
- ../bitmaps/EditPaste.xpm \
- ../bitmaps/FileE_xit.xpm \
- ../bitmaps/FileNew.xpm \
- ../bitmaps/FileOpen.xpm \
- ../bitmaps/FileSave.xpm \
- ../bitmaps/FileSave__As.xpm \
- ../bitmaps/HelpAbout.xpm \
- ../bitmaps/HelpManual.xpm \
- ../bitmaps/JoinObjects.xpm \
- ../bitmaps/Python.xpm \
- ../bitmaps/RequestNode.xpm \
- ../bitmaps/compile.xpm \
- ../bitmaps/death.xpm \
- ../bitmaps/endcall.xpm \
- ../bitmaps/eventer.xpm \
- ../bitmaps/makecall.xpm \
- ../bitmaps/miniclock.xpm \
- ../bitmaps/newgraph.xpm \
- ../bitmaps/newshape.xpm \
- ../bitmaps/senddtmf.xpm \
- ../bitmaps/stoptimer.xpm \
- ../bitmaps/readfromfile.xpm \
- ../bitmaps/sendmessage.xpm \
- ../bitmaps/writetofile.xpm \
- ../bitmaps/transfermedia.xpm \
- callflow.cpp \
- callflow.h \
- callstartstop.h \
- callstartstop.cpp \
- canvas.cpp \
- canvas.h \
- conditional.cpp \
- conditional.h \
- death.cpp \
- death.h \
- dnd.cpp \
- dnd.h \
- drawshape.cpp \
- drawshape.h \
- endcall.cpp \
- endcall.h \
- endfor.cpp \
- endfor.h \
- endhere.cpp \
- endhere.h \
- eventer.cpp \
- eventer.h \
- fileio.cpp \
- fileio.h \
- information.cpp \
- information.h \
- joinblocks.cpp \
- joinblocks.h \
- listpoints.cpp \
- listpoints.h \
- loadnewgraph.cpp \
- loadnewgraph.h \
- makecall.cpp \
- makecall.h \
- python.cpp \
- python.h \
- readfromfile.cpp \
- readfromfile.h \
- requestnode.cpp \
- requestnode.h \
- senddtmf.cpp \
- senddtmf.h \
- sendmessage.cpp \
- sendmessage.h \
- shapelist.cpp \
- shapelist.h \
- shapeselect.cpp \
- shapeselect.h \
- startfor.cpp \
- startfor.h \
- starthere.cpp \
- starthere.h \
- stoptimer.cpp \
- stoptimer.h \
- timer.cpp \
- timer.h \
- transfermedia.cpp \
- transfermedia.h \
- writetofile.cpp \
- writetofile.h
+callflow_SOURCES = ../bitmaps/ContEnd.xpm ../bitmaps/ContEndFor.xpm \
+../bitmaps/ContFor.xpm ../bitmaps/ContStart.xpm ../bitmaps/ControlsEndHere.xpm \
+../bitmaps/ControlsIf.xpm ../bitmaps/Controlsend.xpm \
+../bitmaps/Controlsend_for.xpm ../bitmaps/Controlsfor.xpm \
+../bitmaps/Controlsstart.xpm ../bitmaps/EditCopy.xpm ../bitmaps/EditCut.xpm \
+../bitmaps/EditPaste.xpm ../bitmaps/FileE_xit.xpm ../bitmaps/FileNew.xpm \
+../bitmaps/FileOpen.xpm ../bitmaps/FileSave.xpm ../bitmaps/FileSave__As.xpm \
+../bitmaps/HelpAbout.xpm ../bitmaps/HelpManual.xpm ../bitmaps/JoinObjects.xpm \
+../bitmaps/MasterNode.xpm ../bitmaps/Python.xpm ../bitmaps/RequestNode.xpm \
+../bitmaps/acceptcall.xpm ../bitmaps/compile.xpm ../bitmaps/death.xpm \
+../bitmaps/endcall.xpm ../bitmaps/eventer.xpm ../bitmaps/makecall.xpm \
+../bitmaps/miniclock.xpm ../bitmaps/newgraph.xpm ../bitmaps/newshape.xpm \
+../bitmaps/readfromfile.xpm ../bitmaps/senddtmf.xpm ../bitmaps/sendmessage.xpm \
+../bitmaps/stoptimer.xpm ../bitmaps/transfermedia.xpm ../bitmaps/writetofile.xpm \
+acceptcall.cpp acceptcall.h callflow.cpp callflow.h callstartstop.h \
+callstartstop.cpp canvas.cpp canvas.h conditional.cpp conditional.h death.cpp \
+death.h dnd.cpp dnd.h drawshape.cpp drawshape.h endcall.cpp endcall.h endfor.cpp \
+endfor.h endhere.cpp endhere.h eventer.cpp eventer.h fileio.cpp fileio.h \
+information.cpp information.h joinblocks.cpp joinblocks.h listpoints.cpp \
+listpoints.h loadnewgraph.cpp loadnewgraph.h makecall.cpp makecall.h \
+masternode.cpp masternode.h python.cpp python.h readfromfile.cpp readfromfile.h \
+requestnode.cpp requestnode.h senddtmf.cpp senddtmf.h sendmessage.cpp \
+sendmessage.h shapelist.cpp shapelist.h shapeselect.cpp shapeselect.h \
+startfor.cpp startfor.h starthere.cpp starthere.h stoptimer.cpp stoptimer.h \
+timer.cpp timer.h transfermedia.cpp transfermedia.h writetofile.cpp \
+writetofile.h
Modified: sofaswitch/trunk/callflow/src/Makefile.in
==============================================================================
--- sofaswitch/trunk/callflow/src/Makefile.in (original)
+++ sofaswitch/trunk/callflow/src/Makefile.in Wed May 16 01:00:31 2007
@@ -48,12 +48,13 @@
am__installdirs = "$(DESTDIR)$(bindir)"
binPROGRAMS_INSTALL = $(INSTALL_PROGRAM)
PROGRAMS = $(bin_PROGRAMS)
-am_callflow_OBJECTS = callflow.$(OBJEXT) callstartstop.$(OBJEXT) \
- canvas.$(OBJEXT) conditional.$(OBJEXT) death.$(OBJEXT) \
- dnd.$(OBJEXT) drawshape.$(OBJEXT) endcall.$(OBJEXT) \
- endfor.$(OBJEXT) endhere.$(OBJEXT) eventer.$(OBJEXT) \
- fileio.$(OBJEXT) information.$(OBJEXT) joinblocks.$(OBJEXT) \
- listpoints.$(OBJEXT) loadnewgraph.$(OBJEXT) makecall.$(OBJEXT) \
+am_callflow_OBJECTS = acceptcall.$(OBJEXT) callflow.$(OBJEXT) \
+ callstartstop.$(OBJEXT) canvas.$(OBJEXT) conditional.$(OBJEXT) \
+ death.$(OBJEXT) dnd.$(OBJEXT) drawshape.$(OBJEXT) \
+ endcall.$(OBJEXT) endfor.$(OBJEXT) endhere.$(OBJEXT) \
+ eventer.$(OBJEXT) fileio.$(OBJEXT) information.$(OBJEXT) \
+ joinblocks.$(OBJEXT) listpoints.$(OBJEXT) \
+ loadnewgraph.$(OBJEXT) makecall.$(OBJEXT) masternode.$(OBJEXT) \
python.$(OBJEXT) readfromfile.$(OBJEXT) requestnode.$(OBJEXT) \
senddtmf.$(OBJEXT) sendmessage.$(OBJEXT) shapelist.$(OBJEXT) \
shapeselect.$(OBJEXT) startfor.$(OBJEXT) starthere.$(OBJEXT) \
@@ -186,104 +187,32 @@
target_alias = @target_alias@
SUFFIXES = .cpp .rc
callflow_LDADD = $(WX_LIBS)
-callflow_SOURCES = \
- ../bitmaps/ContEnd.xpm \
- ../bitmaps/ContEndFor.xpm \
- ../bitmaps/ContFor.xpm \
- ../bitmaps/ContStart.xpm \
- ../bitmaps/ControlsEndHere.xpm \
- ../bitmaps/ControlsIf.xpm \
- ../bitmaps/Controlsend.xpm \
- ../bitmaps/Controlsend_for.xpm \
- ../bitmaps/Controlsfor.xpm \
- ../bitmaps/Controlsstart.xpm \
- ../bitmaps/EditCopy.xpm \
- ../bitmaps/EditCut.xpm \
- ../bitmaps/EditPaste.xpm \
- ../bitmaps/FileE_xit.xpm \
- ../bitmaps/FileNew.xpm \
- ../bitmaps/FileOpen.xpm \
- ../bitmaps/FileSave.xpm \
- ../bitmaps/FileSave__As.xpm \
- ../bitmaps/HelpAbout.xpm \
- ../bitmaps/HelpManual.xpm \
- ../bitmaps/JoinObjects.xpm \
- ../bitmaps/Python.xpm \
- ../bitmaps/RequestNode.xpm \
- ../bitmaps/compile.xpm \
- ../bitmaps/death.xpm \
- ../bitmaps/endcall.xpm \
- ../bitmaps/eventer.xpm \
- ../bitmaps/makecall.xpm \
- ../bitmaps/miniclock.xpm \
- ../bitmaps/newgraph.xpm \
- ../bitmaps/newshape.xpm \
- ../bitmaps/senddtmf.xpm \
- ../bitmaps/stoptimer.xpm \
- ../bitmaps/readfromfile.xpm \
- ../bitmaps/sendmessage.xpm \
- ../bitmaps/writetofile.xpm \
- ../bitmaps/transfermedia.xpm \
- callflow.cpp \
- callflow.h \
- callstartstop.h \
- callstartstop.cpp \
- canvas.cpp \
- canvas.h \
- conditional.cpp \
- conditional.h \
- death.cpp \
- death.h \
- dnd.cpp \
- dnd.h \
- drawshape.cpp \
- drawshape.h \
- endcall.cpp \
- endcall.h \
- endfor.cpp \
- endfor.h \
- endhere.cpp \
- endhere.h \
- eventer.cpp \
- eventer.h \
- fileio.cpp \
- fileio.h \
- information.cpp \
- information.h \
- joinblocks.cpp \
- joinblocks.h \
- listpoints.cpp \
- listpoints.h \
- loadnewgraph.cpp \
- loadnewgraph.h \
- makecall.cpp \
- makecall.h \
- python.cpp \
- python.h \
- readfromfile.cpp \
- readfromfile.h \
- requestnode.cpp \
- requestnode.h \
- senddtmf.cpp \
- senddtmf.h \
- sendmessage.cpp \
- sendmessage.h \
- shapelist.cpp \
- shapelist.h \
- shapeselect.cpp \
- shapeselect.h \
- startfor.cpp \
- startfor.h \
- starthere.cpp \
- starthere.h \
- stoptimer.cpp \
- stoptimer.h \
- timer.cpp \
- timer.h \
- transfermedia.cpp \
- transfermedia.h \
- writetofile.cpp \
- writetofile.h
+callflow_SOURCES = ../bitmaps/ContEnd.xpm ../bitmaps/ContEndFor.xpm \
+../bitmaps/ContFor.xpm ../bitmaps/ContStart.xpm ../bitmaps/ControlsEndHere.xpm \
+../bitmaps/ControlsIf.xpm ../bitmaps/Controlsend.xpm \
+../bitmaps/Controlsend_for.xpm ../bitmaps/Controlsfor.xpm \
+../bitmaps/Controlsstart.xpm ../bitmaps/EditCopy.xpm ../bitmaps/EditCut.xpm \
+../bitmaps/EditPaste.xpm ../bitmaps/FileE_xit.xpm ../bitmaps/FileNew.xpm \
+../bitmaps/FileOpen.xpm ../bitmaps/FileSave.xpm ../bitmaps/FileSave__As.xpm \
+../bitmaps/HelpAbout.xpm ../bitmaps/HelpManual.xpm ../bitmaps/JoinObjects.xpm \
+../bitmaps/MasterNode.xpm ../bitmaps/Python.xpm ../bitmaps/RequestNode.xpm \
+../bitmaps/acceptcall.xpm ../bitmaps/compile.xpm ../bitmaps/death.xpm \
+../bitmaps/endcall.xpm ../bitmaps/eventer.xpm ../bitmaps/makecall.xpm \
+../bitmaps/miniclock.xpm ../bitmaps/newgraph.xpm ../bitmaps/newshape.xpm \
+../bitmaps/readfromfile.xpm ../bitmaps/senddtmf.xpm ../bitmaps/sendmessage.xpm \
+../bitmaps/stoptimer.xpm ../bitmaps/transfermedia.xpm ../bitmaps/writetofile.xpm \
+acceptcall.cpp acceptcall.h callflow.cpp callflow.h callstartstop.h \
+callstartstop.cpp canvas.cpp canvas.h conditional.cpp conditional.h death.cpp \
+death.h dnd.cpp dnd.h drawshape.cpp drawshape.h endcall.cpp endcall.h endfor.cpp \
+endfor.h endhere.cpp endhere.h eventer.cpp eventer.h fileio.cpp fileio.h \
+information.cpp information.h joinblocks.cpp joinblocks.h listpoints.cpp \
+listpoints.h loadnewgraph.cpp loadnewgraph.h makecall.cpp makecall.h \
+masternode.cpp masternode.h python.cpp python.h readfromfile.cpp readfromfile.h \
+requestnode.cpp requestnode.h senddtmf.cpp senddtmf.h sendmessage.cpp \
+sendmessage.h shapelist.cpp shapelist.h shapeselect.cpp shapeselect.h \
+startfor.cpp startfor.h starthere.cpp starthere.h stoptimer.cpp stoptimer.h \
+timer.cpp timer.h transfermedia.cpp transfermedia.h writetofile.cpp \
+writetofile.h
all: all-am
@@ -356,6 +285,7 @@
distclean-compile:
-rm -f *.tab.c
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/acceptcall.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/callflow.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/callstartstop.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/canvas.Po@am__quote@
@@ -373,6 +303,7 @@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/listpoints.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/loadnewgraph.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/makecall.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/masternode.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/python.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/readfromfile.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/requestnode.Po@am__quote@
@@ -586,7 +517,7 @@
pdf pdf-am ps ps-am tags uninstall uninstall-am \
uninstall-binPROGRAMS uninstall-info-am
-override CXXFLAGS = @CXXFLAGS@ -I..
+override CXXFLAGS = @CXXFLAGS@ -I.. -I../bitmaps
# Tell versions [3.59,3.63) of GNU make to not export all variables.
# Otherwise a system limit (for SysV at least) may be exceeded.
.NOEXPORT:
Added: sofaswitch/trunk/callflow/src/acceptcall.cpp
==============================================================================
--- (empty file)
+++ sofaswitch/trunk/callflow/src/acceptcall.cpp Wed May 16 01:00:31 2007
@@ -0,0 +1,52 @@
+#include "wx/wxprec.h"
+
+#ifdef __BORLANDC__
+#pragma hdrstop
+#endif
+
+
+#ifndef WX_PRECOMP
+#include "wx/wx.h"
+#endif
+#include <wx/textfile.h>
+#include <wx/tokenzr.h>
+#include "shapelist.h"
+
+
+#include "acceptcall.h"
+
+
+/////////////////////////////////////////////////////////////////////////////
+DndShapeAcceptCall::DndShapeAcceptCall()
+ : DndShapeCallStartStop(AcceptCall)
+{
+ displayData[0] =
+ InformationSection(wxT("Accept incoming voip call at node voip1"), wxT("\"yes\""));
+
+ displayData[1] =
+ InformationSection(wxT("SofaSwitch node to advise as to accepting the call"), wxT("\"voip1\""));
+
+ displayData[displayData.size()] =
+ InformationSection(wxT("Answer call yes or no (Python code)"), wxT("\"yes\""));
+}
+
+
+void DndShapeAcceptCall::Draw(wxDC & dc)
+{
+ DndShapeCallStartStop::Draw(dc);
+
+ wxPoint p1(m_rect.GetPosition());
+
+ wxFont f = wxFont(*wxSWISS_FONT);
+ f.SetPointSize(24);
+ dc.SetFont(f);
+ dc.SetPen(*wxGREEN_PEN);
+ dc.SetBrush(wxBrush(*wxGREEN, wxTRANSPARENT));
+
+ wxString text = wxString::Format("? ?");
+ wxCoord w, h;
+ dc.GetTextExtent(text, &w, &h);
+ int xPos = m_rect.x + 25 - (w/2);
+ int yPos = m_rect.y + 20 - (h/2);
+ dc.DrawText(text, xPos, yPos);
+}
Added: sofaswitch/trunk/callflow/src/acceptcall.h
==============================================================================
--- (empty file)
+++ sofaswitch/trunk/callflow/src/acceptcall.h Wed May 16 01:00:31 2007
@@ -0,0 +1,25 @@
+#ifndef ACCEPT_CALL_H
+#define ACCEPT_CALL_H
+
+#include "callstartstop.h"
+
+//////////////////////////////////////////////////////////////////////////////////////////////
+/**Define a create a call shape. Store values for size, location, input & output points.
+ This instance has the ability to draw this shape to a specified location on the canvas */
+class DndShapeAcceptCall : public DndShapeCallStartStop
+{
+public:
+ /**Construtor, Define this shape in terms of size and points etc */
+ DndShapeAcceptCall();
+
+ /**Draw the additional things to indicate we are making a call. Thus, we
+ add graphics to the base image provided by CallStartStop::Draw(wxDC &
+ dc) */
+ void Draw(wxDC & dc);
+
+ /** Used to report the name of this particular class. */
+ static wxString GetKindName() { return wxString("Accept Call"); }
+};
+
+
+#endif // ACCEPT_CALL_H
Modified: sofaswitch/trunk/callflow/src/callflow.cpp
==============================================================================
--- sofaswitch/trunk/callflow/src/callflow.cpp (original)
+++ sofaswitch/trunk/callflow/src/callflow.cpp Wed May 16 01:00:31 2007
@@ -38,19 +38,21 @@
#include "bitmaps/JoinObjects.xpm"
#include "bitmaps/Python.xpm"
#include "bitmaps/RequestNode.xpm"
+#include "bitmaps/acceptcall.xpm"
#include "bitmaps/compile.xpm"
#include "bitmaps/death.xpm"
#include "bitmaps/endcall.xpm"
#include "bitmaps/eventer.xpm"
#include "bitmaps/makecall.xpm"
+#include "bitmaps/masternode.xpm"
#include "bitmaps/miniclock.xpm"
#include "bitmaps/newgraph.xpm"
#include "bitmaps/readfromfile.xpm"
#include "bitmaps/senddtmf.xpm"
+#include "bitmaps/sendmessage.xpm"
#include "bitmaps/stoptimer.xpm"
#include "bitmaps/transfermedia.xpm"
#include "bitmaps/writetofile.xpm"
-#include "bitmaps/sendmessage.xpm"
class MyFrame ;
@@ -81,9 +83,11 @@
EVT_MENU ( wxH_CONTROLSFOR, MyFrame::OnControlsfor)
EVT_MENU ( wxH_CONTROLSIF, MyFrame::OnControlsif)
EVT_MENU ( wxH_CONTROLSLOADNEWGRAPH, MyFrame::OnControlsLoadNewGraph)
+ EVT_MENU ( wxH_CONTROLSACCEPTCALL, MyFrame::OnControlsAcceptCall)
EVT_MENU ( wxH_CONTROLSMAKECALL, MyFrame::OnControlsMakeCall)
EVT_MENU ( wxH_CONTROLSPYTHON, MyFrame::OnControlspython)
EVT_MENU ( wxH_CONTROLSSENDMESSAGE, MyFrame::OnControlsSendMessage)
+ EVT_MENU ( wxH_CONTROLSMASTERNODE, MyFrame::OnControlsMasterNode)
EVT_MENU ( wxH_CONTROLSREQUESTNODE, MyFrame::OnControlsrequestnode)
EVT_MENU ( wxH_CONTROLSSENDDTMF, MyFrame::OnControlsSendDtmf)
EVT_MENU ( wxH_CONTROLSSTARTHERE, MyFrame::OnControlsstarthere)
@@ -157,9 +161,11 @@
Controls_menu -> Append ( wxH_CONTROLSFOR, wxT("for"), wxT(""));
Controls_menu -> Append ( wxH_CONTROLSIF, wxT("if"), wxT(""));
Controls_menu -> Append ( wxH_CONTROLSLOADNEWGRAPH, wxT("load pre-existing compiled graph"), wxT(""));
+ Controls_menu -> Append ( wxH_CONTROLSACCEPTCALL, wxT("accept incoming voip/tdm call"), 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_CONTROLSMASTERNODE, wxT("read events from remote node"), 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(""));
@@ -334,11 +340,13 @@
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_CONTROLSACCEPTCALL, wxBitmap (acceptcall_xpm), wxT("Accept incoming voip/TDM call from an outside entity"));
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_CONTROLSMASTERNODE, wxBitmap ( masternode_xpm ), wxT("collect events from remote sofa node"));
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"));
@@ -436,6 +444,12 @@
canvas->SetEditingMode(MyCanvas::PlaceOneShape);
}
+void MyFrame::OnControlsMasterNode (wxCommandEvent & WXUNUSED(event))
+{
+ imageTypeForPlacing = DndShape::MasterNode;
+ canvas->SetEditingMode(MyCanvas::PlaceOneShape);
+}
+
void MyFrame::OnControlsDeath (wxCommandEvent & WXUNUSED(event))
{
imageTypeForPlacing = DndShape::Death;
@@ -464,14 +478,20 @@
{
imageTypeForPlacing = DndShape::LoadNewGraph;
canvas->SetEditingMode(MyCanvas::PlaceOneShape);
-
}
+
void MyFrame::OnControlsMakeCall (wxCommandEvent & WXUNUSED(event))
{
imageTypeForPlacing = DndShape::MakeCall,
canvas->SetEditingMode(MyCanvas::PlaceOneShape);
}
+void MyFrame::OnControlsAcceptCall (wxCommandEvent & WXUNUSED(event))
+{
+ imageTypeForPlacing = DndShape::AcceptCall,
+ canvas->SetEditingMode(MyCanvas::PlaceOneShape);
+}
+
void MyFrame::OnHelpManual (wxCommandEvent & WXUNUSED(event))
{
Modified: sofaswitch/trunk/callflow/src/callflow.h
==============================================================================
--- sofaswitch/trunk/callflow/src/callflow.h (original)
+++ sofaswitch/trunk/callflow/src/callflow.h Wed May 16 01:00:31 2007
@@ -21,7 +21,9 @@
wxH_CONTROLSFOR,
wxH_CONTROLSIF,
wxH_CONTROLSLOADNEWGRAPH,
+ wxH_CONTROLSACCEPTCALL,
wxH_CONTROLSMAKECALL,
+ wxH_CONTROLSMASTERNODE,
wxH_CONTROLSPYTHON,
wxH_CONTROLSREADFROMFILE,
wxH_CONTROLSREQUESTNODE,
@@ -151,6 +153,15 @@
python code for processing. One such use is print statements.*/
void OnControlspython (wxCommandEvent & event);
+ /**Called in response to a user comand to add a "Master Node" widget to
+ the current graph. This widget allows the user to advise a remote sofa
+ entity that this instance of the controller is the one to send all
+ events/questions to. Thus, on issueing this command a voip node (voip3
+ say), when voip3 terminates, it will advise this controller. On sending
+ this command to "voip", on receiving an incoming call, this controller
+ will be told of the incoming call. */
+ void OnControlsMasterNode (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 */
@@ -184,6 +195,11 @@
the building */
void OnControlsMakeCall(wxCommandEvent & event);
+ /**Called in response to a decision as to if we accept/reject an incoming
+ call. We use this entity to send a message to the remote sofa node that
+ the incoming TDM/voip call is accepted or rejected */
+ void OnControlsAcceptCall(wxCommandEvent & event);
+
/**Called in response to a user comand to add a "Draw Line Segment" widget
to the current graph. The multiple line segment object is used to join
two widgets on the screen */
Modified: sofaswitch/trunk/callflow/src/callstartstop.cpp
==============================================================================
--- sofaswitch/trunk/callflow/src/callstartstop.cpp (original)
+++ sofaswitch/trunk/callflow/src/callstartstop.cpp Wed May 16 01:00:31 2007
@@ -26,13 +26,20 @@
relInputPoints.Add(25, 0);
relOutputPoints.Add(25, 50);
- if (kindToMake == MakeCall)
- displayData[displayData.size()] =
- InformationSection(wxT("Worker node to activate (python code)"), wxT("\"voip1\""));
- else
- displayData[displayData.size()] =
- InformationSection(wxT("Worker node for termination (python code)"), wxT("\"voip1\""));
-
+ switch(kindToMake) {
+ case AcceptCall:
+ displayData[displayData.size()] =
+ InformationSection(wxT("Worker node to inform on call status (python code)"), wxT("\"voip1\""));
+ break;
+ case EndCall:
+ displayData[displayData.size()] =
+ InformationSection(wxT("Worker node for termination (python code)"), wxT("\"voip1\""));
+ break;
+ case MakeCall:
+ displayData[displayData.size()] =
+ InformationSection(wxT("Worker node to activate (python code)"), wxT("\"voip1\""));
+ break;
+ }
AdjustIoPoints();
}
@@ -54,11 +61,26 @@
file.AddLine(" print \"The destination string \", self.data[a][\"call destination\"], \" could not be evaluated as a python string\" ");
file.AddLine(" self.dest = None ");
}
-
- if (kind == MakeCall)
- file.AddLine(" self.rhost += \":CALLNODE \" + self.dest + \"\\0\" ");
- else
- file.AddLine(" self.rhost += \":HANGUP \\0\" ");
+ if (kind == AcceptCall) {
+ file.AddLine(" try: ");
+ file.AddLine(" self.option = eval(self.data[a][\"answer option\"]) ");
+ file.AddLine(" except: ");
+ file.AddLine(" print \"The answer call option string \", self.data[a][\"answer option\"], \" could not be evaluated as a python string\" ");
+ file.AddLine(" self.option = \"No\" ");
+ }
+
+ switch(kind)
+ {
+ case MakeCall:
+ file.AddLine(" self.rhost += \":CALLNODE \" + self.dest + \"\\0\" ");
+ break;
+ case EndCall:
+ file.AddLine(" self.rhost += \":HANGUP \\0\" ");
+ break;
+ case AcceptCall:
+ file.AddLine(" self.rhost += \":Answer \" + self.option + \"\\0\" ");
+ break;
+ }
file.AddLine(" self.transport.write(self.rhost) ");
file.AddLine(" return self.data[a][\"Output\"] ");
file.AddLine(" ");
@@ -80,10 +102,17 @@
wxString dest = ProtectString(displayData[1].data);
file.AddLine(wxString::Format(" \"%s\", ", dest.c_str()));
- if (kind == MakeCall) {
- file.AddLine(wxString::Format(" \"call destination\" : "));
- dest = ProtectString(displayData[2].data);
- file.AddLine(wxString::Format(" \"%s\", ", dest.c_str()));
+ switch(kind) {
+ case AcceptCall:
+ file.AddLine(wxString::Format(" \"answer option\" : "));
+ dest = ProtectString(displayData[2].data);
+ file.AddLine(wxString::Format(" \"%s\", ", dest.c_str()));
+ break;
+ case MakeCall:
+ file.AddLine(wxString::Format(" \"call destination\" : "));
+ dest = ProtectString(displayData[2].data);
+ file.AddLine(wxString::Format(" \"%s\", ", dest.c_str()));
+ break;
}
file.AddLine(wxString::Format(" },"));
Modified: sofaswitch/trunk/callflow/src/dnd.cpp
==============================================================================
--- sofaswitch/trunk/callflow/src/dnd.cpp (original)
+++ sofaswitch/trunk/callflow/src/dnd.cpp Wed May 16 01:00:31 2007
@@ -450,6 +450,12 @@
if (thisKind == SendMessage)
return DndShapeSendMessage::GetKindName();
+ if (thisKind == MasterNode)
+ return DndShapeMasterNode::GetKindName();
+
+ if (thisKind == AcceptCall)
+ return DndShapeAcceptCall::GetKindName();
+
wxString answer = wxString::Format("node kind is %d", thisKind);
return answer;
}
@@ -534,6 +540,7 @@
case None:
printf("Construct a shape of null\n");
return NULL;
+ case AcceptCall: return new DndShapeAcceptCall();
case Conditional: return new DndShapeConditional();
case Death: return new DndShapeDeath();
case EndCall: return new DndShapeEndCall();
@@ -543,18 +550,19 @@
case JoinBlocks: return new DndShapeJoinBlocks();
case LoadNewGraph: return new DndShapeLoadNewGraph();
case MakeCall: return new DndShapeMakeCall();
+ case MasterNode: return new DndShapeMasterNode();
case Python: return new DndShapePython();
case ReadFromFile: return new DndShapeReadFromFile();
case RequestNode: return new DndShapeRequestNode();
case Select: return new DndShapeSelect();
case SendDtmf: return new DndShapeSendDtmf();
+ case SendMessage: return new DndShapeSendMessage();
case StartFor: return new DndShapeStartFor();
case StartHere: return new DndShapeStartHere();
case StopTimer: return new DndShapeStopTimer();
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 May 16 01:00:31 2007
@@ -283,7 +283,9 @@
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 = 22, /*!< Indicates the number of known shapes we can manage */
+ MasterNode = 22, /*!< Identify this controller as the one to receive event etc messages */
+ AcceptCall = 23, /*!< Advise remote sofa node if this TDM/voip call is accepted or not */
+ KnownShapes = 24 /*!< 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 May 16 01:00:31 2007
@@ -1,6 +1,7 @@
#ifndef _drawshape_h
#define _drawshape_h
+#include "acceptcall.h"
#include "conditional.h"
#include "death.h"
#include "endcall.h"
@@ -10,6 +11,7 @@
#include "joinblocks.h"
#include "loadnewgraph.h"
#include "makecall.h"
+#include "masternode.h"
#include "python.h"
#include "readfromfile.h"
#include "requestnode.h"
Modified: sofaswitch/trunk/callflow/src/makecall.cpp
==============================================================================
--- sofaswitch/trunk/callflow/src/makecall.cpp (original)
+++ sofaswitch/trunk/callflow/src/makecall.cpp Wed May 16 01:00:31 2007
@@ -20,7 +20,6 @@
DndShapeMakeCall::DndShapeMakeCall()
: DndShapeCallStartStop(MakeCall)
{
-
displayData[displayData.size()] =
InformationSection(wxT("Call destination (Python code)"), wxT("\"h323:h323.voxgratia.org\""));
}
1
0
16 May '07
Author: derek
Date: Wed May 16 00:00:20 2007
New Revision: 256
Added:
sofaswitch/trunk/callflow/bitmaps/AcceptCall.png (contents, props changed)
sofaswitch/trunk/callflow/bitmaps/acceptcall.xpm
Modified:
sofaswitch/trunk/callflow/bitmaps/masternode.xpm
Log:
Initial release of icons to indicate the acceptance (or not)
of an incoming call.
Added: sofaswitch/trunk/callflow/bitmaps/AcceptCall.png
==============================================================================
Binary file. No diff available.
Added: sofaswitch/trunk/callflow/bitmaps/acceptcall.xpm
==============================================================================
--- (empty file)
+++ sofaswitch/trunk/callflow/bitmaps/acceptcall.xpm Wed May 16 00:00:20 2007
@@ -0,0 +1,41 @@
+/* XPM */
+static char *acceptcall[]={
+"32 32 6 1",
+"d c None",
+". c None",
+"# c #000000",
+"b c #00c0c0",
+"c c #00ff00",
+"a c #585858",
+"................................",
+"................###.............",
+"..............##a.a##...........",
+"............##a..a.a.##.........",
+"..........##a..a.a..aa.##.......",
+".......###.a.aa.a.a.a.a..##.....",
+".....##..a..a..####..a.aa.a##...",
+"...##.aaa.a.###....##a.a.aa.a##.",
+"###.aa.a####bb.......##a.a.aaa.#",
+".###.###bbbb.........bb##.a.a..#",
+"....#bbbb.............bbb##..a#.",
+"...bbb.#cccc.aaaa..accccccb###..",
+"..bbb.ccca#ccc##a..cc#a..ccbb...",
+".....cc##a#..c#a#..#aaa...cbb...",
+".....c.##a#..cc##..###a...c.....",
+".......##a#..ccaa..aaaa..cc.....",
+"............cc...........c......",
+"...........cc..........ccc......",
+".......a##cc.aaaa..a#ccc........",
+".......cccc..a###..a#cc.........",
+".......cca#..aaaa..aacc.........",
+".......ccaa..###a..a#cc.........",
+".......cca#..aaaa..aacc.........",
+".......cc............ccd........",
+".......cc............ccd........",
+".......ccaa..aaaa..aaccd........",
+".......cc#a..a##a..a#cc.........",
+".......cca#..aaaa..aacc.........",
+".....ddddddddddddddddddd........",
+"......dddddddddddddddddd........",
+".......cc............cc.........",
+".......cc............cc........."};
Modified: sofaswitch/trunk/callflow/bitmaps/masternode.xpm
==============================================================================
--- sofaswitch/trunk/callflow/bitmaps/masternode.xpm (original)
+++ sofaswitch/trunk/callflow/bitmaps/masternode.xpm Wed May 16 00:00:20 2007
@@ -1,5 +1,5 @@
/* XPM */
-static char *masternode[] = {
+static char *masternode_xpm[] = {
/* columns rows colors chars-per-pixel */
"22 22 27 1",
" c #9494AD",
1
0
16 May '07
Author: derek
Date: Tue May 15 22:03:45 2007
New Revision: 255
Added:
sofaswitch/trunk/callflow/bitmaps/MasterNode.png (contents, props changed)
sofaswitch/trunk/callflow/bitmaps/masternode.xpm
Log:
Add 2 new images, which indicate that we are the master, to
whom the remote node must refer all questions/events to.
Added: sofaswitch/trunk/callflow/bitmaps/MasterNode.png
==============================================================================
Binary file. No diff available.
Added: sofaswitch/trunk/callflow/bitmaps/masternode.xpm
==============================================================================
--- (empty file)
+++ sofaswitch/trunk/callflow/bitmaps/masternode.xpm Tue May 15 22:03:45 2007
@@ -0,0 +1,55 @@
+/* XPM */
+static char *masternode[] = {
+/* columns rows colors chars-per-pixel */
+"22 22 27 1",
+" c #9494AD",
+". c #ADB3C6",
+"X c #AEB4C7",
+"o c #B0B7C7",
+"O c #B1B8C8",
+"+ c #B2B8C9",
+"@ c #B3B9CA",
+"# c #B4BACB",
+"$ c #B5BBCB",
+"% c #B6BCCC",
+"& c #BBC2D0",
+"* c #DFDFE8",
+"= c #E6E6E6",
+"- c #E0E0E9",
+"; c #E1E1E9",
+": c #E4E4EB",
+"> c #E5E5EC",
+", c #E6E6ED",
+"< c #E7E7EE",
+"1 c #E8E8EE",
+"2 c #EFEFF3",
+"3 c #F0F0F4",
+"4 c #F3F3F6",
+"5 c #F4F4F7",
+"6 c #F7F7F9",
+"7 c gray100",
+"8 c None",
+/* pixels */
+"888888 8888888888",
+"888888 3333 888888888",
+"888888 777733 88888888",
+"888888 3XXXXX 8888888",
+"888888 7333333 8888888",
+"888888 6&$++X. 8888888",
+"888888 621<:-* 8888888",
+"888888 5%#++o. 8888888",
+"888888 41<::-* 8888888",
+"888888 311<+X* 8888888",
+"88888 888888",
+"8888 888888888 88888",
+"888 88888888888 8888",
+" 8888 ",
+" 3333333 8888 7333333 ",
+" 7773383 8888 7333333 ",
+" 6&##oX. 8888 6&##oo. ",
+" 621<:-* 8888 631::-* ",
+" 6%##+o. 8888 5$##+o. ",
+" 31<::-* 8888 511::-* ",
+" 3XXXoX- 8888 3XXX+X* ",
+" 8888 "
+};
1
0
16 May '07
Author: derek
Date: Tue May 15 21:56:46 2007
New Revision: 254
Added:
sofaswitch/trunk/callflow/tests/recordincomingvoip.src
Log:
Handle an incoming voip call (sip, h323 or iax2) by directing it to one node
of an audio machine. Record the incoming audio, and play audio to voip node.
Added: sofaswitch/trunk/callflow/tests/recordincomingvoip.src
==============================================================================
--- (empty file)
+++ sofaswitch/trunk/callflow/tests/recordincomingvoip.src Tue May 15 21:56:46 2007
@@ -0,0 +1,2 @@
+7<B>625<B>356<B> extra <special>Tool Tip<ms>End AM node<ms><special>Worker node for termination (python code)<ms>self.amNode<ms><special> <B><Shape>14<B>716<B>313<B> extra <special>Tool Tip<ms>Eventer<ms><special>Event sought (Python code)<ms><ms><special>Event sought (Regular Exp)<ms>hanguptime<ms><special>Python variable: source of the event<ms>self.eventSource<ms><special>Python variable: name of the event<ms>self.eventName<ms><special>Python variable: generated data<ms>self.hanguptime<ms><special> <B><Shape>11<B>239<B>200<B> extra <special>Tool Tip<ms>Request Node from AM module<ms><special>Request node from (Python code)<ms>"am"<ms><special>Timer period (seconds)<ms>1<ms><special>Timer label<ms>requestam<ms><special>Additional information (Python code)<ms><ms><special> <B><Shape>10<B>248<B>301<B> extra <special>Tool Tip<ms>Report - have an am node<ms><special>Python Code<ms>print " have a am node of ", self.amNode<ms><special> <B><Shape>14<B>252<B>93<B> extra <special>Tool Tip<ms>Wait for an incoming voip call<ms><special>Event sought (Python code)<ms><ms><special>Event sought (Regular Exp)<ms>QueryAccept<ms><special>Python variable: source of the event<ms>self.voipNode<ms><special>Python variable: name of the event<ms>self.eventName<ms><special>Python variable: generated data<ms>self.voipData<ms><special> <B><Shape>7<B>625<B>311<B> extra <special>Tool Tip<ms>End voip node<ms><special>Worker node for termination (python code)<ms>self.voipNode<ms><special> <B><Shape>14<B>252<B>252<B> extra <special>Tool Tip<ms>DETECT the AM node to
+connect to the incoming call.<ms><special>Event sought (Python code)<ms><ms><special>Event sought (Regular Exp)<ms>amREQ<ms><special>Python variable: source of the event<ms>self.amMasterNode<ms><special>Python variable: name of the event<ms>self.eventName<ms><special>Python variable: generated data<ms>self.amNode<ms><special> <B><Shape>10<B>248<B>141<B> extra <special>Tool Tip<ms>report: incoming voip call<ms><special>Python Code<ms>print "have received an incoming voip call from ",self.voipNode<ms><special> <B><Shape>9<B>302<B>113<B>302,464,496,466,499,113,644,126<special>Tool Tip<ms>Join blocks shape<ms><special> <B><Shape>2<B>278<B>117<B> extra <special>Tool Tip<ms>End Processing<ms><special> <B><Shape>14<B>252<B>442<B> extra <special>Tool Tip<ms>Eventer<ms><special>Event sought (Python code)<ms><ms><special>Event sought (Regular Exp)<ms>Terminating<ms><special>Python variable: source of the event<ms>self.eventSource<ms><special>Python variable: name of the event<ms>self.eventName<ms><special>Python variable: generated data<ms>self.eventData<ms><special> <B><Shape>9<B>650<B>363<B>650,406,729,363<special>Tool Tip<ms>Join blocks shape<ms><special> <B><Shape>2<B>328<B>282<B> extra <special>Tool Tip<ms>End Processing<ms><special> <B><Shape>9<B>264<B>307<B>264,489,567,497,549,307,646,313<special>Tool Tip<ms>Join blocks shape<ms><special> <B><Shape>21<B>249<B>357<B> extra <special>Tool Tip<ms>accept incoming call.<ms><special>Message to send (Python code)<ms>self.voipNode + ":answer yes"<ms><special> <B><Shape>9<B>166<B>93<B>166,134,265,93<special>Tool Tip<ms>Join blocks shape<ms><special> <B><Shape>2<B>744<B>332<B> extra <special>Tool Tip<ms>End Processing<ms><special> <B><Shape>1<B>141<B>41<B> extra <special>Tool Tip<ms>Start Processing<ms><special> <B><Shape>21<B>249<B>401<B> extra <special>Tool Tip<ms>Send Message<ms><special>Message to send (Python code)<ms>self.voipNode + ":reporttome"<ms><special> <B><Shape>9<B>684<B>288<B>684,288,729,313<special>Tool Tip<ms>Join blocks shape<ms><special> <B><Shape>14<B>634<B>266<B> extra <special>Tool Tip<ms>Wait for hangup of the voip call<ms><special>Event sought (Python code)<ms><ms><special>Event sought (Regular Exp)<ms>hangup<ms><special>Python variable: source of the event<ms>self.eventSource<ms><special>Python variable: name of the event<ms>self.eventName<ms><special>Python variable: generated data<ms>self.hangupdata<ms><special> <B><Shape>17<B>621<B>217<B> extra <special>Tool Tip<ms>Write To File<ms><special>Filename to contain new audio (Python code)<ms>"message.wav"<ms><special>answering machine node<ms>self.amNode<ms><special> <B><Shape>9<B>302<B>274<B>302,274,355,286,355,286<special>Tool Tip<ms>Join blocks shape<ms><special> <B><Shape>20<B>718<B>420<B> extra <special>Tool Tip<ms>Death<ms><special> <B><Shape>21<B>150<B>94<B> extra <special>Tool Tip<ms>Send Message<ms><special>Message to send (Python code)<ms>"voip:reporttome"<ms><special> <B><Shape>16<B>618<B>170<B> extra <special>Tool Tip<ms>Play the instructions<ms><special>Filename to read audio from (Python code)<ms>"../prompts/record.wav"<ms><special>answering machine node (Python code)<ms>self.amNode<ms><special> <B><Shape>15<B>619<B>126<B> extra <special>Tool Tip<ms>Transfer Media<ms><special>First SofaSwitch worker (python)<ms>self.amNode<ms><special>Second SofaSwitch worker (python)<ms>self.voipNode<ms><special> <B><Shape>10<B>713<B>361<B> extra <special>Tool Tip<ms>Python<ms><special>Python Code<ms>print "DEATH NOW."<ms><special> <B><Shape>
1
0