Commit 0460df83 authored by Julien Bonjean's avatar Julien Bonjean

Merge branch 'master' into jbonjean

parents 9ad04e2e c0efa978
......@@ -8,7 +8,7 @@ Standards-Version: 3.7.3
Package: sflphone
Priority: optional
Architecture: any
Depends: libgcc1 , libsamplerate0 (>=0.1.2) , libdbus-glib-1-2 (>= 0.73), libexpat1 , libgtk2.0-0 , libc6 (>= 2.3.6-6) , libglib2.0-0 (>= 2.12.0) , libcommoncpp2-1.6-0 ,libgsm1 (>=1.0.10) , libspeex1 (>=1.1.12) , libdbus-1-3, libdbus-glib-1-2, libsexy2 (>=0.1.11), libcppunit-1.12-0, libasound2 (>= 1.0), libpulse0 (>= 0.9.6), libccrtp1-1.6-0, libnotify1 (>= 0.4), libsexy2 (>= 0.1), perl (>=5.5.8), librsvg2-common (>=2.22.2)
Depends: libgcc1 , libsamplerate0 (>=0.1.2) , libdbus-glib-1-2 (>= 0.73), libexpat1 , libgtk2.0-0 , libc6 (>= 2.3.6-6) , libglib2.0-0 (>= 2.12.0) , libcommoncpp2-1.6-0 ,libgsm1 (>=1.0.10) , libspeex1 (>=1.1.12) , libdbus-1-3, libdbus-glib-1-2, libsexy2 (>=0.1.11), libasound2 (>= 1.0), libpulse0 (>= 0.9.6), libccrtp1-1.6-0, libnotify1 (>= 0.4), libsexy2 (>= 0.1), librsvg2-common (>=2.22.2)
Homepage: http://www.sflphone.org
Description: SIP and IAX2 compatible softphone
SFLphone is meant to be a robust enterprise-class desktop phone.
......
......@@ -8,7 +8,7 @@ Standards-Version: 3.8.0
Package: sflphone
Priority: optional
Architecture: any
Depends: libgcc1 , libsamplerate0 (>=0.1.2) , libdbus-glib-1-2 (>= 0.73), libexpat1 , libgtk2.0-0 , libc6 (>= 2.3.6-6) , libglib2.0-0 (>= 2.12.0) , libcommoncpp2-1.6-0 , libgsm1 (>=1.0.10) , libspeex1 (>=1.1.12) , libdbus-1-3, libdbus-glib-1-2, libsexy2 (>=0.1.11), libcppunit-1.12-1, libasound2 (>= 1.0), libpulse0 (>= 0.9.6), libccrtp1-1.6-1, libnotify1 (>= 0.4), libsexy2 (>= 0.1), perl (>=5.5.8), librsvg2-common (>= 2.22.2), libspeexdsp1
Depends: libgcc1 , libsamplerate0 (>=0.1.2) , libdbus-glib-1-2 (>= 0.73), libexpat1 , libgtk2.0-0 , libc6 (>= 2.3.6-6) , libglib2.0-0 (>= 2.12.0) , libcommoncpp2-1.6-0 , libgsm1 (>=1.0.10) , libspeex1 (>=1.1.12) , libdbus-1-3, libdbus-glib-1-2, libsexy2 (>=0.1.11), libasound2 (>= 1.0), libpulse0 (>= 0.9.6), libccrtp1-1.6-1, libnotify1 (>= 0.4), libsexy2 (>= 0.1), librsvg2-common (>= 2.22.2), libspeexdsp1
Homepage: http://www.sflphone.org
Description: SIP and IAX2 compatible softphone
SFLphone is meant to be a robust enterprise-class desktop phone.
......
......@@ -8,7 +8,7 @@ Standards-Version: 3.7.3
Package: sflphone
Priority: optional
Architecture: any
Depends: libgcc1 , libsamplerate0 (>=0.1.2) , libdbus-glib-1-2 (>= 0.73), libexpat1 , libgtk2.0-0 , libc6 (>= 2.3.6-6) , libglib2.0-0 (>= 2.12.0) , libcommoncpp2-1.6-0 , libgsm1 (>=1.0.10) , libspeex1 (>=1.1.12) , libdbus-1-3, libdbus-glib-1-2, libsexy2 (>=0.1.11), libcppunit-1.12-1, libasound2 (>= 1.0), libpulse0 (>= 0.9.6), libccrtp1-1.6-1, libnotify1 (>= 0.4), libsexy2 (>= 0.1), perl (>=5.5.8), librsvg2-common (>=2.22.2), libspeexdsp1
Depends: libgcc1 , libsamplerate0 (>=0.1.2) , libdbus-glib-1-2 (>= 0.73), libexpat1 , libgtk2.0-0 , libc6 (>= 2.3.6-6) , libglib2.0-0 (>= 2.12.0) , libcommoncpp2-1.6-0 , libgsm1 (>=1.0.10) , libspeex1 (>=1.1.12) , libdbus-1-3, libdbus-glib-1-2, libsexy2 (>=0.1.11), libasound2 (>= 1.0), libpulse0 (>= 0.9.6), libccrtp1-1.6-1, libnotify1 (>= 0.4), libsexy2 (>= 0.1), librsvg2-common (>=2.22.2), libspeexdsp1
Homepage: http://www.sflphone.org
Description: SIP and IAX2 compatible softphone
SFLphone is meant to be a robust enterprise-class desktop phone.
......
......@@ -28,17 +28,29 @@ AC_PROG_INSTALL
AC_STDC_HEADERS
AC_PROG_LIBTOOL
dnl Check for log4c
AC_CHECK_HEADERS(log4c.h, have_log4c=true, have_log4c=false)
if ! $have_log4c; then
AC_MSG_ERROR(Please install the log4c library)
fi
PKG_CHECK_MODULES(DEPS, \
dbus-glib-1 >= 0.35 \
libnotify >= 0.4 \
gtk+-2.0 >= 2.2 \
glib-2.0 >= 2.2 \
libsexy >= 0.1 \
dnl Check for GTK+ version
dnl If gtk+-2.0 >= 2.16, we don't need libsexy package anymore
PKG_CHECK_MODULES(GTK216, gtk+-2.0 >= 2.16, need_libsexy=false, need_libsexy=true)
if $need_libsexy; then
PKG_CHECK_MODULES(LIBSEXY, libsexy >= 0.1, have_libsexy=true, have_libsexy=false)
if ! $have_libsexy; then
AC_MSG_ERROR(libsexy package has not been found. Please install it.)
fi
fi
AC_SUBST(LIBSEXY_CFLAGS)
AC_SUBST(LIBSEXY_LIBS)
PKG_CHECK_MODULES(DEPS, \
dbus-glib-1 >= 0.35 \
libnotify >= 0.4 \
gtk+-2.0 >= 2.2 \
glib-2.0 >= 2.2 \
libebook-1.2 >= 2.22
)
......
......@@ -2,14 +2,15 @@
src = $(top_srcdir)
# Preprocessor flags
AM_CPPFLAGS = $(DEPS_CFLAGS) \
-I$(src)/src \
-I$(src)/src/config \
-I$(src)/src/dbus \
-I$(src)/src/contacts \
-I$(src)/src/addressbook \
-DDATA_DIR=\""$(prefix)/share/sflphone"\" \
-DICONS_DIR=\""$(prefix)/share/sflphone"\" \
AM_CPPFLAGS = $(DEPS_CFLAGS) \
$(LIBSEXY_CFLAGS) \
-I$(src)/src \
-I$(src)/src/config \
-I$(src)/src/dbus \
-I$(src)/src/contacts \
-I$(src)/src/addressbook \
-DDATA_DIR=\""$(prefix)/share/sflphone"\" \
-DICONS_DIR=\""$(prefix)/share/sflphone"\" \
-DCODECS_DIR=\""$(prefix)/lib/sflphone/codecs"\"
-DPREFIX=\"$(prefix)\" \
$(ZEROCONFFLAGS) \
......
......@@ -5,7 +5,6 @@ bin_PROGRAMS = sflphone-gtk
SUBDIRS = config contacts dbus
NOFIFY_LIBS = -lnotify
SEXY_LIBS = -lsexy
LOG4C = -llog4c
SFLPHONEGTK_LIBS=./contacts/libcontacts.la ./config/libconfig.la ./dbus/libdbus.la
......@@ -35,7 +34,7 @@ noinst_HEADERS = actions.h sflnotify.h mainwindow.h dialpad.h codeclist.h \
EXTRA_DIST = marshaller.list
sflphone_gtk_LDADD = $(DEPS_LIBS) $(NOTIFY_LIBS) $(SEXY_LIBS) $(SFLPHONEGTK_LIBS) $(LOG4C)
sflphone_gtk_LDADD = $(DEPS_LIBS) $(NOTIFY_LIBS) $(SFLPHONEGTK_LIBS) $(LIBSEXY_LIBS) $(LOG4C)
# add symbolic link
install-exec-local:
......
......@@ -29,7 +29,9 @@
#include <arpa/nameser.h>
#include <resolv.h>
#define CAN_REINVITE 1
#define CAN_REINVITE 1
const pj_str_t STR_USER_AGENT = { (char*)"User-Agent", 10 };
/**************** EXTERN VARIABLES AND FUNCTIONS (callbacks) **************************/
......@@ -288,6 +290,14 @@ void get_remote_sdp_from_offer( pjsip_rx_data *rdata, pjmedia_sdp_session** r_sd
*r_sdp = NULL;
}
std::string SIPVoIPLink::get_useragent_name (void)
{
std::ostringstream useragent;
useragent << PROGNAME << "/" << SFLPHONED_VERSION;
return useragent.str();
}
void
SIPVoIPLink::getEvent()
{
......@@ -306,13 +316,14 @@ int SIPVoIPLink::sendRegister( AccountID id )
pj_status_t status;
int expire_value;
char contactTmp[256];
pj_str_t svr, aor, contact;
pj_str_t svr, aor, contact, useragent;
pjsip_tx_data *tdata;
std::string tmp, hostname, username, password;
SIPAccount *account;
pjsip_regc *regc;
pjsip_generic_string_hdr *h;
pjsip_hdr hdr_list;
account = dynamic_cast<SIPAccount *> (Manager::instance().getAccount(id));
hostname = account->getHostname();
username = account->getUsername();
......@@ -385,6 +396,13 @@ int SIPVoIPLink::sendRegister( AccountID id )
account->setCredInfo(cred);
// Add User-Agent Header
pj_list_init (&hdr_list);
useragent = pj_str( (char*)get_useragent_name ().c_str() );
h = pjsip_generic_string_hdr_create (_pool, &STR_USER_AGENT, &useragent);
pj_list_push_back (&hdr_list, (pjsip_hdr*)h);
pjsip_regc_add_headers (regc, &hdr_list);
status = pjsip_regc_register(regc, PJ_TRUE, &tdata);
if (status != PJ_SUCCESS) {
_debug("UserAgent: Unable to register regc.\n");
......
......@@ -315,6 +315,8 @@ class SIPVoIPLink : public VoIPLink
bool new_ip_to_ip_call (const CallID& id, const std::string& to);
std::string get_useragent_name (void);
private:
/**
* Constructor
......
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