forked from sipXcom/sipxecs
-
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merged changes from joegen/devel/v4.x at https://github.com/joegen/os…
- Loading branch information
Showing
17 changed files
with
928 additions
and
84 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
#!/bin/sh | ||
|
||
BASEDIR=`pwd`; | ||
LIBDIR=${BASEDIR}/libs; | ||
SUBDIRS="resiprocate leak_tracer"; | ||
|
||
https://github.com/fredericgermain/LeakTracer.git | ||
|
||
bootstrap_leak_tracer() { | ||
cd ${LIBDIR} | ||
if [ ! -f ./LeakTracer/libleaktracer/include/leaktracer.h ]; then | ||
git clone https://github.com/fredericgermain/LeakTracer.git | ||
fi | ||
} | ||
|
||
bootstrap_resiprocate() { | ||
cd ${LIBDIR} | ||
if [ ! -f ./resiprocate/resip/dum/Dialog.hxx ]; then | ||
git clone https://github.com/joegen/resiprocate | ||
cd resiprocate | ||
autoreconf -if | ||
fi | ||
} | ||
|
||
bootstrap_libs() { | ||
for i in ${SUBDIRS}; do | ||
bootstrap_$i | ||
done | ||
${BGJOB} && wait | ||
} | ||
|
||
bootstrap_libs |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
46 changes: 46 additions & 0 deletions
46
oss_core/include/OSS/JS/modules/ResipAppDialogSetFactory.h
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
#ifndef RESIPAPPDIALOGSETFACTORY_H_INCLUDED | ||
#define RESIPAPPDIALOGSETFACTORY_H_INCLUDED | ||
|
||
#include <v8.h> | ||
#include <vector> | ||
#include "OSS/JS/JSPlugin.h" | ||
#include "OSS/JSON/Json.h" | ||
#include "OSS/JS/JSEventArgument.h" | ||
|
||
#include "resip/dum/AppDialog.hxx" | ||
#include "resip/dum/AppDialogSet.hxx" | ||
#include "resip/dum/AppDialogSetFactory.hxx" | ||
#include "resip/dum/DialogUsageManager.hxx" | ||
#include "resip/stack/SipMessage.hxx" | ||
|
||
class ResipAppDialogSetFactoryImpl : public resip::AppDialogSetFactory | ||
{ | ||
public: | ||
typedef std::map<std::string, std::string> Variables; | ||
ResipAppDialogSetFactoryImpl(); | ||
virtual ~ResipAppDialogSetFactoryImpl(); | ||
virtual resip::AppDialogSet* createAppDialogSet(resip::DialogUsageManager& dum, const resip::SipMessage& msg); | ||
// For a UAS the testAppDialogSet will be created by DUM using this function. If you want to set | ||
// Application Data, then one approach is to wait for onNewSession(ServerInviteSessionHandle ...) | ||
// to be called, then use the ServerInviteSessionHandle to get at the AppDialogSet or AppDialog, | ||
// then cast to your derived class and set the desired application data. | ||
void setVariable(const std::string& name, const std::string& value); | ||
std::string getVariable(const std::string& name) const; | ||
private: | ||
Variables _variables; | ||
}; | ||
|
||
class ResipAppDialogSetFactory : public OSS::JS::JSObjectWrap | ||
{ | ||
public: | ||
JS_CONSTRUCTOR_DECLARE(); | ||
JS_METHOD_DECLARE(setVariable); | ||
JS_METHOD_DECLARE(getVariable); | ||
private: | ||
ResipAppDialogSetFactory(); | ||
virtual ~ResipAppDialogSetFactory(); | ||
std::auto_ptr<ResipAppDialogSetFactoryImpl> _self; | ||
}; | ||
|
||
#endif //.RESIPAPPDIALOGSETFACTORY_H_INCLUDED | ||
|
95 changes: 95 additions & 0 deletions
95
oss_core/include/OSS/JS/modules/ResipClientInviteSessionHandler.h
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,95 @@ | ||
#ifndef RESIPCLIENTINVITESESSIONHANDLER_H_INCLUDED | ||
#define RESIPCLIENTINVITESESSIONHANDLER_H_INCLUDED | ||
|
||
|
||
#include <v8.h> | ||
#include <vector> | ||
#include "OSS/JS/JSPlugin.h" | ||
#include "OSS/JSON/Json.h" | ||
#include "OSS/JS/JSEventArgument.h" | ||
|
||
#include "OSS/JS/modules/ResipInviteSessionHandler.h" | ||
|
||
class ResipClientInviteSessionHandler : public OSS::JS::JSObjectWrap | ||
{ | ||
public: | ||
JS_CONSTRUCTOR_DECLARE(); | ||
JS_METHOD_DECLARE(handleOnNewSession); | ||
JS_METHOD_DECLARE(handleOnFailure); | ||
JS_METHOD_DECLARE(handleOnProvisional); | ||
JS_METHOD_DECLARE(handleOnConnected); | ||
JS_METHOD_DECLARE(handleOnStaleCallTimeout); | ||
JS_METHOD_DECLARE(handleOnRedirected); | ||
JS_METHOD_DECLARE(handleOnTerminated); | ||
JS_METHOD_DECLARE(handleOnAnswer); | ||
JS_METHOD_DECLARE(handleOnOffer); | ||
JS_METHOD_DECLARE(handleOnEarlyMedia); | ||
JS_METHOD_DECLARE(handleOnOfferRequired); | ||
JS_METHOD_DECLARE(handleOnOfferRejected); | ||
JS_METHOD_DECLARE(handleOnRefer); | ||
JS_METHOD_DECLARE(handleOnReferAccepted); | ||
JS_METHOD_DECLARE(handleOnReferRejected); | ||
JS_METHOD_DECLARE(handleOnReferNoSub); | ||
JS_METHOD_DECLARE(handleOnInfo); | ||
JS_METHOD_DECLARE(handleOnInfoSuccess); | ||
JS_METHOD_DECLARE(handleOnInfoFailure); | ||
JS_METHOD_DECLARE(handleOnMessage); | ||
JS_METHOD_DECLARE(handleOnMessageSuccess); | ||
JS_METHOD_DECLARE(handleOnMessageFailure); | ||
JS_METHOD_DECLARE(handleOnForkDestroyed); | ||
|
||
void onNewSession(resip::ClientInviteSessionHandle, resip::InviteSession::OfferAnswerType oat, const resip::SipMessage& msg); | ||
void onFailure(resip::ClientInviteSessionHandle, const resip::SipMessage& msg); | ||
void onProvisional(resip::ClientInviteSessionHandle, const resip::SipMessage& msg); | ||
void onConnected(resip::ClientInviteSessionHandle, const resip::SipMessage& msg); | ||
void onStaleCallTimeout(resip::ClientInviteSessionHandle handle); | ||
void onRedirected(resip::ClientInviteSessionHandle, const resip::SipMessage& msg); | ||
void onTerminated(resip::InviteSessionHandle, resip::InviteSessionHandler::TerminatedReason reason, const resip::SipMessage* msg); | ||
void onAnswer(resip::InviteSessionHandle, const resip::SipMessage& msg, const resip::SdpContents& sdp); | ||
void onOffer(resip::InviteSessionHandle is, const resip::SipMessage& msg, const resip::SdpContents& sdp); | ||
void onEarlyMedia(resip::ClientInviteSessionHandle, const resip::SipMessage& msg, const resip::SdpContents& sdp); | ||
void onOfferRequired(resip::InviteSessionHandle, const resip::SipMessage& msg); | ||
void onOfferRejected(resip::InviteSessionHandle, const resip::SipMessage* msg); | ||
void onRefer(resip::InviteSessionHandle, resip::ServerSubscriptionHandle, const resip::SipMessage& msg); | ||
void onReferAccepted(resip::InviteSessionHandle, resip::ClientSubscriptionHandle, const resip::SipMessage& msg); | ||
void onReferRejected(resip::InviteSessionHandle, const resip::SipMessage& msg); | ||
void onReferNoSub(resip::InviteSessionHandle, const resip::SipMessage& msg); | ||
void onInfo(resip::InviteSessionHandle, const resip::SipMessage& msg); | ||
void onInfoSuccess(resip::InviteSessionHandle, const resip::SipMessage& msg); | ||
void onInfoFailure(resip::InviteSessionHandle, const resip::SipMessage& msg); | ||
void onMessage(resip::InviteSessionHandle, const resip::SipMessage& msg); | ||
void onMessageSuccess(resip::InviteSessionHandle, const resip::SipMessage& msg); | ||
void onMessageFailure(resip::InviteSessionHandle, const resip::SipMessage& msg); | ||
void onForkDestroyed(resip::ClientInviteSessionHandle); | ||
|
||
protected: | ||
void onNewSessionIsolated(void* user_data); | ||
void onFailureIsolated(void* user_data); | ||
void onProvisionalIsolated(void* user_data); | ||
void onConnectedIsolated(void* user_data); | ||
void onStaleCallTimeoutIsolated(void* user_data); | ||
void onRedirectedIsolated(void* user_data); | ||
void onTerminatedIsolated(void* user_data); | ||
void onAnswerIsolated(void* user_data); | ||
void onOfferIsolated(void* user_data); | ||
void onEarlyMediaIsolated(void* user_data); | ||
void onOfferRequiredIsolated(void* user_data); | ||
void onOfferRejectedIsolated(void* user_data); | ||
void onReferIsolated(void* user_data); | ||
void onReferAcceptedIsolated(void* user_data); | ||
void onReferRejectedIsolated(void* user_data); | ||
void onReferNoSubIsolated(void* user_data); | ||
void onInfoIsolated(void* user_data); | ||
void onInfoSuccessIsolated(void* user_data); | ||
void onInfoFailureIsolated(void* user_data); | ||
void onMessageIsolated(void* user_data); | ||
void onMessageSuccessIsolated(void* user_data); | ||
void onMessageFailureIsolated(void* user_data); | ||
void onForkDestroyedIsolated(void* user_data); | ||
|
||
private: | ||
ResipClientInviteSessionHandler(); | ||
~ResipClientInviteSessionHandler(); | ||
}; | ||
#endif /* RESIPCLIENTINVITESESSIONHANDLER_H */ | ||
|
42 changes: 42 additions & 0 deletions
42
oss_core/include/OSS/JS/modules/ResipInviteSessionHandler.h
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
|
||
#ifndef RESIPINVITESESSIONHANDLER_H_INCLUDED | ||
#define RESIPINVITESESSIONHANDLER_H_INCLUDED | ||
|
||
|
||
#include <resip/dum/InviteSessionHandler.hxx> | ||
#include <rutil/SharedPtr.hxx> | ||
|
||
class ResipInviteSessionHandler : public resip::InviteSessionHandler | ||
{ | ||
public: | ||
ResipInviteSessionHandler(); | ||
virtual ~ResipInviteSessionHandler(); | ||
void onNewSession(resip::ClientInviteSessionHandle, resip::InviteSession::OfferAnswerType oat, const resip::SipMessage& msg); | ||
void onNewSession(resip::ServerInviteSessionHandle, resip::InviteSession::OfferAnswerType oat, const resip::SipMessage& msg); | ||
void onFailure(resip::ClientInviteSessionHandle, const resip::SipMessage& msg); | ||
void onProvisional(resip::ClientInviteSessionHandle, const resip::SipMessage& msg); | ||
void onConnected(resip::ClientInviteSessionHandle, const resip::SipMessage& msg); | ||
void onStaleCallTimeout(resip::ClientInviteSessionHandle handle); | ||
void onConnected(resip::InviteSessionHandle, const resip::SipMessage& msg); | ||
void onRedirected(resip::ClientInviteSessionHandle, const resip::SipMessage& msg); | ||
void onTerminated(resip::InviteSessionHandle, resip::InviteSessionHandler::TerminatedReason reason, const resip::SipMessage* msg); | ||
void onAnswer(resip::InviteSessionHandle, const resip::SipMessage& msg, const resip::SdpContents& sdp); | ||
void onOffer(resip::InviteSessionHandle is, const resip::SipMessage& msg, const resip::SdpContents& sdp); | ||
void onEarlyMedia(resip::ClientInviteSessionHandle, const resip::SipMessage& msg, const resip::SdpContents& sdp); | ||
void onOfferRequired(resip::InviteSessionHandle, const resip::SipMessage& msg); | ||
void onOfferRejected(resip::InviteSessionHandle, const resip::SipMessage* msg); | ||
void onRefer(resip::InviteSessionHandle, resip::ServerSubscriptionHandle, const resip::SipMessage& msg); | ||
void onReferAccepted(resip::InviteSessionHandle, resip::ClientSubscriptionHandle, const resip::SipMessage& msg); | ||
void onReferRejected(resip::InviteSessionHandle, const resip::SipMessage& msg); | ||
void onReferNoSub(resip::InviteSessionHandle, const resip::SipMessage& msg); | ||
void onInfo(resip::InviteSessionHandle, const resip::SipMessage& msg); | ||
void onInfoSuccess(resip::InviteSessionHandle, const resip::SipMessage& msg); | ||
void onInfoFailure(resip::InviteSessionHandle, const resip::SipMessage& msg); | ||
void onMessage(resip::InviteSessionHandle, const resip::SipMessage& msg); | ||
void onMessageSuccess(resip::InviteSessionHandle, const resip::SipMessage& msg); | ||
void onMessageFailure(resip::InviteSessionHandle, const resip::SipMessage& msg); | ||
void onForkDestroyed(resip::ClientInviteSessionHandle); | ||
}; | ||
|
||
#endif /* RESIPINVITESESSIONHANDLER_H_INCLUDED */ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Empty file.
Oops, something went wrong.