diff --git a/configure b/configure index c70366dda721fd2a828a7ab27fa67a08d75804da..89b621a5a0b8f36ba8b72bdc97add214231c168f 100755 --- a/configure +++ b/configure @@ -35,7 +35,7 @@ usage () { echo "Options: -prefix DIR Set install prefix -oss Enable OSS support - -alsa Enable ALSA support [Not supported yet] + -alsa Enable ALSA support -macosx Enable MacOSX audio support [Not supported yet]" } @@ -129,7 +129,7 @@ fi # Check for cc++2 dir=`is_in_path bin/ccgnu2-config ${CLASSIC_DIRS}:$CCPPDIR -p` -if [ x"dir" = x"" ] +if [ x"$dir" = x"" ] then echo "I couldn't find bin/ccgnu2-config in the standard dirs. Please edit" echo "this script and set CCPPDIR." @@ -141,7 +141,7 @@ fi # Check for ccRTP (include/ccrtp/rtp.h) dir=`is_in_path include/ccrtp/rtp.h ${CLASSIC_DIRS}:$CCDIR -p` -if [ x"dir" = x"" ] +if [ x"$dir" = x"" ] then echo "I couldn't find ccrtp/rtp.h in the standard dirs. Please edit" echo "this script and set CCRTPDIR." @@ -153,7 +153,7 @@ fi # Check for oSIP (include/osip2/osip.h) dir=`is_in_path include/osip2/osip.h ${CLASSIC_DIRS}:$OSIPDIR -p` -if [ x"dir" = x"" ] +if [ x"$dir" = x"" ] then echo "I couldn't find osip2/osip.h in the standard dirs.Please edit" echo "this script and set OSIPDIR." @@ -165,7 +165,7 @@ fi # Check for eXoSIP (include/eXosip/eXosip.h) dir=`is_in_path include/eXosip/eXosip.h ${CLASSIC_DIRS}:$EXOSIPDIR -p` -if [ x"dir" = x"" ] +if [ x"$dir" = x"" ] then echo "I couldn't find exosip/exosip.h in the standard dirs. Please " echo "edit this script and set EXOSIPDIR." diff --git a/src/Makefile b/src/Makefile index 2590f1e1f2988104ad2a900a068bda76fedd1873..0e2064f80c92c721c75c3a8cc45c5685b7deee57 100644 --- a/src/Makefile +++ b/src/Makefile @@ -19,7 +19,7 @@ METAL_SKINS = metal ifdef ALSA endif - + INCPATH = -I. -I$(QTDIR)/include -I$(CCPPDIR)/include/cc++2 -I$(CCRTPDIR)/include -I$(OSIPDIR)/include -I$(EXOPSIP)/include -I/usr/include -I../gsm CXXFLAGS = -pipe -Wall -W -g -pipe -march=i386 -mcpu=i686 -DQT_NO_DEBUG -DQT_SHARED -DQT_THREAD_SUPPORT -fpermissive -Wno-deprecated $(INCPATH) @@ -29,6 +29,7 @@ LIBS=-L$(QTDIR)/lib -L/usr/X11R6/lib -lqt-mt -lXext -lX11 -lm -L/opt/lib -losip2 EXTRALIBS=../gsm/libgsm.a CONFIGURE_CONF=$(shell ls ../configure.conf) + OBJS = \ audiobuffer.o \ @@ -67,8 +68,8 @@ OBJS = \ volumecontrol.o volumecontrol.moc.o \ stun.o udp.o -#start: check prereq all -start: check all +start: check prereq all +#start: check all check: ifeq ($(CONFIGURE_CONF),../configure.conf) diff --git a/src/audiortp.cpp b/src/audiortp.cpp index 36ce858d1806f15cca15f6ded9719a38cd966717..c2914c6067feb4b094839449c34c5cde7e43bccb 100644 --- a/src/audiortp.cpp +++ b/src/audiortp.cpp @@ -334,13 +334,12 @@ AudioRtpRTX::run (void) { if (countTime < 10 and countTime > 0) { manager->notificationIncomingCall(); } - } - + } + // Write data or notification i = audioDevice->writeBuffer (); delete adu; - - + // Let's wait for the next transmit cycle Thread::sleep(TimerPort::getTimer()); TimerPort::incTimer(frameSize); // 'frameSize' ms diff --git a/src/configurationpanelui.cpp b/src/configurationpanelui.cpp index 56b43f30a12126971b8df300f2b5ea4334706be1..4841a3bc22e863a41a91a81c0eb4803406807755 100644 --- a/src/configurationpanelui.cpp +++ b/src/configurationpanelui.cpp @@ -1,7 +1,7 @@ /**************************************************************************** ** Form implementation generated from reading ui file 'configurationpanel.ui' ** -** Created: Wed Apr 20 14:48:03 2005 +** Created: Mon Apr 25 16:32:28 2005 ** by: The User Interface Compiler ($Id$) ** ** WARNING! All changes made in this file will be lost! diff --git a/src/configurationpanelui.h b/src/configurationpanelui.h index 5e9040333263510d8df36d411a8a7386310da935..62748667753a8ccf69b5d076df406aa0632ee6af 100644 --- a/src/configurationpanelui.h +++ b/src/configurationpanelui.h @@ -1,7 +1,7 @@ /**************************************************************************** ** Form interface generated from reading ui file 'configurationpanel.ui' ** -** Created: Wed Apr 20 14:48:03 2005 +** Created: Mon Apr 25 16:32:28 2005 ** by: The User Interface Compiler ($Id$) ** ** WARNING! All changes made in this file will be lost! diff --git a/src/manager.cpp b/src/manager.cpp index 810fcb6ff1475e66f5f65d5dcf5a74f993f76a57..1792ad7c05178fa6007249c3fec5eae6193a5d72 100644 --- a/src/manager.cpp +++ b/src/manager.cpp @@ -320,11 +320,15 @@ Manager::actionHandle (int lineNumber, int action) { break; case TRANSFER_CALL: - sip->manageActions (lineNumber, TRANSFER_CALL); + if (sip->call[lineNumber] != NULL) { + sip->manageActions (lineNumber, TRANSFER_CALL); + } break; case CANCEL_CALL: - sip->manageActions (lineNumber, CANCEL_CALL); + if (sip->call[lineNumber] != NULL) { + sip->manageActions (lineNumber, CANCEL_CALL); + } break; default: diff --git a/src/phonebookui.cpp b/src/phonebookui.cpp index 453ca1e76c0bfdf6c82a1d80be9e42fff787205f..53db80a2c6051c1b7ecc176cdf119ccc9c2cbe48 100644 --- a/src/phonebookui.cpp +++ b/src/phonebookui.cpp @@ -1,7 +1,7 @@ /**************************************************************************** ** Form implementation generated from reading ui file 'phonebook.ui' ** -** Created: Wed Apr 20 14:48:03 2005 +** Created: Mon Apr 25 16:32:27 2005 ** by: The User Interface Compiler ($Id$) ** ** WARNING! All changes made in this file will be lost! diff --git a/src/phonebookui.h b/src/phonebookui.h index 9aca7ead9e286d5d44c73cf01d440052d85c6e76..1ca0926df2dc0697aa7612fdf6b3c8161491f1d1 100644 --- a/src/phonebookui.h +++ b/src/phonebookui.h @@ -1,7 +1,7 @@ /**************************************************************************** ** Form interface generated from reading ui file 'phonebook.ui' ** -** Created: Wed Apr 20 14:48:03 2005 +** Created: Mon Apr 25 16:32:27 2005 ** by: The User Interface Compiler ($Id$) ** ** WARNING! All changes made in this file will be lost! diff --git a/src/qtGUImainwindow.cpp b/src/qtGUImainwindow.cpp index 6c1b6e2a9c5abc3f7b4832785bdc2053d0723c96..c6887a6134e51251562efda83a35368e49f8e787 100644 --- a/src/qtGUImainwindow.cpp +++ b/src/qtGUImainwindow.cpp @@ -1344,9 +1344,11 @@ QtGUIMainWindow::keyPressEvent(QKeyEvent *e) { break; case Qt::Key_Escape: - lcd->clear(); + hangupLine(); return; - break; + break; + + case Qt::Key_Return: case Qt::Key_Enter: @@ -1363,14 +1365,20 @@ QtGUIMainWindow::keyPressEvent(QKeyEvent *e) { this->toggleLine(e->key() - Qt::Key_F1); return; break; - + + case Qt::Key_L: + if (e->state() == Qt::ControlButton ) { + lcd->clear(); + return; + } + break; case Qt::Key_Q : if (e->state() == Qt::ControlButton ) { emit keyPressed(e->key()); return; } break; - case Qt::Key_L : + case Qt::Key_O : if (e->state() == Qt::ControlButton ) { urlinput->show(); return; diff --git a/src/sip.cpp b/src/sip.cpp index 40f473ea094bdb6ad9161b1340ee0388ffb17e1a..87d215385f1fa9fbec001c3dd5bd913b5766b43d 100644 --- a/src/sip.cpp +++ b/src/sip.cpp @@ -512,24 +512,24 @@ SIP::outgoingInvite (void) { qDebug ("From: %s", from); qDebug ("To: <%s>", to); - // If no SIP proxy setting if (Config::gets("Signalisations", "SIP.sipproxy") == "") { + // If no SIP proxy setting for direct call with only IP address if (startCall(from, to, NULL, NULL) <= 0) { qDebug("SIP: no start call"); return -1; } return 0; + } else { + // If SIP proxy setting + string qroute = "<sip:" + + Config::gets("Signalisations", "SIP.sipproxy") + ";lr>"; + char * route = (char*)qroute.data(); + if (startCall(from, to, NULL, route) <= 0) { + qDebug("SIP: no start call"); + return -1; + } + return 0; } - - string qroute = "<sip:" + Config::gets("Signalisations", "SIP.sipproxy") - + ";lr>"; - char * route = (char*)qroute.data(); - - if (startCall(from, to, NULL, route) <= 0) { - qDebug("SIP: no start call"); - return -1; - } - return 0; } int @@ -570,7 +570,7 @@ SIP::manageActions (int usedLine, int action) { assert (usedLine < NUMBER_OF_LINES); assert (usedLine >= 0); - + bzero (tmpbuf, 64); // Get local port snprintf (tmpbuf, 63, "%d", call[usedLine]->getLocalAudioPort()); diff --git a/src/url_input.ui b/src/url_input.ui index aabca1f2128f0ef14db1e2e5b365a47685fc1a09..f213aa8d942ca95968190b8470e11c394b3ed936 100644 --- a/src/url_input.ui +++ b/src/url_input.ui @@ -17,11 +17,11 @@ </property> <widget class="QPushButton"> <property name="name"> - <cstring>buttonCancel</cstring> + <cstring>buttonOK</cstring> </property> <property name="geometry"> <rect> - <x>228</x> + <x>208</x> <y>-1</y> <width>20</width> <height>23</height> @@ -39,39 +39,23 @@ <height>23</height> </size> </property> + <property name="focusPolicy"> + <enum>StrongFocus</enum> + </property> <property name="text"> - <string>0</string> + <string>1</string> </property> <property name="accel"> <string></string> </property> </widget> - <widget class="QLineEdit"> - <property name="name"> - <cstring>url</cstring> - </property> - <property name="geometry"> - <rect> - <x>-1</x> - <y>0</y> - <width>210</width> - <height>23</height> - </rect> - </property> - <property name="minimumSize"> - <size> - <width>210</width> - <height>0</height> - </size> - </property> - </widget> <widget class="QPushButton"> <property name="name"> - <cstring>buttonOK</cstring> + <cstring>buttonCancel</cstring> </property> <property name="geometry"> <rect> - <x>208</x> + <x>228</x> <y>-1</y> <width>20</width> <height>23</height> @@ -89,13 +73,38 @@ <height>23</height> </size> </property> + <property name="focusPolicy"> + <enum>TabFocus</enum> + </property> <property name="text"> - <string>1</string> + <string>0</string> </property> <property name="accel"> <string></string> </property> </widget> + <widget class="QLineEdit"> + <property name="name"> + <cstring>url</cstring> + </property> + <property name="geometry"> + <rect> + <x>-1</x> + <y>0</y> + <width>210</width> + <height>23</height> + </rect> + </property> + <property name="minimumSize"> + <size> + <width>210</width> + <height>0</height> + </size> + </property> + <property name="focusPolicy"> + <enum>StrongFocus</enum> + </property> + </widget> </widget> <connections> <connection> @@ -108,6 +117,7 @@ <tabstops> <tabstop>url</tabstop> <tabstop>buttonOK</tabstop> + <tabstop>buttonCancel</tabstop> </tabstops> <includes> <include location="local" impldecl="in implementation">url_input.ui.h</include> diff --git a/src/url_inputui.cpp b/src/url_inputui.cpp index a482b1d295972c58b15e63fbc604accb59560ec5..c600016f1ff17b2e3caf4a05ccedadf0fb7b9682 100644 --- a/src/url_inputui.cpp +++ b/src/url_inputui.cpp @@ -1,7 +1,7 @@ /**************************************************************************** ** Form implementation generated from reading ui file 'url_input.ui' ** -** Created: Wed Apr 20 14:48:03 2005 +** Created: Mon Apr 25 16:32:28 2005 ** by: The User Interface Compiler ($Id$) ** ** WARNING! All changes made in this file will be lost! @@ -30,19 +30,22 @@ URL_Input::URL_Input( QWidget* parent, const char* name, bool modal, WFlags fl ) if ( !name ) setName( "URL_Input" ); + buttonOK = new QPushButton( this, "buttonOK" ); + buttonOK->setGeometry( QRect( 208, -1, 20, 23 ) ); + buttonOK->setMinimumSize( QSize( 0, 23 ) ); + buttonOK->setMaximumSize( QSize( 20, 23 ) ); + buttonOK->setFocusPolicy( QPushButton::StrongFocus ); + buttonCancel = new QPushButton( this, "buttonCancel" ); buttonCancel->setGeometry( QRect( 228, -1, 20, 23 ) ); buttonCancel->setMinimumSize( QSize( 0, 23 ) ); buttonCancel->setMaximumSize( QSize( 20, 23 ) ); + buttonCancel->setFocusPolicy( QPushButton::TabFocus ); url = new QLineEdit( this, "url" ); url->setGeometry( QRect( -1, 0, 210, 23 ) ); url->setMinimumSize( QSize( 210, 0 ) ); - - buttonOK = new QPushButton( this, "buttonOK" ); - buttonOK->setGeometry( QRect( 208, -1, 20, 23 ) ); - buttonOK->setMinimumSize( QSize( 0, 23 ) ); - buttonOK->setMaximumSize( QSize( 20, 23 ) ); + url->setFocusPolicy( QLineEdit::StrongFocus ); languageChange(); resize( QSize(250, 21).expandedTo(minimumSizeHint()) ); clearWState( WState_Polished ); @@ -52,6 +55,7 @@ URL_Input::URL_Input( QWidget* parent, const char* name, bool modal, WFlags fl ) // tab order setTabOrder( url, buttonOK ); + setTabOrder( buttonOK, buttonCancel ); } /* @@ -69,9 +73,9 @@ URL_Input::~URL_Input() void URL_Input::languageChange() { setCaption( tr( "URL_Input" ) ); - buttonCancel->setText( tr( "0" ) ); - buttonCancel->setAccel( QKeySequence( QString::null ) ); buttonOK->setText( tr( "1" ) ); buttonOK->setAccel( QKeySequence( QString::null ) ); + buttonCancel->setText( tr( "0" ) ); + buttonCancel->setAccel( QKeySequence( QString::null ) ); } diff --git a/src/url_inputui.h b/src/url_inputui.h index 9b723d719db08ab85bdc10e44d536b5b2cbdb194..afdac80174555bf3659cea78c85b712b86bfdfe5 100644 --- a/src/url_inputui.h +++ b/src/url_inputui.h @@ -1,7 +1,7 @@ /**************************************************************************** ** Form interface generated from reading ui file 'url_input.ui' ** -** Created: Wed Apr 20 14:48:03 2005 +** Created: Mon Apr 25 16:32:27 2005 ** by: The User Interface Compiler ($Id$) ** ** WARNING! All changes made in this file will be lost! @@ -28,9 +28,9 @@ public: URL_Input( QWidget* parent = 0, const char* name = 0, bool modal = FALSE, WFlags fl = 0 ); ~URL_Input(); + QPushButton* buttonOK; QPushButton* buttonCancel; QLineEdit* url; - QPushButton* buttonOK; protected: diff --git a/stund/client b/stund/client index d353e7af34e47b76dfe00870af9faf9e6b4bc06b..3df9eb511fe93a26e2a706ec1b75bc6403c2a36a 100755 Binary files a/stund/client and b/stund/client differ diff --git a/stund/server b/stund/server index d65ff274889bcd355dfde0a3d65ea0cf2adaeb70..13a3a0586404eb0fc6d98fc8950e3cad95be9ba9 100755 Binary files a/stund/server and b/stund/server differ diff --git a/stund/stun.cxx b/stund/stun.cxx index 071ddd40a071ad373361e3cf02b90aefc1082b08..7e2ae421960a5d894153386461847c7bf8f79744 100644 --- a/stund/stun.cxx +++ b/stund/stun.cxx @@ -671,7 +671,7 @@ stunRand() asm("rdtsc" : "=A" (tick)); #elif defined (__SUNPRO_CC) || defined( __sparc__ ) tick = gethrtime(); -#elif defined(__MACH__) +#elif defined(__MACH__) || defined(__powerpc__) int fd=open("/dev/random",O_RDONLY); read(fd,&tick,sizeof(tick)); closesocket(fd);