Alert en-user when SIP TCP connection is lost

This commit is contained in:
bossiel 2013-02-27 01:58:06 +00:00
parent 9740116d83
commit 2e5d0d6038
44 changed files with 659 additions and 40 deletions

View File

@ -38,7 +38,9 @@ public:
virtual ~Codec();
public:
#if !defined(SWIG)
const struct tmedia_codec_s* getWrappedCodec(){ return m_pWrappedCodec; }
#endif
twrap_media_type_t getMediaType();
const char* getName();
const char* getDescription();

View File

@ -53,8 +53,9 @@ public:
char* getMsrpHeaderParamValue(const char* name, const char* param);
unsigned getMsrpContentLength();
unsigned getMsrpContent(void* output, unsigned maxsize);
#if !defined(SWIG)
const tmsrp_message_t* getWrappedMsrpMessage() { return m_pMessage; }
#endif
private:
const tmsrp_header_t* getMsrpHeader(const char* name, unsigned index = 0);

View File

@ -115,6 +115,7 @@ tsip_event_type_t;
#define tsip_event_code_stack_stopped 953
#define tsip_event_code_stack_failed_to_start 954
#define tsip_event_code_stack_failed_to_stop 955
#define tsip_event_code_stack_disconnected 956
/* ====== From "tinySIP\include\tinysip\tsip_api_register.h" ====== */
typedef enum tsip_register_event_type_e

View File

@ -4,6 +4,7 @@
%include <stdint.i>
%{
#include "tinyWRAP_config.h"
#include "DDebug.h"
#include "AudioResampler.h"
%}
@ -11,6 +12,7 @@
%feature("director") DDebugCallback;
%nodefaultctor;
%include "tinyWRAP_config.h"
%include "DDebug.h"
%include "AudioResampler.h"
%include "Common.h"

View File

@ -54,6 +54,11 @@ public class ActionConfig : IDisposable {
return ret;
}
public bool setActiveMedia(twrap_media_type_t type) {
bool ret = tinyWRAPPINVOKE.ActionConfig_setActiveMedia(swigCPtr, (int)type);
return ret;
}
public ActionConfig setResponseLine(short code, string phrase) {
IntPtr cPtr = tinyWRAPPINVOKE.ActionConfig_setResponseLine(swigCPtr, code, phrase);
ActionConfig ret = (cPtr == IntPtr.Zero) ? null : new ActionConfig(cPtr, false);

View File

@ -51,6 +51,12 @@ public class PublicationEvent : SipEvent {
return ret;
}
public PublicationSession takeSessionOwnership() {
IntPtr cPtr = tinyWRAPPINVOKE.PublicationEvent_takeSessionOwnership(swigCPtr);
PublicationSession ret = (cPtr == IntPtr.Zero) ? null : new PublicationSession(cPtr, false);
return ret;
}
}
}

View File

@ -53,6 +53,11 @@ public class SipStack : SafeObject {
return ret;
}
public bool setDisplayName(string display_name) {
bool ret = tinyWRAPPINVOKE.SipStack_setDisplayName(swigCPtr, display_name);
return ret;
}
public bool setRealm(string realm_uri) {
bool ret = tinyWRAPPINVOKE.SipStack_setRealm(swigCPtr, realm_uri);
return ret;

View File

@ -51,6 +51,12 @@ public class SubscriptionEvent : SipEvent {
return ret;
}
public SubscriptionSession takeSessionOwnership() {
IntPtr cPtr = tinyWRAPPINVOKE.SubscriptionEvent_takeSessionOwnership(swigCPtr);
SubscriptionSession ret = (cPtr == IntPtr.Zero) ? null : new SubscriptionSession(cPtr, false);
return ret;
}
}
}

View File

@ -29,6 +29,7 @@ public class tinyWRAP {
public static readonly int tsip_event_code_stack_stopped = tinyWRAPPINVOKE.tsip_event_code_stack_stopped_get();
public static readonly int tsip_event_code_stack_failed_to_start = tinyWRAPPINVOKE.tsip_event_code_stack_failed_to_start_get();
public static readonly int tsip_event_code_stack_failed_to_stop = tinyWRAPPINVOKE.tsip_event_code_stack_failed_to_stop_get();
public static readonly int tsip_event_code_stack_disconnected = tinyWRAPPINVOKE.tsip_event_code_stack_disconnected_get();
}
}

View File

@ -252,6 +252,9 @@ class tinyWRAPPINVOKE {
[DllImport("tinyWRAP", EntryPoint="CSharp_ActionConfig_addPayload")]
public static extern bool ActionConfig_addPayload(HandleRef jarg1, IntPtr jarg2, uint jarg3);
[DllImport("tinyWRAP", EntryPoint="CSharp_ActionConfig_setActiveMedia")]
public static extern bool ActionConfig_setActiveMedia(HandleRef jarg1, int jarg2);
[DllImport("tinyWRAP", EntryPoint="CSharp_ActionConfig_setResponseLine")]
public static extern IntPtr ActionConfig_setResponseLine(HandleRef jarg1, short jarg2, string jarg3);
@ -684,6 +687,9 @@ class tinyWRAPPINVOKE {
[DllImport("tinyWRAP", EntryPoint="CSharp_PublicationEvent_getSession")]
public static extern IntPtr PublicationEvent_getSession(HandleRef jarg1);
[DllImport("tinyWRAP", EntryPoint="CSharp_PublicationEvent_takeSessionOwnership")]
public static extern IntPtr PublicationEvent_takeSessionOwnership(HandleRef jarg1);
[DllImport("tinyWRAP", EntryPoint="CSharp_delete_RegistrationEvent")]
public static extern void delete_RegistrationEvent(HandleRef jarg1);
@ -705,6 +711,9 @@ class tinyWRAPPINVOKE {
[DllImport("tinyWRAP", EntryPoint="CSharp_SubscriptionEvent_getSession")]
public static extern IntPtr SubscriptionEvent_getSession(HandleRef jarg1);
[DllImport("tinyWRAP", EntryPoint="CSharp_SubscriptionEvent_takeSessionOwnership")]
public static extern IntPtr SubscriptionEvent_takeSessionOwnership(HandleRef jarg1);
[DllImport("tinyWRAP", EntryPoint="CSharp_delete_T140CallbackData")]
public static extern void delete_T140CallbackData(HandleRef jarg1);
@ -1551,6 +1560,9 @@ class tinyWRAPPINVOKE {
[DllImport("tinyWRAP", EntryPoint="CSharp_SipStack_setDebugCallback")]
public static extern bool SipStack_setDebugCallback(HandleRef jarg1, HandleRef jarg2);
[DllImport("tinyWRAP", EntryPoint="CSharp_SipStack_setDisplayName")]
public static extern bool SipStack_setDisplayName(HandleRef jarg1, string jarg2);
[DllImport("tinyWRAP", EntryPoint="CSharp_SipStack_setRealm")]
public static extern bool SipStack_setRealm(HandleRef jarg1, string jarg2);
@ -1731,6 +1743,9 @@ class tinyWRAPPINVOKE {
[DllImport("tinyWRAP", EntryPoint="CSharp_tsip_event_code_stack_failed_to_stop_get")]
public static extern int tsip_event_code_stack_failed_to_stop_get();
[DllImport("tinyWRAP", EntryPoint="CSharp_tsip_event_code_stack_disconnected_get")]
public static extern int tsip_event_code_stack_disconnected_get();
[DllImport("tinyWRAP", EntryPoint="CSharp_new_XcapSelector")]
public static extern IntPtr new_XcapSelector(HandleRef jarg1);

View File

@ -331,6 +331,7 @@ namespace Swig {
#include <stdint.h> // Use the C99 official header
#include "tinyWRAP_config.h"
#include "DDebug.h"
#include "AudioResampler.h"
@ -1421,6 +1422,20 @@ SWIGEXPORT unsigned int SWIGSTDCALL CSharp_ActionConfig_addPayload(void * jarg1,
}
SWIGEXPORT unsigned int SWIGSTDCALL CSharp_ActionConfig_setActiveMedia(void * jarg1, int jarg2) {
unsigned int jresult ;
ActionConfig *arg1 = (ActionConfig *) 0 ;
twrap_media_type_t arg2 ;
bool result;
arg1 = (ActionConfig *)jarg1;
arg2 = (twrap_media_type_t)jarg2;
result = (bool)(arg1)->setActiveMedia(arg2);
jresult = result;
return jresult;
}
SWIGEXPORT void * SWIGSTDCALL CSharp_ActionConfig_setResponseLine(void * jarg1, short jarg2, char * jarg3) {
void * jresult ;
ActionConfig *arg1 = (ActionConfig *) 0 ;
@ -3180,6 +3195,18 @@ SWIGEXPORT void * SWIGSTDCALL CSharp_PublicationEvent_getSession(void * jarg1) {
}
SWIGEXPORT void * SWIGSTDCALL CSharp_PublicationEvent_takeSessionOwnership(void * jarg1) {
void * jresult ;
PublicationEvent *arg1 = (PublicationEvent *) 0 ;
PublicationSession *result = 0 ;
arg1 = (PublicationEvent *)jarg1;
result = (PublicationSession *)((PublicationEvent const *)arg1)->takeSessionOwnership();
jresult = (void *)result;
return jresult;
}
SWIGEXPORT void SWIGSTDCALL CSharp_delete_RegistrationEvent(void * jarg1) {
RegistrationEvent *arg1 = (RegistrationEvent *) 0 ;
@ -3256,6 +3283,18 @@ SWIGEXPORT void * SWIGSTDCALL CSharp_SubscriptionEvent_getSession(void * jarg1)
}
SWIGEXPORT void * SWIGSTDCALL CSharp_SubscriptionEvent_takeSessionOwnership(void * jarg1) {
void * jresult ;
SubscriptionEvent *arg1 = (SubscriptionEvent *) 0 ;
SubscriptionSession *result = 0 ;
arg1 = (SubscriptionEvent *)jarg1;
result = (SubscriptionSession *)((SubscriptionEvent const *)arg1)->takeSessionOwnership();
jresult = (void *)result;
return jresult;
}
SWIGEXPORT void SWIGSTDCALL CSharp_delete_T140CallbackData(void * jarg1) {
T140CallbackData *arg1 = (T140CallbackData *) 0 ;
@ -6899,6 +6938,20 @@ SWIGEXPORT unsigned int SWIGSTDCALL CSharp_SipStack_setDebugCallback(void * jarg
}
SWIGEXPORT unsigned int SWIGSTDCALL CSharp_SipStack_setDisplayName(void * jarg1, char * jarg2) {
unsigned int jresult ;
SipStack *arg1 = (SipStack *) 0 ;
char *arg2 = (char *) 0 ;
bool result;
arg1 = (SipStack *)jarg1;
arg2 = (char *)jarg2;
result = (bool)(arg1)->setDisplayName((char const *)arg2);
jresult = result;
return jresult;
}
SWIGEXPORT unsigned int SWIGSTDCALL CSharp_SipStack_setRealm(void * jarg1, char * jarg2) {
unsigned int jresult ;
SipStack *arg1 = (SipStack *) 0 ;
@ -7710,6 +7763,16 @@ SWIGEXPORT int SWIGSTDCALL CSharp_tsip_event_code_stack_failed_to_stop_get() {
}
SWIGEXPORT int SWIGSTDCALL CSharp_tsip_event_code_stack_disconnected_get() {
int jresult ;
int result;
result = (int)(956);
jresult = result;
return jresult;
}
SWIGEXPORT void * SWIGSTDCALL CSharp_new_XcapSelector(void * jarg1) {
void * jresult ;
XcapStack *arg1 = (XcapStack *) 0 ;

View File

@ -47,6 +47,10 @@ public class ActionConfig {
return tinyWRAPJNI.ActionConfig_addPayload(swigCPtr, this, payload, len);
}
public boolean setActiveMedia(twrap_media_type_t type) {
return tinyWRAPJNI.ActionConfig_setActiveMedia(swigCPtr, this, type.swigValue());
}
public ActionConfig setResponseLine(short code, String phrase) {
long cPtr = tinyWRAPJNI.ActionConfig_setResponseLine(swigCPtr, this, code, phrase);
return (cPtr == 0) ? null : new ActionConfig(cPtr, false);

View File

@ -44,4 +44,9 @@ public class PublicationEvent extends SipEvent {
return (cPtr == 0) ? null : new PublicationSession(cPtr, false);
}
public PublicationSession takeSessionOwnership() {
long cPtr = tinyWRAPJNI.PublicationEvent_takeSessionOwnership(swigCPtr, this);
return (cPtr == 0) ? null : new PublicationSession(cPtr, false);
}
}

View File

@ -47,6 +47,10 @@ public class SipStack extends SafeObject {
return tinyWRAPJNI.SipStack_setDebugCallback(swigCPtr, this, DDebugCallback.getCPtr(pCallback), pCallback);
}
public boolean setDisplayName(String display_name) {
return tinyWRAPJNI.SipStack_setDisplayName(swigCPtr, this, display_name);
}
public boolean setRealm(String realm_uri) {
return tinyWRAPJNI.SipStack_setRealm(swigCPtr, this, realm_uri);
}

View File

@ -44,4 +44,9 @@ public class SubscriptionEvent extends SipEvent {
return (cPtr == 0) ? null : new SubscriptionSession(cPtr, false);
}
public SubscriptionSession takeSessionOwnership() {
long cPtr = tinyWRAPJNI.SubscriptionEvent_takeSessionOwnership(swigCPtr, this);
return (cPtr == 0) ? null : new SubscriptionSession(cPtr, false);
}
}

View File

@ -47,6 +47,10 @@ public class ActionConfig {
return tinyWRAPJNI.ActionConfig_addPayload(swigCPtr, this, payload, len);
}
public boolean setActiveMedia(twrap_media_type_t type) {
return tinyWRAPJNI.ActionConfig_setActiveMedia(swigCPtr, this, type.swigValue());
}
public ActionConfig setResponseLine(short code, String phrase) {
long cPtr = tinyWRAPJNI.ActionConfig_setResponseLine(swigCPtr, this, code, phrase);
return (cPtr == 0) ? null : new ActionConfig(cPtr, false);

View File

@ -44,4 +44,9 @@ public class PublicationEvent extends SipEvent {
return (cPtr == 0) ? null : new PublicationSession(cPtr, false);
}
public PublicationSession takeSessionOwnership() {
long cPtr = tinyWRAPJNI.PublicationEvent_takeSessionOwnership(swigCPtr, this);
return (cPtr == 0) ? null : new PublicationSession(cPtr, false);
}
}

View File

@ -47,6 +47,10 @@ public class SipStack extends SafeObject {
return tinyWRAPJNI.SipStack_setDebugCallback(swigCPtr, this, DDebugCallback.getCPtr(pCallback), pCallback);
}
public boolean setDisplayName(String display_name) {
return tinyWRAPJNI.SipStack_setDisplayName(swigCPtr, this, display_name);
}
public boolean setRealm(String realm_uri) {
return tinyWRAPJNI.SipStack_setRealm(swigCPtr, this, realm_uri);
}

View File

@ -44,4 +44,9 @@ public class SubscriptionEvent extends SipEvent {
return (cPtr == 0) ? null : new SubscriptionSession(cPtr, false);
}
public SubscriptionSession takeSessionOwnership() {
long cPtr = tinyWRAPJNI.SubscriptionEvent_takeSessionOwnership(swigCPtr, this);
return (cPtr == 0) ? null : new SubscriptionSession(cPtr, false);
}
}

View File

@ -26,4 +26,5 @@ public interface tinyWRAPConstants {
public final static int tsip_event_code_stack_stopped = 953;
public final static int tsip_event_code_stack_failed_to_start = 954;
public final static int tsip_event_code_stack_failed_to_stop = 955;
public final static int tsip_event_code_stack_disconnected = 956;
}

View File

@ -31,6 +31,7 @@ public class tinyWRAPJNI {
public final static native void delete_ActionConfig(long jarg1);
public final static native boolean ActionConfig_addHeader(long jarg1, ActionConfig jarg1_, String jarg2, String jarg3);
public final static native boolean ActionConfig_addPayload(long jarg1, ActionConfig jarg1_, java.nio.ByteBuffer jarg2, long jarg3);
public final static native boolean ActionConfig_setActiveMedia(long jarg1, ActionConfig jarg1_, int jarg2);
public final static native long ActionConfig_setResponseLine(long jarg1, ActionConfig jarg1_, short jarg2, String jarg3);
public final static native long ActionConfig_setMediaString(long jarg1, ActionConfig jarg1_, int jarg2, String jarg3, String jarg4);
public final static native long ActionConfig_setMediaInt(long jarg1, ActionConfig jarg1_, int jarg2, String jarg3, int jarg4);
@ -175,6 +176,7 @@ public class tinyWRAPJNI {
public final static native void delete_PublicationEvent(long jarg1);
public final static native int PublicationEvent_getType(long jarg1, PublicationEvent jarg1_);
public final static native long PublicationEvent_getSession(long jarg1, PublicationEvent jarg1_);
public final static native long PublicationEvent_takeSessionOwnership(long jarg1, PublicationEvent jarg1_);
public final static native void delete_RegistrationEvent(long jarg1);
public final static native int RegistrationEvent_getType(long jarg1, RegistrationEvent jarg1_);
public final static native long RegistrationEvent_getSession(long jarg1, RegistrationEvent jarg1_);
@ -182,6 +184,7 @@ public class tinyWRAPJNI {
public final static native void delete_SubscriptionEvent(long jarg1);
public final static native int SubscriptionEvent_getType(long jarg1, SubscriptionEvent jarg1_);
public final static native long SubscriptionEvent_getSession(long jarg1, SubscriptionEvent jarg1_);
public final static native long SubscriptionEvent_takeSessionOwnership(long jarg1, SubscriptionEvent jarg1_);
public final static native void delete_T140CallbackData(long jarg1);
public final static native int T140CallbackData_getType(long jarg1, T140CallbackData jarg1_);
public final static native long T140CallbackData_getSize(long jarg1, T140CallbackData jarg1_);
@ -471,6 +474,7 @@ public class tinyWRAPJNI {
public final static native void delete_SipStack(long jarg1);
public final static native boolean SipStack_start(long jarg1, SipStack jarg1_);
public final static native boolean SipStack_setDebugCallback(long jarg1, SipStack jarg1_, long jarg2, DDebugCallback jarg2_);
public final static native boolean SipStack_setDisplayName(long jarg1, SipStack jarg1_, String jarg2);
public final static native boolean SipStack_setRealm(long jarg1, SipStack jarg1_, String jarg2);
public final static native boolean SipStack_setIMPI(long jarg1, SipStack jarg1_, String jarg2);
public final static native boolean SipStack_setIMPU(long jarg1, SipStack jarg1_, String jarg2);

View File

@ -419,6 +419,7 @@ namespace Swig {
#include <stdint.h> // Use the C99 official header
#include "tinyWRAP_config.h"
#include "DDebug.h"
#include "AudioResampler.h"
@ -2308,6 +2309,23 @@ SWIGEXPORT jboolean JNICALL Java_org_doubango_tinyWRAP_tinyWRAPJNI_ActionConfig_
}
SWIGEXPORT jboolean JNICALL Java_org_doubango_tinyWRAP_tinyWRAPJNI_ActionConfig_1setActiveMedia(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jint jarg2) {
jboolean jresult = 0 ;
ActionConfig *arg1 = (ActionConfig *) 0 ;
twrap_media_type_t arg2 ;
bool result;
(void)jenv;
(void)jcls;
(void)jarg1_;
arg1 = *(ActionConfig **)&jarg1;
arg2 = (twrap_media_type_t)jarg2;
result = (bool)(arg1)->setActiveMedia(arg2);
jresult = (jboolean)result;
return jresult;
}
SWIGEXPORT jlong JNICALL Java_org_doubango_tinyWRAP_tinyWRAPJNI_ActionConfig_1setResponseLine(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jshort jarg2, jstring jarg3) {
jlong jresult = 0 ;
ActionConfig *arg1 = (ActionConfig *) 0 ;
@ -4604,6 +4622,21 @@ SWIGEXPORT jlong JNICALL Java_org_doubango_tinyWRAP_tinyWRAPJNI_PublicationEvent
}
SWIGEXPORT jlong JNICALL Java_org_doubango_tinyWRAP_tinyWRAPJNI_PublicationEvent_1takeSessionOwnership(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) {
jlong jresult = 0 ;
PublicationEvent *arg1 = (PublicationEvent *) 0 ;
PublicationSession *result = 0 ;
(void)jenv;
(void)jcls;
(void)jarg1_;
arg1 = *(PublicationEvent **)&jarg1;
result = (PublicationSession *)((PublicationEvent const *)arg1)->takeSessionOwnership();
*(PublicationSession **)&jresult = result;
return jresult;
}
SWIGEXPORT void JNICALL Java_org_doubango_tinyWRAP_tinyWRAPJNI_delete_1RegistrationEvent(JNIEnv *jenv, jclass jcls, jlong jarg1) {
RegistrationEvent *arg1 = (RegistrationEvent *) 0 ;
@ -4699,6 +4732,21 @@ SWIGEXPORT jlong JNICALL Java_org_doubango_tinyWRAP_tinyWRAPJNI_SubscriptionEven
}
SWIGEXPORT jlong JNICALL Java_org_doubango_tinyWRAP_tinyWRAPJNI_SubscriptionEvent_1takeSessionOwnership(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) {
jlong jresult = 0 ;
SubscriptionEvent *arg1 = (SubscriptionEvent *) 0 ;
SubscriptionSession *result = 0 ;
(void)jenv;
(void)jcls;
(void)jarg1_;
arg1 = *(SubscriptionEvent **)&jarg1;
result = (SubscriptionSession *)((SubscriptionEvent const *)arg1)->takeSessionOwnership();
*(SubscriptionSession **)&jresult = result;
return jresult;
}
SWIGEXPORT void JNICALL Java_org_doubango_tinyWRAP_tinyWRAPJNI_delete_1T140CallbackData(JNIEnv *jenv, jclass jcls, jlong jarg1) {
T140CallbackData *arg1 = (T140CallbackData *) 0 ;
@ -9735,6 +9783,28 @@ SWIGEXPORT jboolean JNICALL Java_org_doubango_tinyWRAP_tinyWRAPJNI_SipStack_1set
}
SWIGEXPORT jboolean JNICALL Java_org_doubango_tinyWRAP_tinyWRAPJNI_SipStack_1setDisplayName(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jstring jarg2) {
jboolean jresult = 0 ;
SipStack *arg1 = (SipStack *) 0 ;
char *arg2 = (char *) 0 ;
bool result;
(void)jenv;
(void)jcls;
(void)jarg1_;
arg1 = *(SipStack **)&jarg1;
arg2 = 0;
if (jarg2) {
arg2 = (char *)jenv->GetStringUTFChars(jarg2, 0);
if (!arg2) return 0;
}
result = (bool)(arg1)->setDisplayName((char const *)arg2);
jresult = (jboolean)result;
if (arg2) jenv->ReleaseStringUTFChars(jarg2, (const char *)arg2);
return jresult;
}
SWIGEXPORT jboolean JNICALL Java_org_doubango_tinyWRAP_tinyWRAPJNI_SipStack_1setRealm(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jstring jarg2) {
jboolean jresult = 0 ;
SipStack *arg1 = (SipStack *) 0 ;

View File

@ -26,4 +26,5 @@ public interface tinyWRAPConstants {
public final static int tsip_event_code_stack_stopped = 953;
public final static int tsip_event_code_stack_failed_to_start = 954;
public final static int tsip_event_code_stack_failed_to_stop = 955;
public final static int tsip_event_code_stack_disconnected = 956;
}

View File

@ -31,6 +31,7 @@ public class tinyWRAPJNI {
public final static native void delete_ActionConfig(long jarg1);
public final static native boolean ActionConfig_addHeader(long jarg1, ActionConfig jarg1_, String jarg2, String jarg3);
public final static native boolean ActionConfig_addPayload(long jarg1, ActionConfig jarg1_, java.nio.ByteBuffer jarg2, long jarg3);
public final static native boolean ActionConfig_setActiveMedia(long jarg1, ActionConfig jarg1_, int jarg2);
public final static native long ActionConfig_setResponseLine(long jarg1, ActionConfig jarg1_, short jarg2, String jarg3);
public final static native long ActionConfig_setMediaString(long jarg1, ActionConfig jarg1_, int jarg2, String jarg3, String jarg4);
public final static native long ActionConfig_setMediaInt(long jarg1, ActionConfig jarg1_, int jarg2, String jarg3, int jarg4);
@ -175,6 +176,7 @@ public class tinyWRAPJNI {
public final static native void delete_PublicationEvent(long jarg1);
public final static native int PublicationEvent_getType(long jarg1, PublicationEvent jarg1_);
public final static native long PublicationEvent_getSession(long jarg1, PublicationEvent jarg1_);
public final static native long PublicationEvent_takeSessionOwnership(long jarg1, PublicationEvent jarg1_);
public final static native void delete_RegistrationEvent(long jarg1);
public final static native int RegistrationEvent_getType(long jarg1, RegistrationEvent jarg1_);
public final static native long RegistrationEvent_getSession(long jarg1, RegistrationEvent jarg1_);
@ -182,6 +184,7 @@ public class tinyWRAPJNI {
public final static native void delete_SubscriptionEvent(long jarg1);
public final static native int SubscriptionEvent_getType(long jarg1, SubscriptionEvent jarg1_);
public final static native long SubscriptionEvent_getSession(long jarg1, SubscriptionEvent jarg1_);
public final static native long SubscriptionEvent_takeSessionOwnership(long jarg1, SubscriptionEvent jarg1_);
public final static native void delete_T140CallbackData(long jarg1);
public final static native int T140CallbackData_getType(long jarg1, T140CallbackData jarg1_);
public final static native long T140CallbackData_getSize(long jarg1, T140CallbackData jarg1_);
@ -471,6 +474,7 @@ public class tinyWRAPJNI {
public final static native void delete_SipStack(long jarg1);
public final static native boolean SipStack_start(long jarg1, SipStack jarg1_);
public final static native boolean SipStack_setDebugCallback(long jarg1, SipStack jarg1_, long jarg2, DDebugCallback jarg2_);
public final static native boolean SipStack_setDisplayName(long jarg1, SipStack jarg1_, String jarg2);
public final static native boolean SipStack_setRealm(long jarg1, SipStack jarg1_, String jarg2);
public final static native boolean SipStack_setIMPI(long jarg1, SipStack jarg1_, String jarg2);
public final static native boolean SipStack_setIMPU(long jarg1, SipStack jarg1_, String jarg2);

View File

@ -419,6 +419,7 @@ namespace Swig {
#include <stdint.h> // Use the C99 official header
#include "tinyWRAP_config.h"
#include "DDebug.h"
#include "AudioResampler.h"
@ -2308,6 +2309,23 @@ SWIGEXPORT jboolean JNICALL Java_org_doubango_tinyWRAP_tinyWRAPJNI_ActionConfig_
}
SWIGEXPORT jboolean JNICALL Java_org_doubango_tinyWRAP_tinyWRAPJNI_ActionConfig_1setActiveMedia(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jint jarg2) {
jboolean jresult = 0 ;
ActionConfig *arg1 = (ActionConfig *) 0 ;
twrap_media_type_t arg2 ;
bool result;
(void)jenv;
(void)jcls;
(void)jarg1_;
arg1 = *(ActionConfig **)&jarg1;
arg2 = (twrap_media_type_t)jarg2;
result = (bool)(arg1)->setActiveMedia(arg2);
jresult = (jboolean)result;
return jresult;
}
SWIGEXPORT jlong JNICALL Java_org_doubango_tinyWRAP_tinyWRAPJNI_ActionConfig_1setResponseLine(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jshort jarg2, jstring jarg3) {
jlong jresult = 0 ;
ActionConfig *arg1 = (ActionConfig *) 0 ;
@ -4604,6 +4622,21 @@ SWIGEXPORT jlong JNICALL Java_org_doubango_tinyWRAP_tinyWRAPJNI_PublicationEvent
}
SWIGEXPORT jlong JNICALL Java_org_doubango_tinyWRAP_tinyWRAPJNI_PublicationEvent_1takeSessionOwnership(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) {
jlong jresult = 0 ;
PublicationEvent *arg1 = (PublicationEvent *) 0 ;
PublicationSession *result = 0 ;
(void)jenv;
(void)jcls;
(void)jarg1_;
arg1 = *(PublicationEvent **)&jarg1;
result = (PublicationSession *)((PublicationEvent const *)arg1)->takeSessionOwnership();
*(PublicationSession **)&jresult = result;
return jresult;
}
SWIGEXPORT void JNICALL Java_org_doubango_tinyWRAP_tinyWRAPJNI_delete_1RegistrationEvent(JNIEnv *jenv, jclass jcls, jlong jarg1) {
RegistrationEvent *arg1 = (RegistrationEvent *) 0 ;
@ -4699,6 +4732,21 @@ SWIGEXPORT jlong JNICALL Java_org_doubango_tinyWRAP_tinyWRAPJNI_SubscriptionEven
}
SWIGEXPORT jlong JNICALL Java_org_doubango_tinyWRAP_tinyWRAPJNI_SubscriptionEvent_1takeSessionOwnership(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) {
jlong jresult = 0 ;
SubscriptionEvent *arg1 = (SubscriptionEvent *) 0 ;
SubscriptionSession *result = 0 ;
(void)jenv;
(void)jcls;
(void)jarg1_;
arg1 = *(SubscriptionEvent **)&jarg1;
result = (SubscriptionSession *)((SubscriptionEvent const *)arg1)->takeSessionOwnership();
*(SubscriptionSession **)&jresult = result;
return jresult;
}
SWIGEXPORT void JNICALL Java_org_doubango_tinyWRAP_tinyWRAPJNI_delete_1T140CallbackData(JNIEnv *jenv, jclass jcls, jlong jarg1) {
T140CallbackData *arg1 = (T140CallbackData *) 0 ;
@ -9735,6 +9783,28 @@ SWIGEXPORT jboolean JNICALL Java_org_doubango_tinyWRAP_tinyWRAPJNI_SipStack_1set
}
SWIGEXPORT jboolean JNICALL Java_org_doubango_tinyWRAP_tinyWRAPJNI_SipStack_1setDisplayName(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jstring jarg2) {
jboolean jresult = 0 ;
SipStack *arg1 = (SipStack *) 0 ;
char *arg2 = (char *) 0 ;
bool result;
(void)jenv;
(void)jcls;
(void)jarg1_;
arg1 = *(SipStack **)&jarg1;
arg2 = 0;
if (jarg2) {
arg2 = (char *)jenv->GetStringUTFChars(jarg2, 0);
if (!arg2) return 0;
}
result = (bool)(arg1)->setDisplayName((char const *)arg2);
jresult = (jboolean)result;
if (arg2) jenv->ReleaseStringUTFChars(jarg2, (const char *)arg2);
return jresult;
}
SWIGEXPORT jboolean JNICALL Java_org_doubango_tinyWRAP_tinyWRAPJNI_SipStack_1setRealm(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jstring jarg2) {
jboolean jresult = 0 ;
SipStack *arg1 = (SipStack *) 0 ;

View File

@ -158,6 +158,7 @@ sub DESTROY {
*addHeader = *tinyWRAPc::ActionConfig_addHeader;
*addPayload = *tinyWRAPc::ActionConfig_addPayload;
*setActiveMedia = *tinyWRAPc::ActionConfig_setActiveMedia;
*setResponseLine = *tinyWRAPc::ActionConfig_setResponseLine;
*setMediaString = *tinyWRAPc::ActionConfig_setMediaString;
*setMediaInt = *tinyWRAPc::ActionConfig_setMediaInt;
@ -761,6 +762,7 @@ sub DESTROY {
*getType = *tinyWRAPc::PublicationEvent_getType;
*getSession = *tinyWRAPc::PublicationEvent_getSession;
*takeSessionOwnership = *tinyWRAPc::PublicationEvent_takeSessionOwnership;
sub DISOWN {
my $self = shift;
my $ptr = tied(%$self);
@ -828,6 +830,7 @@ sub DESTROY {
*getType = *tinyWRAPc::SubscriptionEvent_getType;
*getSession = *tinyWRAPc::SubscriptionEvent_getSession;
*takeSessionOwnership = *tinyWRAPc::SubscriptionEvent_takeSessionOwnership;
sub DISOWN {
my $self = shift;
my $ptr = tied(%$self);
@ -1926,6 +1929,7 @@ sub DESTROY {
*start = *tinyWRAPc::SipStack_start;
*setDebugCallback = *tinyWRAPc::SipStack_setDebugCallback;
*setDisplayName = *tinyWRAPc::SipStack_setDisplayName;
*setRealm = *tinyWRAPc::SipStack_setRealm;
*setIMPI = *tinyWRAPc::SipStack_setIMPI;
*setIMPU = *tinyWRAPc::SipStack_setIMPU;
@ -2495,6 +2499,7 @@ package tinyWRAP;
*tsip_event_code_stack_stopped = *tinyWRAPc::tsip_event_code_stack_stopped;
*tsip_event_code_stack_failed_to_start = *tinyWRAPc::tsip_event_code_stack_failed_to_start;
*tsip_event_code_stack_failed_to_stop = *tinyWRAPc::tsip_event_code_stack_failed_to_stop;
*tsip_event_code_stack_disconnected = *tinyWRAPc::tsip_event_code_stack_disconnected;
*tsip_i_newreg = *tinyWRAPc::tsip_i_newreg;
*tsip_i_register = *tinyWRAPc::tsip_i_register;
*tsip_ao_register = *tinyWRAPc::tsip_ao_register;

View File

@ -1650,6 +1650,7 @@ SWIGEXPORT void SWIG_init (CV *cv, CPerlObj *);
#include <stdint.h> // Use the C99 official header
#include "tinyWRAP_config.h"
#include "DDebug.h"
#include "AudioResampler.h"
@ -1961,22 +1962,6 @@ SWIG_AsVal_long SWIG_PERL_DECL_ARGS_2(SV *obj, long* val)
}
SWIGINTERN int
SWIG_AsVal_short SWIG_PERL_DECL_ARGS_2(SV * obj, short *val)
{
long v;
int res = SWIG_AsVal_long SWIG_PERL_CALL_ARGS_2(obj, &v);
if (SWIG_IsOK(res)) {
if ((v < SHRT_MIN || v > SHRT_MAX)) {
return SWIG_OverflowError;
} else {
if (val) *val = static_cast< short >(v);
}
}
return res;
}
SWIGINTERN int
SWIG_AsVal_int SWIG_PERL_DECL_ARGS_2(SV * obj, int *val)
{
@ -1993,6 +1978,22 @@ SWIG_AsVal_int SWIG_PERL_DECL_ARGS_2(SV * obj, int *val)
}
SWIGINTERN int
SWIG_AsVal_short SWIG_PERL_DECL_ARGS_2(SV * obj, short *val)
{
long v;
int res = SWIG_AsVal_long SWIG_PERL_CALL_ARGS_2(obj, &v);
if (SWIG_IsOK(res)) {
if ((v < SHRT_MIN || v > SHRT_MAX)) {
return SWIG_OverflowError;
} else {
if (val) *val = static_cast< short >(v);
}
}
return res;
}
SWIGINTERNINLINE SV *
SWIG_FromCharPtrAndSize(const char* carray, size_t size)
{
@ -2902,6 +2903,44 @@ XS(_wrap_ActionConfig_addPayload) {
}
XS(_wrap_ActionConfig_setActiveMedia) {
{
ActionConfig *arg1 = (ActionConfig *) 0 ;
twrap_media_type_t arg2 ;
void *argp1 = 0 ;
int res1 = 0 ;
int val2 ;
int ecode2 = 0 ;
int argvi = 0;
bool result;
dXSARGS;
if ((items < 2) || (items > 2)) {
SWIG_croak("Usage: ActionConfig_setActiveMedia(self,type);");
}
res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_ActionConfig, 0 | 0 );
if (!SWIG_IsOK(res1)) {
SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ActionConfig_setActiveMedia" "', argument " "1"" of type '" "ActionConfig *""'");
}
arg1 = reinterpret_cast< ActionConfig * >(argp1);
ecode2 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
if (!SWIG_IsOK(ecode2)) {
SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ActionConfig_setActiveMedia" "', argument " "2"" of type '" "twrap_media_type_t""'");
}
arg2 = static_cast< twrap_media_type_t >(val2);
result = (bool)(arg1)->setActiveMedia(arg2);
ST(argvi) = SWIG_From_bool SWIG_PERL_CALL_ARGS_1(static_cast< bool >(result)); argvi++ ;
XSRETURN(argvi);
fail:
SWIG_croak_null();
}
}
XS(_wrap_ActionConfig_setResponseLine) {
{
ActionConfig *arg1 = (ActionConfig *) 0 ;
@ -7902,6 +7941,34 @@ XS(_wrap_PublicationEvent_getSession) {
}
XS(_wrap_PublicationEvent_takeSessionOwnership) {
{
PublicationEvent *arg1 = (PublicationEvent *) 0 ;
void *argp1 = 0 ;
int res1 = 0 ;
int argvi = 0;
PublicationSession *result = 0 ;
dXSARGS;
if ((items < 1) || (items > 1)) {
SWIG_croak("Usage: PublicationEvent_takeSessionOwnership(self);");
}
res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_PublicationEvent, 0 | 0 );
if (!SWIG_IsOK(res1)) {
SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "PublicationEvent_takeSessionOwnership" "', argument " "1"" of type '" "PublicationEvent const *""'");
}
arg1 = reinterpret_cast< PublicationEvent * >(argp1);
result = (PublicationSession *)((PublicationEvent const *)arg1)->takeSessionOwnership();
ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_PublicationSession, 0 | SWIG_SHADOW); argvi++ ;
XSRETURN(argvi);
fail:
SWIG_croak_null();
}
}
XS(_wrap_delete_RegistrationEvent) {
{
RegistrationEvent *arg1 = (RegistrationEvent *) 0 ;
@ -8096,6 +8163,34 @@ XS(_wrap_SubscriptionEvent_getSession) {
}
XS(_wrap_SubscriptionEvent_takeSessionOwnership) {
{
SubscriptionEvent *arg1 = (SubscriptionEvent *) 0 ;
void *argp1 = 0 ;
int res1 = 0 ;
int argvi = 0;
SubscriptionSession *result = 0 ;
dXSARGS;
if ((items < 1) || (items > 1)) {
SWIG_croak("Usage: SubscriptionEvent_takeSessionOwnership(self);");
}
res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_SubscriptionEvent, 0 | 0 );
if (!SWIG_IsOK(res1)) {
SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SubscriptionEvent_takeSessionOwnership" "', argument " "1"" of type '" "SubscriptionEvent const *""'");
}
arg1 = reinterpret_cast< SubscriptionEvent * >(argp1);
result = (SubscriptionSession *)((SubscriptionEvent const *)arg1)->takeSessionOwnership();
ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_SubscriptionSession, 0 | SWIG_SHADOW); argvi++ ;
XSRETURN(argvi);
fail:
SWIG_croak_null();
}
}
XS(_wrap_delete_T140CallbackData) {
{
T140CallbackData *arg1 = (T140CallbackData *) 0 ;
@ -20277,6 +20372,45 @@ XS(_wrap_SipStack_setDebugCallback) {
}
XS(_wrap_SipStack_setDisplayName) {
{
SipStack *arg1 = (SipStack *) 0 ;
char *arg2 = (char *) 0 ;
void *argp1 = 0 ;
int res1 = 0 ;
int res2 ;
char *buf2 = 0 ;
int alloc2 = 0 ;
int argvi = 0;
bool result;
dXSARGS;
if ((items < 2) || (items > 2)) {
SWIG_croak("Usage: SipStack_setDisplayName(self,display_name);");
}
res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_SipStack, 0 | 0 );
if (!SWIG_IsOK(res1)) {
SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SipStack_setDisplayName" "', argument " "1"" of type '" "SipStack *""'");
}
arg1 = reinterpret_cast< SipStack * >(argp1);
res2 = SWIG_AsCharPtrAndSize(ST(1), &buf2, NULL, &alloc2);
if (!SWIG_IsOK(res2)) {
SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "SipStack_setDisplayName" "', argument " "2"" of type '" "char const *""'");
}
arg2 = reinterpret_cast< char * >(buf2);
result = (bool)(arg1)->setDisplayName((char const *)arg2);
ST(argvi) = SWIG_From_bool SWIG_PERL_CALL_ARGS_1(static_cast< bool >(result)); argvi++ ;
if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
XSRETURN(argvi);
fail:
if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
SWIG_croak_null();
}
}
XS(_wrap_SipStack_setRealm) {
{
SipStack *arg1 = (SipStack *) 0 ;
@ -26540,6 +26674,7 @@ static swig_command_info swig_commands[] = {
{"tinyWRAPc::delete_ActionConfig", _wrap_delete_ActionConfig},
{"tinyWRAPc::ActionConfig_addHeader", _wrap_ActionConfig_addHeader},
{"tinyWRAPc::ActionConfig_addPayload", _wrap_ActionConfig_addPayload},
{"tinyWRAPc::ActionConfig_setActiveMedia", _wrap_ActionConfig_setActiveMedia},
{"tinyWRAPc::ActionConfig_setResponseLine", _wrap_ActionConfig_setResponseLine},
{"tinyWRAPc::ActionConfig_setMediaString", _wrap_ActionConfig_setMediaString},
{"tinyWRAPc::ActionConfig_setMediaInt", _wrap_ActionConfig_setMediaInt},
@ -26678,6 +26813,7 @@ static swig_command_info swig_commands[] = {
{"tinyWRAPc::delete_PublicationEvent", _wrap_delete_PublicationEvent},
{"tinyWRAPc::PublicationEvent_getType", _wrap_PublicationEvent_getType},
{"tinyWRAPc::PublicationEvent_getSession", _wrap_PublicationEvent_getSession},
{"tinyWRAPc::PublicationEvent_takeSessionOwnership", _wrap_PublicationEvent_takeSessionOwnership},
{"tinyWRAPc::delete_RegistrationEvent", _wrap_delete_RegistrationEvent},
{"tinyWRAPc::RegistrationEvent_getType", _wrap_RegistrationEvent_getType},
{"tinyWRAPc::RegistrationEvent_getSession", _wrap_RegistrationEvent_getSession},
@ -26685,6 +26821,7 @@ static swig_command_info swig_commands[] = {
{"tinyWRAPc::delete_SubscriptionEvent", _wrap_delete_SubscriptionEvent},
{"tinyWRAPc::SubscriptionEvent_getType", _wrap_SubscriptionEvent_getType},
{"tinyWRAPc::SubscriptionEvent_getSession", _wrap_SubscriptionEvent_getSession},
{"tinyWRAPc::SubscriptionEvent_takeSessionOwnership", _wrap_SubscriptionEvent_takeSessionOwnership},
{"tinyWRAPc::delete_T140CallbackData", _wrap_delete_T140CallbackData},
{"tinyWRAPc::T140CallbackData_getType", _wrap_T140CallbackData_getType},
{"tinyWRAPc::T140CallbackData_getSize", _wrap_T140CallbackData_getSize},
@ -26878,6 +27015,7 @@ static swig_command_info swig_commands[] = {
{"tinyWRAPc::delete_SipStack", _wrap_delete_SipStack},
{"tinyWRAPc::SipStack_start", _wrap_SipStack_start},
{"tinyWRAPc::SipStack_setDebugCallback", _wrap_SipStack_setDebugCallback},
{"tinyWRAPc::SipStack_setDisplayName", _wrap_SipStack_setDisplayName},
{"tinyWRAPc::SipStack_setRealm", _wrap_SipStack_setRealm},
{"tinyWRAPc::SipStack_setIMPI", _wrap_SipStack_setIMPI},
{"tinyWRAPc::SipStack_setIMPU", _wrap_SipStack_setIMPU},
@ -27636,6 +27774,11 @@ XS(SWIG_init) {
sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1(static_cast< int >(955)));
SvREADONLY_on(sv);
} while(0) /*@SWIG@*/;
/*@SWIG:/usr/local/share/swig/2.0.9/perl5/perltypemaps.swg,65,%set_constant@*/ do {
SV *sv = get_sv((char*) SWIG_prefix "tsip_event_code_stack_disconnected", TRUE | 0x2 | GV_ADDMULTI);
sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1(static_cast< int >(956)));
SvREADONLY_on(sv);
} while(0) /*@SWIG@*/;
/*@SWIG:/usr/local/share/swig/2.0.9/perl5/perltypemaps.swg,65,%set_constant@*/ do {
SV *sv = get_sv((char*) SWIG_prefix "tsip_i_newreg", TRUE | 0x2 | GV_ADDMULTI);
sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1(static_cast< int >(tsip_i_newreg)));

View File

@ -144,6 +144,7 @@ class ActionConfig(_object):
__del__ = lambda self : None;
def addHeader(self, *args): return _tinyWRAP.ActionConfig_addHeader(self, *args)
def addPayload(self, *args): return _tinyWRAP.ActionConfig_addPayload(self, *args)
def setActiveMedia(self, *args): return _tinyWRAP.ActionConfig_setActiveMedia(self, *args)
def setResponseLine(self, *args): return _tinyWRAP.ActionConfig_setResponseLine(self, *args)
def setMediaString(self, *args): return _tinyWRAP.ActionConfig_setMediaString(self, *args)
def setMediaInt(self, *args): return _tinyWRAP.ActionConfig_setMediaInt(self, *args)
@ -729,6 +730,7 @@ class PublicationEvent(SipEvent):
__del__ = lambda self : None;
def getType(self): return _tinyWRAP.PublicationEvent_getType(self)
def getSession(self): return _tinyWRAP.PublicationEvent_getSession(self)
def takeSessionOwnership(self): return _tinyWRAP.PublicationEvent_takeSessionOwnership(self)
PublicationEvent_swigregister = _tinyWRAP.PublicationEvent_swigregister
PublicationEvent_swigregister(PublicationEvent)
@ -762,6 +764,7 @@ class SubscriptionEvent(SipEvent):
__del__ = lambda self : None;
def getType(self): return _tinyWRAP.SubscriptionEvent_getType(self)
def getSession(self): return _tinyWRAP.SubscriptionEvent_getSession(self)
def takeSessionOwnership(self): return _tinyWRAP.SubscriptionEvent_takeSessionOwnership(self)
SubscriptionEvent_swigregister = _tinyWRAP.SubscriptionEvent_swigregister
SubscriptionEvent_swigregister(SubscriptionEvent)
@ -1423,6 +1426,7 @@ class SipStack(SafeObject):
__del__ = lambda self : None;
def start(self): return _tinyWRAP.SipStack_start(self)
def setDebugCallback(self, *args): return _tinyWRAP.SipStack_setDebugCallback(self, *args)
def setDisplayName(self, *args): return _tinyWRAP.SipStack_setDisplayName(self, *args)
def setRealm(self, *args): return _tinyWRAP.SipStack_setRealm(self, *args)
def setIMPI(self, *args): return _tinyWRAP.SipStack_setIMPI(self, *args)
def setIMPU(self, *args): return _tinyWRAP.SipStack_setIMPU(self, *args)
@ -1544,6 +1548,7 @@ tsip_event_code_stack_stopping = _tinyWRAP.tsip_event_code_stack_stopping
tsip_event_code_stack_stopped = _tinyWRAP.tsip_event_code_stack_stopped
tsip_event_code_stack_failed_to_start = _tinyWRAP.tsip_event_code_stack_failed_to_start
tsip_event_code_stack_failed_to_stop = _tinyWRAP.tsip_event_code_stack_failed_to_stop
tsip_event_code_stack_disconnected = _tinyWRAP.tsip_event_code_stack_disconnected
tsip_i_newreg = _tinyWRAP.tsip_i_newreg
tsip_i_register = _tinyWRAP.tsip_i_register
tsip_ao_register = _tinyWRAP.tsip_ao_register

View File

@ -3638,6 +3638,7 @@ namespace swig {
#include <stdint.h> // Use the C99 official header
#include "tinyWRAP_config.h"
#include "DDebug.h"
#include "AudioResampler.h"
@ -6079,6 +6080,37 @@ fail:
}
SWIGINTERN PyObject *_wrap_ActionConfig_setActiveMedia(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
PyObject *resultobj = 0;
ActionConfig *arg1 = (ActionConfig *) 0 ;
twrap_media_type_t arg2 ;
void *argp1 = 0 ;
int res1 = 0 ;
int val2 ;
int ecode2 = 0 ;
PyObject * obj0 = 0 ;
PyObject * obj1 = 0 ;
bool result;
if (!PyArg_ParseTuple(args,(char *)"OO:ActionConfig_setActiveMedia",&obj0,&obj1)) SWIG_fail;
res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_ActionConfig, 0 | 0 );
if (!SWIG_IsOK(res1)) {
SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ActionConfig_setActiveMedia" "', argument " "1"" of type '" "ActionConfig *""'");
}
arg1 = reinterpret_cast< ActionConfig * >(argp1);
ecode2 = SWIG_AsVal_int(obj1, &val2);
if (!SWIG_IsOK(ecode2)) {
SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ActionConfig_setActiveMedia" "', argument " "2"" of type '" "twrap_media_type_t""'");
}
arg2 = static_cast< twrap_media_type_t >(val2);
result = (bool)(arg1)->setActiveMedia(arg2);
resultobj = SWIG_From_bool(static_cast< bool >(result));
return resultobj;
fail:
return NULL;
}
SWIGINTERN PyObject *_wrap_ActionConfig_setResponseLine(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
PyObject *resultobj = 0;
ActionConfig *arg1 = (ActionConfig *) 0 ;
@ -10124,6 +10156,28 @@ fail:
}
SWIGINTERN PyObject *_wrap_PublicationEvent_takeSessionOwnership(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
PyObject *resultobj = 0;
PublicationEvent *arg1 = (PublicationEvent *) 0 ;
void *argp1 = 0 ;
int res1 = 0 ;
PyObject * obj0 = 0 ;
PublicationSession *result = 0 ;
if (!PyArg_ParseTuple(args,(char *)"O:PublicationEvent_takeSessionOwnership",&obj0)) SWIG_fail;
res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_PublicationEvent, 0 | 0 );
if (!SWIG_IsOK(res1)) {
SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "PublicationEvent_takeSessionOwnership" "', argument " "1"" of type '" "PublicationEvent const *""'");
}
arg1 = reinterpret_cast< PublicationEvent * >(argp1);
result = (PublicationSession *)((PublicationEvent const *)arg1)->takeSessionOwnership();
resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_PublicationSession, 0 | 0 );
return resultobj;
fail:
return NULL;
}
SWIGINTERN PyObject *PublicationEvent_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
PyObject *obj;
if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL;
@ -10290,6 +10344,28 @@ fail:
}
SWIGINTERN PyObject *_wrap_SubscriptionEvent_takeSessionOwnership(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
PyObject *resultobj = 0;
SubscriptionEvent *arg1 = (SubscriptionEvent *) 0 ;
void *argp1 = 0 ;
int res1 = 0 ;
PyObject * obj0 = 0 ;
SubscriptionSession *result = 0 ;
if (!PyArg_ParseTuple(args,(char *)"O:SubscriptionEvent_takeSessionOwnership",&obj0)) SWIG_fail;
res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_SubscriptionEvent, 0 | 0 );
if (!SWIG_IsOK(res1)) {
SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SubscriptionEvent_takeSessionOwnership" "', argument " "1"" of type '" "SubscriptionEvent const *""'");
}
arg1 = reinterpret_cast< SubscriptionEvent * >(argp1);
result = (SubscriptionSession *)((SubscriptionEvent const *)arg1)->takeSessionOwnership();
resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_SubscriptionSession, 0 | 0 );
return resultobj;
fail:
return NULL;
}
SWIGINTERN PyObject *SubscriptionEvent_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
PyObject *obj;
if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL;
@ -20174,6 +20250,40 @@ fail:
}
SWIGINTERN PyObject *_wrap_SipStack_setDisplayName(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
PyObject *resultobj = 0;
SipStack *arg1 = (SipStack *) 0 ;
char *arg2 = (char *) 0 ;
void *argp1 = 0 ;
int res1 = 0 ;
int res2 ;
char *buf2 = 0 ;
int alloc2 = 0 ;
PyObject * obj0 = 0 ;
PyObject * obj1 = 0 ;
bool result;
if (!PyArg_ParseTuple(args,(char *)"OO:SipStack_setDisplayName",&obj0,&obj1)) SWIG_fail;
res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_SipStack, 0 | 0 );
if (!SWIG_IsOK(res1)) {
SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SipStack_setDisplayName" "', argument " "1"" of type '" "SipStack *""'");
}
arg1 = reinterpret_cast< SipStack * >(argp1);
res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2);
if (!SWIG_IsOK(res2)) {
SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "SipStack_setDisplayName" "', argument " "2"" of type '" "char const *""'");
}
arg2 = reinterpret_cast< char * >(buf2);
result = (bool)(arg1)->setDisplayName((char const *)arg2);
resultobj = SWIG_From_bool(static_cast< bool >(result));
if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
return resultobj;
fail:
if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
return NULL;
}
SWIGINTERN PyObject *_wrap_SipStack_setRealm(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
PyObject *resultobj = 0;
SipStack *arg1 = (SipStack *) 0 ;
@ -25148,6 +25258,7 @@ static PyMethodDef SwigMethods[] = {
{ (char *)"delete_ActionConfig", _wrap_delete_ActionConfig, METH_VARARGS, NULL},
{ (char *)"ActionConfig_addHeader", _wrap_ActionConfig_addHeader, METH_VARARGS, NULL},
{ (char *)"ActionConfig_addPayload", _wrap_ActionConfig_addPayload, METH_VARARGS, NULL},
{ (char *)"ActionConfig_setActiveMedia", _wrap_ActionConfig_setActiveMedia, METH_VARARGS, NULL},
{ (char *)"ActionConfig_setResponseLine", _wrap_ActionConfig_setResponseLine, METH_VARARGS, NULL},
{ (char *)"ActionConfig_setMediaString", _wrap_ActionConfig_setMediaString, METH_VARARGS, NULL},
{ (char *)"ActionConfig_setMediaInt", _wrap_ActionConfig_setMediaInt, METH_VARARGS, NULL},
@ -25301,6 +25412,7 @@ static PyMethodDef SwigMethods[] = {
{ (char *)"delete_PublicationEvent", _wrap_delete_PublicationEvent, METH_VARARGS, NULL},
{ (char *)"PublicationEvent_getType", _wrap_PublicationEvent_getType, METH_VARARGS, NULL},
{ (char *)"PublicationEvent_getSession", _wrap_PublicationEvent_getSession, METH_VARARGS, NULL},
{ (char *)"PublicationEvent_takeSessionOwnership", _wrap_PublicationEvent_takeSessionOwnership, METH_VARARGS, NULL},
{ (char *)"PublicationEvent_swigregister", PublicationEvent_swigregister, METH_VARARGS, NULL},
{ (char *)"delete_RegistrationEvent", _wrap_delete_RegistrationEvent, METH_VARARGS, NULL},
{ (char *)"RegistrationEvent_getType", _wrap_RegistrationEvent_getType, METH_VARARGS, NULL},
@ -25310,6 +25422,7 @@ static PyMethodDef SwigMethods[] = {
{ (char *)"delete_SubscriptionEvent", _wrap_delete_SubscriptionEvent, METH_VARARGS, NULL},
{ (char *)"SubscriptionEvent_getType", _wrap_SubscriptionEvent_getType, METH_VARARGS, NULL},
{ (char *)"SubscriptionEvent_getSession", _wrap_SubscriptionEvent_getSession, METH_VARARGS, NULL},
{ (char *)"SubscriptionEvent_takeSessionOwnership", _wrap_SubscriptionEvent_takeSessionOwnership, METH_VARARGS, NULL},
{ (char *)"SubscriptionEvent_swigregister", SubscriptionEvent_swigregister, METH_VARARGS, NULL},
{ (char *)"delete_T140CallbackData", _wrap_delete_T140CallbackData, METH_VARARGS, NULL},
{ (char *)"T140CallbackData_getType", _wrap_T140CallbackData_getType, METH_VARARGS, NULL},
@ -25537,6 +25650,7 @@ static PyMethodDef SwigMethods[] = {
{ (char *)"delete_SipStack", _wrap_delete_SipStack, METH_VARARGS, NULL},
{ (char *)"SipStack_start", _wrap_SipStack_start, METH_VARARGS, NULL},
{ (char *)"SipStack_setDebugCallback", _wrap_SipStack_setDebugCallback, METH_VARARGS, NULL},
{ (char *)"SipStack_setDisplayName", _wrap_SipStack_setDisplayName, METH_VARARGS, NULL},
{ (char *)"SipStack_setRealm", _wrap_SipStack_setRealm, METH_VARARGS, NULL},
{ (char *)"SipStack_setIMPI", _wrap_SipStack_setIMPI, METH_VARARGS, NULL},
{ (char *)"SipStack_setIMPU", _wrap_SipStack_setIMPU, METH_VARARGS, NULL},
@ -26891,6 +27005,7 @@ SWIG_init(void) {
SWIG_Python_SetConstant(d, "tsip_event_code_stack_stopped",SWIG_From_int(static_cast< int >(953)));
SWIG_Python_SetConstant(d, "tsip_event_code_stack_failed_to_start",SWIG_From_int(static_cast< int >(954)));
SWIG_Python_SetConstant(d, "tsip_event_code_stack_failed_to_stop",SWIG_From_int(static_cast< int >(955)));
SWIG_Python_SetConstant(d, "tsip_event_code_stack_disconnected",SWIG_From_int(static_cast< int >(956)));
SWIG_Python_SetConstant(d, "tsip_i_newreg",SWIG_From_int(static_cast< int >(tsip_i_newreg)));
SWIG_Python_SetConstant(d, "tsip_i_register",SWIG_From_int(static_cast< int >(tsip_i_register)));
SWIG_Python_SetConstant(d, "tsip_ao_register",SWIG_From_int(static_cast< int >(tsip_ao_register)));

View File

@ -604,33 +604,30 @@ void *tnet_transport_mainthread(void *param)
/*================== TNET_POLLHUP ==================*/
if(context->ufds[i].revents & (TNET_POLLHUP)){
fd = active_socket->fd;
fd = active_socket->fd;
TSK_DEBUG_INFO("NETWORK EVENT FOR SERVER [%s] -- TNET_POLLHUP(%d)", transport->description, fd);
#if defined(ANDROID)
/* FIXME */
#else
tnet_transport_remove_socket(transport, &active_socket->fd);
tnet_transport_remove_socket(transport, &active_socket->fd);
TSK_RUNNABLE_ENQUEUE(transport, event_closed, transport->callback_data, fd);
continue;
#endif
}
/*================== TNET_POLLERR ==================*/
if(context->ufds[i].revents & (TNET_POLLERR)){
fd = active_socket->fd;
fd = active_socket->fd;
TSK_DEBUG_INFO("NETWORK EVENT FOR SERVER [%s] -- TNET_POLLERR(%d)", transport->description, fd);
tnet_transport_remove_socket(transport, &active_socket->fd);
tnet_transport_remove_socket(transport, &active_socket->fd);
TSK_RUNNABLE_ENQUEUE(transport, event_error, transport->callback_data, fd);
continue;
}
/*================== TNET_POLLNVAL ==================*/
if(context->ufds[i].revents & (TNET_POLLNVAL)){
fd = active_socket->fd;
fd = active_socket->fd;
TSK_DEBUG_INFO("NETWORK EVENT FOR SERVER [%s] -- TNET_POLLNVAL(%d)", transport->description, fd);
tnet_transport_remove_socket(transport, &active_socket->fd);
tnet_transport_remove_socket(transport, &active_socket->fd);
TSK_RUNNABLE_ENQUEUE(transport, event_error, transport->callback_data, fd);
continue;
}

View File

@ -184,6 +184,7 @@ int tsip_dialog_set_lasterror_2(tsip_dialog_t* self, const char* phrase, short c
int tsip_dialog_get_lasterror(const tsip_dialog_t* self, short *code, const char** phrase, const tsip_message_t **message);
int tsip_dialog_hangup(tsip_dialog_t *self, const tsip_action_t* action);
int tsip_dialog_shutdown(tsip_dialog_t *self, const tsip_action_t* action);
int tsip_dialog_signal_transport_error(tsip_dialog_t *self);
int tsip_dialog_remove(const tsip_dialog_t* self);
int tsip_dialog_cmp(const tsip_dialog_t *d1, const tsip_dialog_t *d2);
int tsip_dialog_deinit(tsip_dialog_t *self);

View File

@ -57,6 +57,7 @@ typedef enum _fsm_action_e
_fsm_action_oINFO = tsip_atype_info_send,
_fsm_action_oBYE = tsip_atype_hangup,
_fsm_action_oShutdown = tsip_atype_shutdown,
_fsm_action_transporterror = tsip_atype_transport_error,
_fsm_action_iINVITE = 0xFF,
_fsm_action_oUPDATE,
@ -84,7 +85,6 @@ typedef enum _fsm_action_e
_fsm_action_i422,
_fsm_action_shutdown_timedout, /* Any -> Terminated */
_fsm_action_transporterror,
_fsm_action_error,
}
_fsm_action_t;

View File

@ -68,6 +68,7 @@ tsip_dialog_t* tsip_dialog_layer_find_by_ssid(tsip_dialog_layer_t *self, tsip_ss
tsip_dialog_t* tsip_dialog_layer_find_by_callid(tsip_dialog_layer_t *self, const char* callid);
TINYSIP_API int tsip_dialog_layer_shutdownAll(tsip_dialog_layer_t *self);
int tsip_dialog_layer_signal_transport_error(tsip_dialog_layer_t *self);
tsip_dialog_t* tsip_dialog_layer_new(tsip_dialog_layer_t *self, tsip_dialog_type_t type, const tsip_ssession_t *ss);
int tsip_dialog_layer_remove(tsip_dialog_layer_t *self, const tsip_dialog_t *dialog);

View File

@ -39,6 +39,7 @@ typedef enum _fsm_action_e
_fsm_action_oREGISTER = tsip_atype_register,
_fsm_action_cancel = tsip_atype_cancel,
_fsm_action_shutdown = tsip_atype_shutdown,
_fsm_action_transporterror = tsip_atype_transport_error,
_fsm_action_1xx = 0xFF,
_fsm_action_2xx,
@ -49,7 +50,6 @@ typedef enum _fsm_action_e
_fsm_action_iREGISTER,
_fsm_action_shutdown_timedout, /* Any -> Terminated */
_fsm_action_transporterror,
_fsm_action_error,
}
_fsm_action_t;

View File

@ -99,6 +99,8 @@ typedef enum tsip_action_type_e
tsip_atype_hangup,
//! Shutdown a SIP dialog. Should only be called by the stack.
tsip_atype_shutdown,
//! Signal transport error. Should only be called by the stack.
tsip_atype_transport_error,
}
tsip_action_type_t;

View File

@ -78,6 +78,7 @@ tsip_event_type_t;
#define tsip_event_code_stack_stopped 953
#define tsip_event_code_stack_failed_to_start 954
#define tsip_event_code_stack_failed_to_stop 955
#define tsip_event_code_stack_disconnected 956
typedef struct tsip_event_s

View File

@ -1145,15 +1145,18 @@ int tsip_dialog_init(tsip_dialog_t *self, tsip_dialog_type_t type, const char* c
int tsip_dialog_fsm_act(tsip_dialog_t* self, tsk_fsm_action_id action_id, const tsip_message_t* message, const tsip_action_handle_t* action)
{
int ret;
tsip_dialog_t* copy;
if(!self || !self->fsm){
TSK_DEBUG_ERROR("Invalid parameter.");
return -1;
}
tsk_safeobj_lock(self);
ret = tsip_dialog_set_curr_action(self, action);
ret = tsk_fsm_act(self->fsm, action_id, self, message, self, message, action);
tsk_safeobj_unlock(self);
copy = tsk_object_ref(self); /* keep a copy because tsk_fsm_act() could destroy the dialog */
ret = tsip_dialog_set_curr_action(copy, action);
ret = tsk_fsm_act(copy->fsm, action_id, copy, message, copy, message, action);
tsk_safeobj_unlock(copy);
tsk_object_unref(copy);
return ret;
}
@ -1239,6 +1242,7 @@ int tsip_dialog_hangup(tsip_dialog_t *self, const tsip_action_t* action)
return tsip_dialog_fsm_act(self, tsip_atype_cancel, tsk_null, action);
}
}
TSK_DEBUG_ERROR("Invalid parameter");
return -1;
}
@ -1247,6 +1251,16 @@ int tsip_dialog_shutdown(tsip_dialog_t *self, const tsip_action_t* action)
if(self){
return tsip_dialog_fsm_act(self, tsip_atype_shutdown, tsk_null, action);
}
TSK_DEBUG_ERROR("Invalid parameter");
return -1;
}
int tsip_dialog_signal_transport_error(tsip_dialog_t *self)
{
if(self){
return tsip_dialog_fsm_act(self, tsip_atype_transport_error, tsk_null, tsk_null);
}
TSK_DEBUG_ERROR("Invalid parameter");
return -1;
}

View File

@ -72,13 +72,13 @@ typedef enum _fsm_action_e
_fsm_action_reject = tsip_atype_reject,
_fsm_action_cancel = tsip_atype_cancel,
_fsm_action_shutdown = tsip_atype_shutdown,
_fsm_action_transporterror = tsip_atype_transport_error,
_fsm_action_receiveINFO = 0xFF,
_fsm_action_1xx,
_fsm_action_2xx,
_fsm_action_401_407_421_494,
_fsm_action_300_to_699,
_fsm_action_transporterror,
_fsm_action_error,
}
_fsm_action_t;

View File

@ -280,6 +280,35 @@ done:
return -1;
}
int tsip_dialog_layer_signal_transport_error(tsip_dialog_layer_t *self)
{
tsk_list_item_t *item;
int dialogs_count;
if(!self){
TSK_DEBUG_ERROR("Invalid parameter");
return -1;
}
tsk_safeobj_lock(self);
dialogs_count = tsk_list_count(self->dialogs, tsk_null, tsk_null);
again:
tsk_list_foreach(item, self->dialogs){
if(item->data){
// if "tsip_dialog_signal_transport_error()" remove the dialog, then
// "self->dialogs" will became unsafe while looping
tsip_dialog_signal_transport_error(TSIP_DIALOG(item->data));
if(--dialogs_count <= 0){ // guard against endless loops
break;
}
goto again;
}
}
tsk_safeobj_unlock(self);
return 0;
}
/* the caller of this function must unref() the returned object */
tsip_dialog_t* tsip_dialog_layer_new(tsip_dialog_layer_t *self, tsip_dialog_type_t type, const tsip_ssession_t *ss)
{

View File

@ -72,13 +72,13 @@ typedef enum _fsm_action_e
_fsm_action_reject = tsip_atype_reject,
_fsm_action_cancel = tsip_atype_cancel,
_fsm_action_shutdown = tsip_atype_shutdown,
_fsm_action_transporterror = tsip_atype_transport_error,
_fsm_action_receiveMESSAGE = 0xFF,
_fsm_action_1xx,
_fsm_action_2xx,
_fsm_action_401_407_421_494,
_fsm_action_300_to_699,
_fsm_action_transporterror,
_fsm_action_error,
}
_fsm_action_t;

View File

@ -73,13 +73,13 @@ typedef enum _fsm_action_e
_fsm_action_reject = tsip_atype_reject,
_fsm_action_cancel = tsip_atype_cancel,
_fsm_action_shutdown = tsip_atype_shutdown,
_fsm_action_transporterror = tsip_atype_transport_error,
_fsm_action_receiveOPTIONS = 0xFF,
_fsm_action_1xx,
_fsm_action_2xx,
_fsm_action_401_407_421_494,
_fsm_action_300_to_699,
_fsm_action_transporterror,
_fsm_action_error,
}
_fsm_action_t;

View File

@ -97,6 +97,7 @@ typedef enum _fsm_action_e
_fsm_action_cancel = tsip_atype_cancel,
_fsm_action_hangup = tsip_atype_unpublish,
_fsm_action_shutdown = tsip_atype_shutdown,
_fsm_action_transporterror = tsip_atype_transport_error,
_fsm_action_1xx = 0xFF,
_fsm_action_2xx,
@ -104,7 +105,6 @@ typedef enum _fsm_action_e
_fsm_action_423,
_fsm_action_300_to_699,
_fsm_action_shutdown_timedout, /* Any -> Terminated */
_fsm_action_transporterror,
_fsm_action_error,
}
_fsm_action_t;

View File

@ -117,6 +117,7 @@ typedef enum _fsm_action_e
_fsm_action_hangup = tsip_atype_hangup,
_fsm_action_cancel = tsip_atype_cancel,
_fsm_action_shutdown = tsip_atype_shutdown,
_fsm_action_transporterror = tsip_atype_transport_error,
_fsm_action_1xx = 0xFF,
_fsm_action_2xx,
@ -125,7 +126,6 @@ typedef enum _fsm_action_e
_fsm_action_300_to_699,
_fsm_action_shutdown_timedout, /* Any -> Terminated */
_fsm_action_notify,
_fsm_action_transporterror,
_fsm_action_error,
}
_fsm_action_t;

View File

@ -50,7 +50,7 @@
* Tests have been done with both compact and full headers */
#define TSIP_MIN_STREAM_CHUNCK_SIZE 0xA0
extern tsip_event_t* tsip_event_create(tsip_ssession_t* ss, short code, const char* phrase, const tsip_message_t* sipmessage, tsip_event_type_t type);
tsip_transport_layer_t* tsip_transport_layer_create(tsip_stack_t *stack)
{
@ -133,12 +133,25 @@ static int tsip_transport_layer_stream_cb(const tnet_transport_event_t* e)
switch(e->type){
case event_data: {
TSK_DEBUG_INFO("\n\n\nSIP Message:%.*s\n\n\n", e->size, (const char*)e->data);
TSK_DEBUG_INFO("\n\nRECV:%.*s\n\n", e->size, (const char*)e->data);
break;
}
case event_closed:
case event_error:
{
TSK_DEBUG_INFO("Stream Peer closed - %d", e->local_fd);
if(transport->connectedFD == e->local_fd){
TSK_DEBUG_INFO("SIP socket closed");
if(transport->stack){
tsip_event_t* e;
// signal to all dialogs that transport error raised
tsip_dialog_layer_signal_transport_error(TSIP_STACK(transport->stack)->layer_dialog);
// signal to the end-user that the stack is disconnected
if((e = tsip_event_create(tsk_null, tsip_event_code_stack_disconnected, "Stack disconnected", tsk_null, tsip_event_stack))){
TSK_RUNNABLE_ENQUEUE_OBJECT(TSK_RUNNABLE(transport->stack), e);
}
}
}
return tsip_transport_remove_stream_peer_by_local_fd(transport, e->local_fd);
}
case event_connected:
@ -553,7 +566,7 @@ static int tsip_transport_layer_dgram_cb(const tnet_transport_event_t* e)
switch(e->type){
case event_data: {
//--TSK_DEBUG_INFO("\n\nRECV SIP Message:%s\n\n\n", (const char*)e->data);
TSK_DEBUG_INFO("\n\nRECV:%.*s\n\n", e->size, (const char*)e->data);
break;
}
case event_closed: