diff --git a/src/callmodel.cpp b/src/callmodel.cpp index 613c4eb911291f2d7419d30b0637298806bd60bb..86b5535cd077217e5bb6a01a58de0b514c9abcae 100644 --- a/src/callmodel.cpp +++ b/src/callmodel.cpp @@ -95,7 +95,7 @@ public: CallModel* q_ptr; private Q_SLOTS: - void slotCallStateChanged ( const QString& callID , const QString &state ); + void slotCallStateChanged ( const QString& callID , const QString &state, int code); void slotIncomingCall ( const QString& accountID , const QString & callID ); void slotIncomingConference ( const QString& confID ); void slotChangingConference ( const QString& confID , const QString &state ); @@ -156,7 +156,7 @@ void CallModelPrivate::init() //SLOTS /* SENDER SIGNAL RECEIVER SLOT */ - /**/connect(&callManager, SIGNAL(callStateChanged(QString,QString)) , this , SLOT(slotCallStateChanged(QString,QString)) ); + /**/connect(&callManager, SIGNAL(callStateChanged(QString,QString,int)) , this , SLOT(slotCallStateChanged(QString,QString,int))); /**/connect(&callManager, SIGNAL(incomingCall(QString,QString,QString)) , this , SLOT(slotIncomingCall(QString,QString)) ); /**/connect(&callManager, SIGNAL(conferenceCreated(QString)) , this , SLOT(slotIncomingConference(QString)) ); /**/connect(&callManager, SIGNAL(conferenceChanged(QString,QString)) , this , SLOT(slotChangingConference(QString,QString)) ); @@ -1012,7 +1012,7 @@ bool CallModel::dropMimeData(const QMimeData* mimedata, Qt::DropAction action, i ****************************************************************************/ ///When a call state change -void CallModelPrivate::slotCallStateChanged(const QString& callID, const QString& stateName) +void CallModelPrivate::slotCallStateChanged(const QString& callID, const QString& stateName, int code) { //This code is part of the CallModel interface too qDebug() << "Call State Changed for call " << callID << " . New state : " << stateName; diff --git a/src/qtwrapper/callmanager_wrap.h b/src/qtwrapper/callmanager_wrap.h index 8926f5d200a419e6beeaed11f0a157184600fb67..aa12d0dd665c93cfc12fbf2b4f8af693626133c3 100644 --- a/src/qtwrapper/callmanager_wrap.h +++ b/src/qtwrapper/callmanager_wrap.h @@ -50,9 +50,9 @@ public: callHandlers = { exportable_callback<CallSignal::StateChange>( - [this] (const std::string &callID, const std::string &state) { - QTimer::singleShot(0, [this,callID, state] { - emit this->callStateChanged(QString(callID.c_str()), QString(state.c_str())); + [this] (const std::string &callID, const std::string &state, int code) { + QTimer::singleShot(0, [this,callID, state, code] { + emit this->callStateChanged(QString(callID.c_str()), QString(state.c_str()), code); }); }), exportable_callback<CallSignal::TransferFailed>( @@ -128,12 +128,6 @@ public: emit this->newCallCreated(QString(accountID.c_str()), QString(callID.c_str()), QString(to.c_str())); }); }), - exportable_callback<CallSignal::SipCallStateChanged>( - [this] (const std::string &callID, const std::string &state, int code) { - QTimer::singleShot(0, [this,callID, state, code] { - emit this->sipCallStateChanged(QString(callID.c_str()), QString(state.c_str()), code); - }); - }), exportable_callback<CallSignal::RecordingStateChanged>( [this] (const std::string &callID, bool recordingState) { QTimer::singleShot(0, [this,callID, recordingState] { @@ -420,7 +414,7 @@ public Q_SLOTS: // METHODS } Q_SIGNALS: // SIGNALS - void callStateChanged(const QString &callID, const QString &state); + void callStateChanged(const QString &callID, const QString &state, int code); void transferFailed(); void transferSucceeded(); void recordPlaybackStopped(const QString &filepath); @@ -433,7 +427,6 @@ Q_SIGNALS: // SIGNALS void updatePlaybackScale(const QString &filepath, int position, int size); void conferenceRemoved(const QString &confID); void newCallCreated(const QString &accountID, const QString &callID, const QString &to); - void sipCallStateChanged(const QString &callID, const QString &state, int code); void recordingStateChanged(const QString &callID, bool recordingState); void secureSdesOn(const QString &callID); void secureSdesOff(const QString &callID); diff --git a/xml/callmanager-introspec.xml b/xml/callmanager-introspec.xml index 912b2c3da42711f9afbb731ee6b668d63e78b795..9dae7b484c568cde1656ecea003d0b2f66f94534 100644 --- a/xml/callmanager-introspec.xml +++ b/xml/callmanager-introspec.xml @@ -505,6 +505,11 @@ </ul> </tp:docstring> </arg> + <arg type="i" name="code" > + <tp:docstring> + The SIP or IAX2 message code + </tp:docstring> + </arg> </signal> <signal name="conferenceChanged" tp:name-for-bindings="conferenceChanged"> @@ -633,25 +638,6 @@ <arg type="s" name="filepath" direction="in"/> </method> - <signal name="sipCallStateChanged" tp:name-for-bindings="sipCallStateChanged"> - <tp:docstring> - <p>Call state changed, Ring received a notification - from registrar concerning this call.</p> - </tp:docstring> - <arg type="s" name="callID" /> - <tp:docstring> - The call ID - </tp:docstring> - <arg type="s" name="state" /> - <tp:docstring> - Description string - </tp:docstring> - <arg type="i" name="code" /> - <tp:docstring> - The SIP or IAX2 message code - </tp:docstring> - </signal> - <signal name="voiceMailNotify" tp:name-for-bindings="voiceMailNotify"> <tp:docstring> Notify the clients of the voicemail number for a specific account, if applicable.