Hi Andrey,

I think this one is more safe:

diff --git a/core/AmSession.cpp b/core/AmSession.cpp
index 5f45a57..3179055 100644
--- a/core/AmSession.cpp
+++ b/core/AmSession.cpp
@@ -978,6 +978,14 @@ void AmSession::onSipReply(const AmSipReply& reply,
            } // exceptions are not critical here
          }
        } break;
+
+       case AmSipDialog::Disconnected: {
+ // dlg changed: < Connected -> Disconnected => failed outbound call
+         DBG("Outbound call failed with reply %d %s.\n",
+             reply.code, reply.reason.c_str());
+         setStopped();
+       }; break;
+
        default:  break;// continue waiting.
        }
       } // switch dlg status

checking dlg status change. But I think this should be running another session event handler (onFailedCall), for which the default implementation would be setStopped().

Stefan

o Самусенко Андрей on 04/20/2012 01:13 PM:
Hi.
What do you think about this?

On 16.04.2012 16:29, Самусенко Андрей wrote:
I suggest the following:

diff --git a/core/AmSession.cpp b/core/AmSession.cpp
index 5f45a57..3dde291 100644
--- a/core/AmSession.cpp
+++ b/core/AmSession.cpp
@@ -981,6 +981,10 @@ void AmSession::onSipReply(const AmSipReply&
reply,
default: break;// continue waiting.
}
} // switch dlg status
+
+ if (reply.code >= 300) {
+ setStopped();
+ }
} // status < Connected
} //if negotiate_onreply
}


On 13.04.2012 23:02, Самусенко Андрей wrote:
Hi.
Branch 1.4

Using plugins:
adpcm.so
announcement.so
di_dial.so
gsm.so
ilbc.so
l16.so
session_timer.so
speex.so
uac_auth.so
wav.so
xmlrpc2di.so

Example, response "404 Not found" don't stop session, setStopped()
is not called.

Branch master have same problem? I can't run it, INVITE with SDP
m=<unknown media type>.
_______________________________________________
Semsdev mailing list
[email protected]
http://lists.iptel.org/mailman/listinfo/semsdev

_______________________________________________
Semsdev mailing list
[email protected]
http://lists.iptel.org/mailman/listinfo/semsdev
_______________________________________________
Semsdev mailing list
[email protected]
http://lists.iptel.org/mailman/listinfo/semsdev


--
Stefan Sayer
CEO (Geschäftsführer)

FRAFOS GmbH

email: [email protected]
mobile:+49 162 1366449
www.frafos.com

Prinzessinnenstr. 19/20 betahaus
10969 Berlin
Germany
_______________________________________________
Semsdev mailing list
[email protected]
http://lists.iptel.org/mailman/listinfo/semsdev

Reply via email to