[asterisk-users] Presence SUBSCRIBE/NOTIFY behaviour

Olle E Johansson oej at edvina.net
Fri Aug 18 07:34:17 MST 2006


18 aug 2006 kl. 16.04 skrev Shaun Bailey:

> I'd appreciate some feedback on the behaviour of some tests  
> relating to
> presence SUBSCRIBE/NOTIFY.  In the tests no NAT or proxies are  
> involved.
>
> We have a client using a SIP stack accepting requests on one port  
> (eg 5060)
> but handling responses on a 'temporary' port.  In other words it  
> sends a
> request on a port 'nnnn', quotes port 'nnnn' in the 'Via' header,  
> and then
> handles the response to that request on port 'nnnn'.
>
> What we're seeing is that * sends the notification requests to the  
> 'nnnn'
> port associated with the SUBSCRIBE request/response rather than 5060.
> Naturally this port is no longer open, so they don't get through.
>
> I'm interested in how * figures out the addressing for the  
> notifications.
> Is it from the Via header on the SUBSCRIBE (although I thought this  
> was just
> used for responses?) or does it assume that the source of the  
> subscription
> is the target for the notifications, or is it through some other  
> means?  Is
> it expected behaviour?
>
> OPTIONS requests generated by * are targetted at 5060 so they get  
> through
> without any problem.
>
> Any light you could shed on this would be helpful - at this stage  
> I'm just
> trying to establish what the correct behaviour is.
>

That is a very good question that I can't answer. We are sending the
NOTIFY as transactions within the existing dialog, the SUBSCRIBE,
which means that the via header int he SUBSCRIBE applies. Whether
this is the right or wrong way, is something we have to find out from  
the
RFCs - a task that is not always easy.

/Olle

---
* Olle E. Johansson - oej at edvina.net
* Asterisk Training http://edvina.net/training/






More information about the asterisk-users mailing list