Hey Stefan,
Onderwerp: Re: [Sems] Response to INFO messages in C2D app (AmB2BSession)
Datum: 16-9-2009 16:40
Hi Tom,
o Tom van der Geer [09/16/09 13:00]:
Hi,
Browsing through the logs of my C2D application (AmB2BSession) I've
found a situation where of the upstream proxies sent and INFO message
after a certain period to check if the session was still alive. In this
its most probably not the proxy, but the endpoint that sent the INFO.
proxies may not originate requests if i am not mistaken...
Thanks! You're right. It's not the proxy that is initiating the INFO,
but the endpoint. A PSTN gateway in this case.
[...]
in my opinion, if a B2BUA is in the dialog it should relay all
messages after the dialogs are created; it should do something
different only if the session is stopped (BYE and CANCEL).
The situation you describe looks to me like an endpoint problem - the
endpoint should definitely reply something to the INFO.
Nevertheless, one reason (the only?) for having a B2BUA in the middle
is to fix broken endpoint behaviour which you don't have influence
over otherwise. This road may be dangerous though: You should for
example be aware that DTMF may also be transmitted in SIP INFO
(de-facto standard even if there is RFC). If you catch the INFO in the
middle, DTMF may stop working. You may also have a look at the
content-type (application/dtmf or application/dtmf-relay), but in
principle all middle box actions may sooner or later break some new
features of the end points (see broken SIP ALG topic).
It _is_ an endpoint problem, but as in some many cases; we don't control
the endpoint... In this case a very high profile Nortel switch (CS2000)
So the next best thing is to fix it in the part we do control: the C2D
app. Taking into account all possible failures we might introduce while
'fixing' this problem.
[...]
In this particular case it was probably better if the C2D application
responded with a 200 OK in stead of relaying the message. How can
this be achieved?
implement your own onSipRequest method where you catch INFO like this:
void MyCalleeSession::onSipRequest(const AmSipRequest& req)
{
if ((req.method=="INFO") &&
(req.content_type == "whatever") &&
// maybe some more checks here
) {
dlg.reply(req, 200, "OK" ["application/mycontent", "body..."]);
}
} else {
AmB2BCalleeSession::onSipRequest();
}
}
Pending any answers on this mailinglist I was already considering the
route to implement a 'filter' for these specific INFO messages without a
content_type specified. Your code confirmed my ideas. Thanks again!
Tom
_______________________________________________
Sems mailing list
[email protected]
http://lists.iptel.org/mailman/listinfo/sems