multiple servers within a transaction?

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

 



On Thu, Apr 12, 2012 at 4:23 AM, Matt DiMeo <mattdimeo at yahoo.com> wrote:

> I'd like to give pjsip the ability to act on ICMP Destination Unreachable
> messages, which gets sent by a host when it receives a UDP packet on a port
> nobody's listening to.  It looks like I could just modify
> tsx_timer_callback in sip_transaction.c to terminate a transaction if a
> retransmit timeout happens on a transaction after receiving a matching
> ICMP.  This would let me detect that asterisk is shut down on a pbx quicker
> than waiting for all the retransmits to time out.
>
>
That's a neat idea, as it doesn't introduce too many new flows to the
transaction state machine.


> Is it safe to assume that a transaction is always a communication with one
> specific IP address?  I'm a little unclear on whether the transaction would
> cycle through ip addresses for a server that resolves to multiple hosts, or
> whether those would be different transactions handled at a higher level in
> the stack.
>
>
Request can be retried due to various reasons, e.g. multiple DNS SRV
entries, failed auto-switch to TCP (
http://trac.pjsip.org/repos/wiki/Using_SIP_TCP#switch), 401/407 auth, and
3xx redirection. The rule of thumb is the same transaction instance will be
used if the new request uses the same branch value. And in this case, the
DNS SRV retries and TCP switch do use the same branch (although in this
case I guess you don't need to worry about the TCP switch since it uses
TCP).

Also one UDP transport can be shared by many transactions that may send to
different destinations so in this case it could be hard to know which
transaction the ICMP packet should be processed by.

 -Benny


-m@
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.pjsip.org/pipermail/pjsip_lists.pjsip.org/attachments/20120414/587896a7/attachment.html>


[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