Hi Henning,
thanks for your message.
The issue is visible, whenever pua_dialoginfo sends out a PUBLISH
request. During that process, build_cell is called, which destroys avps.
I experimented with adding a parameter. It works - nearly.
PUBLISH is sent out, avps are OK, but after additional 2-3 seconds, one
child process dies.
So there are these 2 possibilities:
- AVPs get destroyed
- kamailio dies a few seconds after sending out the PUBLISH
Which scenario happens depends on these lines in build_cell() (tm
h_table.c:~300):
old = set_avp_list(AVP_TRACK_FROM | AVP_CLASS_URI,
&new_cell->uri_avps_from );
new_cell->uri_avps_from = *old;
*old = 0;
old = set_avp_list(AVP_TRACK_TO | AVP_CLASS_URI,
&new_cell->uri_avps_to );
new_cell->uri_avps_to = *old;
*old = 0;
old = set_avp_list(AVP_TRACK_FROM | AVP_CLASS_USER,
&new_cell->user_avps_from );
new_cell->user_avps_from = *old;
*old = 0;
old = set_avp_list(AVP_TRACK_TO | AVP_CLASS_USER,
&new_cell->user_avps_to );
new_cell->user_avps_to = *old;
*old = 0;
If these lines are present, AVPS get destroyed. If not, kamailio child
dies a few seconds after sending out PUBLISH.
I tried different things here, but I did not figure out yet, why this
happens.
I assume that somewhere (may through a timer) somewhat is called, which
uses the parameters of the cell, which refer to avps. And if there is no
AVP list (but e.g. a 0 pointer), the child processing this code dies.
But thats only an assumption, which is difficult to verify, if you do
not know the tm code exactly.
So I would like to ask Andrei, whether if it is possible to investigate
this problem - because at this moment, it makes the use of
pua_dialoginfo totally impossible.
Thanks & Best Regards
Jasmin
On Wednesday 11 August 2010, Jasmin Schnatterbeck
wrote:
some months ago I reported a problem with
pua_dialoginfo:
Avps declared in request route are not available anymore in branch
route, if pua_dialoginfo module is loaded.
I do not know whether there are some experiences with this problem or
not, so I looked for the reason.
pua_dialoginfo uses pua for sending PUBLISH request
pua uses tm t_request for sending PUBLISH request
t_request() is located in uac.c (tm):
- in line 411 avp list is reset
- in line 276 build_cell() is called:
build_cell() is located in h_table.c, where lines 305-323 delete avps
If I comment out the mentioned lines, which delete avps, then avps set
in request route are also available in branch route.
But I do not know, what is also affected by this change.
So would it be reasonable, to add a parameter to build_cell() for not
changing the AVP list?
Hi Jasmin,
so this issue is just visible in the transaction on which the pua_dialoginfo
module acts on, or its affects also unrelated transactions?
According my understanding the build_cell method is used for example during
the creation of a new SIP transaction. This is probably necessary (in this
case) for t_request to work correctly. So changing it globally would be
probably not a good idea as it will probably have some side effects. But you
can add a parameter as you suggested, and just see if it works in your setup.
If its really harmless i can't confirm at the moment, as my insight into the
details of the TM module is limited. If you want to get some feedback about a
patch, Andrei as the maintainer of the module would be probably more qualified
to give a sound answer. :-)
Cheers,
Henning