Multiple subscribes in a dialog question.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



2010/1/13 Wang Eric <eric_wanga at hotmail.com>:
> Hi Benny and All,
>
> I have suffered a problem in these days.
> When there incoming a subscribe, The on_new_transaction() will be called to
> create dialog sub list.
>
> ?dlgsub_head = (struct dlgsub*) dlg->mod_data[mod_evsub.mod.id];
> ?if (dlgsub_head == NULL)
> ?{
> ??// allocate a new dlgsub instance
> ??? }
>
> ??// Point to the first dlgsub in the list..
> ?dlgsub = dlgsub_head->next;
>
>
> However, we have the following problem..
> Please correct me in case of my missunderstand, thanks!
>
> (1) Where the dlg->mod_data[mod_evsub.mod.id] was initialized?
> pjsip_dlg_add_usage is the one who initial the dlg->mod_data.
> Is that correct?
>

Yes.

> (2) We found if multiple subscribes were received, the last one will
> overwrite the previous one in the dlgsub list.
> My question was should we allocate a new node once the dlgsub not NULL
> ?dlgsub_head = (struct dlgsub*) dlg->mod_data[mod_evsub.mod.id];
> ?if (dlgsub_head == NULL) {
> ??// allocate new node
> ??? }
> ??? else
> ???? ?// Allocate new node and attach to the existed list
>
>

Frankly I'm not sure if we support multiple active SUBSCRIBE sessions.
I think we support more than one SUBSCRIBEs, but as long as there is
only one SUBSCRIBE session is active at one time (the other ones must
have been terminated). This scenario then would be similar to multiple
call transfer attempts (e.g. first transfer attempt fails, then
retry).

Why do you need multiple SUBSCRIBEs btw?

Cheers
 Benny


> Champion Wang
>
> Best Regards!
>
> eric_wanga at hotmail.com
>



[Index of Archives]     [Asterisk Users]     [Asterisk App Development]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [Linux API]
  Powered by Linux