Commit 540b8fc6 authored by llea's avatar llea

Migrate to eXosip2

parent 8a36aa84
Laurielle LEA (27 July 2005) version 0.4
- Migrate from libeXoSIP 0.9.0 to libeXosip2-1.9.1-pre15
(http://www.antisip.com/download/)
Laurielle LEA (21 July 2005) version 0.4
- Change README.
......
PortAudio: http://portaudio.com/archives/pa_snapshot_v19.tar.gz
Common C++ 2 1.3.6: http://sourceforge.net/projects/cplusplus/
ccRTP 1.3.0: http://sourceforge.net/projects/cplusplus/
libosip 2.2.0: http://savannah.gnu.org/projects/osip/
libeXoSIP 0.9.0: http://savannah.nongnu.org/projects/exosip/
libosip 2.2.1: http://savannah.gnu.org/projects/osip/
libeXosip2-1.9.1-pre14: http://www.antisip.com/download/
......@@ -15,8 +15,8 @@
/* Define to 1 if you have the <dlfcn.h> header file. */
#undef HAVE_DLFCN_H
/* Define to 1 if you have the <eXosip/eXosip.h> header file. */
#undef HAVE_EXOSIP_EXOSIP_H
/* Define to 1 if you have the <eXosip2/eXosip.h> header file. */
#undef HAVE_EXOSIP2_EXOSIP_H
/* Define to 1 if you have the <inttypes.h> header file. */
#undef HAVE_INTTYPES_H
......
......@@ -54,7 +54,7 @@ dnl Checks for header files.
AC_HEADER_STDC
AC_CHECK_HEADERS( \
ostream \
eXosip/eXosip.h \
eXosip2/eXosip.h \
portaudio.h \
)
......@@ -78,11 +78,11 @@ PKG_CHECK_MODULES(libosip2, libosip2 >= ${LIBOSIP2_MIN_VERSION})
SFLPHONE_CXXFLAGS="$SFLPHONE_CXXFLAGS $libosip2_CFLAGS"
SFLPHONE_LIBS="$SFLPHONE_LIBS $libosip2_LIBS"
if test $ac_cv_header_eXosip_eXosip_h = no; then
AC_MSG_ERROR([*** missing eXipsip/eXosip.h. You need a working eXosip installation. See http://savannah.nongnu.org/projects/exosip/])
if test $ac_cv_header_eXosip2_eXosip_h = no; then
AC_MSG_ERROR([*** missing eXosip2/eXosip.h. You need a working eXosip2 installation. See http://www.antisip.com/download/])
fi
libexosip_LIBS="-leXosip "
SFLPHONE_LIBS="$SFLPHONE_LIBS $libexosip_LIBS"
libexosip2_LIBS="-leXosip2 "
SFLPHONE_LIBS="$SFLPHONE_LIBS $libexosip2_LIBS"
AC_SUBST(LIBQT)
......
......@@ -189,6 +189,7 @@ AudioRtpRTX::initAudioRtpSession (void)
setCancel(cancelImmediate);
}
}
_debug("-----------------------\n");
}
void
......
......@@ -707,6 +707,7 @@ QtGUIMainWindow::callIsOnHold(int id, int line, int busyLine)
int
QtGUIMainWindow::callIsIncoming (int id, int line, int busyLine)
{
_TabIncomingCalls[line] = -1;
changeLineStatePixmap(line, BUSY);
putOnHoldBusyLine(busyLine);
if (qt_answerCall(id) != 1) {
......@@ -1218,6 +1219,7 @@ QtGUIMainWindow::hangupLine (void)
Manager::instance().displayErrorText("Hangup call failed !\n");
}
} else if ((i = isThereIncomingCall()) > 0){
_debug("&&&&&&&&&& i = %d\n", i);
// To refuse new incoming call
_debug("Refuse call %d\n", id);
if (qt_refuseCall(i)) {
......
......@@ -286,7 +286,7 @@ private:
inline void setPrevLine(int line) { _prevLine = line; }
inline int getPrevLine(void) { return _prevLine; }
// Array of incoming calls
// Array of incoming calls, contains call-id
int _TabIncomingCalls[NUMBER_OF_LINES];
// The current phoneline
......
This diff is collapsed.
......@@ -22,13 +22,16 @@
#ifndef __SIP_CALL_H__
#define __SIP_CALL_H__
#include <eXosip/eXosip.h>
#include <eXosip2/eXosip.h>
#include <vector>
class CodecDescriptor;
class AudioCodec;
#define NOT_USED 0
#define _SENDRECV 0
#define _SENDONLY 1
#define _RECVONLY 2
using namespace std;
typedef vector<CodecDescriptor*, allocator<CodecDescriptor*> > CodecDescriptorVector;
......@@ -43,9 +46,9 @@ public:
int newIncomingCall (eXosip_event_t *);
int answeredCall (eXosip_event_t *);
void answeredCall_without_hold (eXosip_event_t *);
int ringingCall (eXosip_event_t *);
int onholdCall (eXosip_event_t *);
int offholdCall (eXosip_event_t *);
int receivedAck (eXosip_event_t *);
void setLocalAudioPort (int);
int getLocalAudioPort (void);
......@@ -55,11 +58,15 @@ public:
int getDid (void);
void setCid (int cid);
int getCid (void);
void setTid (int tid);
int getTid (void);
int getRemoteSdpAudioPort (void);
char* getRemoteSdpAudioIp (void);
AudioCodec* getAudioCodec (void);
void setAudioCodec (AudioCodec* ac);
inline char* getRemoteUri (void) { return _remote_uri; }
inline void setStandBy (bool standby) { _standby = standby; }
inline bool getStandBy (void) { return _standby; }
......@@ -67,6 +74,9 @@ private:
void alloc (void);
void dealloc (void);
void noSupportedCodec(void);
int sdp_complete_message(sdp_message_t * remote_sdp, osip_message_t * msg);
int sdp_analyse_attribute (sdp_message_t * sdp, sdp_media_t * med);
CodecDescriptorVector* _cdv;
AudioCodec* _audiocodec;
......@@ -74,6 +84,7 @@ private:
short _id;
int _cid; // call id
int _did; // dialog id
int _tid; // transaction id
bool _standby; // wait for a cid and did when outgoing call is made
int _status_code;
......@@ -88,9 +99,12 @@ private:
char* _remote_sdp_audio_ip;
char* _payload_name;
char* _sdp_body;
int _payload;
int _state;
int _local_audio_port;
int _remote_sdp_audio_port;
int _local_sendrecv; /* _SENDRECV, _SENDONLY, _RECVONLY */
int _remote_sendrecv; /* _SENDRECV, _SENDONLY, _RECVONLY */
};
#endif // __SIP_CALL_H__
This diff is collapsed.
......@@ -20,7 +20,8 @@
#ifndef __SIP_VOIP_LINK_H__
#define __SIP_VOIP_LINK_H__
#include <eXosip/eXosip.h>
#include <eXosip2/eXosip.h>
#include <osipparser2/sdp_message.h>
#include <string>
#include <vector>
......@@ -30,8 +31,12 @@
using namespace std;
#define EXPIRES_VALUE 180
#define INVITE_METHOD "INVITE"
// 1XX responses
#define DIALOG_ESTABLISHED 101
#define RINGING 180
// 2XX
#define OK 200
// 4XX Errors
#define BAD_REQ 400
#define UNAUTHORIZED 401
......@@ -41,6 +46,7 @@ using namespace std;
#define NOT_ACCEPTABLE 406
#define AUTH_REQUIRED 407
#define REQ_TIMEOUT 408
#define UNSUP_MEDIA_TYPE 415
#define TEMP_UNAVAILABLE 480
#define ADDR_INCOMPLETE 484
#define BUSY_HERE 486
......@@ -122,6 +128,21 @@ private:
short findCallId (eXosip_event_t *e);
short findCallIdWhenRinging (void);
bool isInRtpmap (int index, int payload, CodecDescriptorVector* cdv);
/*
* To build sdp with 200 OK when answered call
*/
int sdp_complete_200ok(int did, osip_message_t * answer, int port);
/*
* To build sdp when call is on-hold
*/
int sdp_hold_call (sdp_message_t * sdp);
/*
* To build sdp when call is off-hold
*/
int sdp_off_hold_call (sdp_message_t * sdp);
EventThread* _evThread;
SipCallVector* _sipcallVector;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment