Hello all.
I'm having problem with sending NOTIFY packet for event dialog.
The problem is, that all NOTIFY packets sent with this event is empty. ( Content-length: 0 ) and in fact, not passing actual status to the phone. In my case this is SPA962.
NOTIFY packets for event presence are sent fine and status is changing normally.
The same phone, works fine with Asterisk. Asterisk is sending NOTIFY with non-zero content and changing status for the subscriber as well.
I've turned on pua module to send PUBLISH requests at Kamailio, it's filling DB table with subscription, everything runs fine and NOTIFY packets are coming to subscribed phone, but they are empty.
I also have presence_dialoginfo module on and pua_dialoginfo module on. I've tried on Kamailio 3.0.3 and 3.1.1. Content always empty.
There is no sense of pasting here packet dumps, cause everything is like should be:
(UAC) SUBSCRIBE, event: presence ---> K K ---> 202 OK (SPA) SUBSCRIBE, event: dialog ---> K K ---> 202 OK PUBLISH, event: presence ---> K K ---> 200 OK NOTIFY, event: presence, Content-Length: XXX ---> UAC NOTIFY, event: dialog, Content-Length: 0 ---> SPA962
As result, softphone changes status and hardphone ( SPA962 ) - no. May be it's cause of PUBLISH event value?
Please advise.
On Wed, 2011-02-09 at 14:47 +0100, Klaus Darilion wrote:
No, PUBLISH requests with event dialog are not generated. Instead of dialog event, presence event is generated, but as for me, it should work, as for instance eyeBeam is generating PUBLISH requests itself, with event: presence.
You're saying that NOTIFYs with event dialog are empty, cause there are not PUBLISH event: dialog?
Am 09.02.2011 14:56, schrieb Spinov Evgeniy:
Yes. The "presence server" is just a relay of the content:
PUBLISH ---> presence server <---SUBSCRIBE/NOTIFY---> client
If dialoginfo is not published into the presence server, the presence server will send empty NOTIFYs.
There are 2 ways to get the dialoginfo published into the presence server: either the phone does it (e.g. SNOM phones can do that, eyebeam only publishes "presence" but not "dialog"info) or Kamailio can PUBLISH the dialog state. See http://www.kamailio.org/docs/modules/3.1.x/modules_k/presence_dialoginfo.htm...
So, make sure that Kamailio will publish the dialoginfo: http://www.kamailio.org/docs/modules/3.1.x/modules_k/pua_dialoginfo.html#id2...
regards klaus
On Wed, 2011-02-09 at 16:24 +0100, Klaus Darilion wrote:
Thank you for the links, especially this one http://www.kamailio.org/docs/modules/3.1.x/modules_k/pua_dialoginfo.html#id2...
I've missed this section while read README. I've fixed that out and made it working for INVITE requests. I.e. when I'm making a call, status is displayed normally, and when call is hanged - status is online again. That works correctly.
However I cannot get, how to get it working for REGISTER requests, i.e. when the phone was down and I'm registering - it's not coming online on SPA until the first call. And when I'm going offline - unregistering, I'm still online.
PUBLISH requests are sent, but they are presence type. According to debug, dialog processing request and assigning hash to it and after dialog, pua is sending PUBLISH with event presence. pua_dialoginfo never come up in request.
Dialog processing is very simple:
if (is_method("INVITE|REGISTER")) { dlg_manage(); }
Somewhy, pua_dialoginfo comes with INVITE request and never comes with REGISTER.
Any ideas?
Spinov Evgeniy wrote:
Don't confuse 'presence' with 'dialog'info events. 'Presence' allows offline/online/away/busy/atlunch/... status of presentities (phones).
'dialog' gives you detailed dialog statistics like idle/busy/ringing with callids/totag/fromtag... so you can for example pick up a call. That's why nothing happens on REGISTER because REGISTER does not create a dialog. There is also no workaround as the 'dialog' event has not states to publish offline/online.
regards Klaus
Thank you for detailed explanation, now I've got it, but I'm confused about workaround. Really nothing could be done to send phone offline or get it online when it's off? For instance to get it online, it's possible to emulate false call, with INVITE, for instance.
Have you tried something like that?
On Fri, 2011-02-11 at 01:28 +0100, Klaus Darilion wrote:
Am 11.02.2011 07:57, schrieb Spinov Evgeniy:
Again: There is now way to signal 'offline' in a 'dialog' info - there is no XML syntax defined for that. But there is 'offline' in 'presence' info which can be triggered, e.g: http://www.kamailio.org/docs/modules/3.1.x/modules_k/pua_usrloc.html
klaus
Yea, yea, I got that dialog do not have offline and online status. You mean, that there is no way to tell phone, that extension is offline, even if it is offline by Kamailio no chance to pass this info to phone unless it's subscribed for presence event, right?
On Fri, 2011-02-11 at 10:34 +0100, Klaus Darilion wrote:
Hello, Alex.
mhomed=1 exactly what is required, however, using this option is not solved my problem.
Packets are passing OK, but when the call is made, for instance from 100->101, then INVITE is generated from 100 to K ( kamailio ). K is passing this INVITE to A ( Asterisk ). Asterisk is generating backward INVITE for 101.
But in From and To headers changes to From: 100@ASTERISK To: 101@KAMAILIO
where ASTERISK and KAMAILIO are private network addresses. This makes sense as Asterisk do not have any public IP, but it seems to me that I'm missing something.
Is it possible to process INVITES sent from A to K before releasing to public network?
Thank you.
Evgeniy,
Try enable mhomed=1 option in kamailio.cfg.
$fs = "udp:xxx.xxx.xxx.xxx:5060";
t_relay(); ... etc.
Cheers,
-- Alex
On 02/18/2011 10:05 AM, Spinov Evgeniy wrote:
list
sr-users at lists.sip-router.org http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
Hello, Alex.
mhomed=1 exactly what is required, however, using this option is not solved my problem.
Packets are passing OK, but when the call is made, for instance from 100->101, then INVITE is generated from 100 to K ( kamailio ). K is passing this INVITE to A ( Asterisk ). Asterisk is generating backward INVITE for 101.
But in From and To headers changes to From: 100@ASTERISK To: 101@KAMAILIO
where ASTERISK and KAMAILIO are private network addresses. This makes sense as Asterisk do not have any public IP, but it seems to me that I'm missing something.
Is it possible to process INVITES sent from A to K before releasing to public network?
Right now INVITES look like:
From: 100@PUBLIC To: 101@PUBLIC
Backward: From: 101@PRIVATE_ASTERISK_IP To: 100@PRIVATE_KAMAILIO_IP
Thank you.
Evgeniy,
Try enable mhomed=1 option in kamailio.cfg.
$fs = "udp:xxx.xxx.xxx.xxx:5060";
t_relay(); ... etc.
Cheers,
-- Alex
On 02/18/2011 10:05 AM, Spinov Evgeniy wrote:
list
sr-users at lists.sip-router.org http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users