RTP is used to carry the media between endpoints. Its UDP based. SIP is
rapidly moving to TCP (and some to TLS) so the UDP assumption will work now
but unlikly in say 18 months from now.<br>

<br>
The problem you face is that there are other entities in the
network that expect the IP address for the sessions to remain unchanged
- unless specifically redirected. <br>

<br>

The UA's for one will be sending their media to the old IP address of
the Asterisk server (if they were in the path , for a conference or
voicemail or DTMF based feature handling for example). The firewalls in
the path will be expecting media and new requests within the same
dialog to be coming from the old address as well. SBC's will no doubt
reject any attempts to re-use the same session from a different address
... <br>

<br>

There are many problems to solve for a general solution.<br>
<span class="sg">
<br>
Mark</span><br><br><div><span class="gmail_quote">On 9/28/05, <b class="gmail_sendername">Steven Dake</b> &lt;<a href="mailto:sdake@mvista.com">sdake@mvista.com</a>&gt; wrote:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
On Wed, 2005-09-28 at 18:43 -0500, Mark Aiken wrote:<br>&gt; Steven,<br>&gt;<br>&gt; I'm not familiar with AIS but if your plan is to support in-call<br>&gt; handoff to a different IP you have issues at the session layer to deal
<br>&gt; with. That problem I am familiar with and its not easy to keep a SIP<br>&gt; call up and move the IPs of a SIP server than is in the call-control<br>&gt; and/or media path of the session. Especially if the original server
<br>&gt; just dies mid-call. DNS tricks will be of little use mid-call. In<br>&gt; fact, without moving the sessions prior to the switch,&nbsp;&nbsp;I'm not sure<br>&gt; its even possible&nbsp;&nbsp;without 'dialing' back the parties to reestablish
<br>&gt; the sessions. That may be your only viable option, and its not such a<br>&gt; bad one really. Note aslo that wrt SIP, Asterisk is a B2BUA and has 2<br>&gt; call-control (SIP) and often 2 media (RTP) sessions for each call
<br>&gt; between UAs (SIP phones).<br>&gt;<br>&gt; Certainly it will be an interesting project.<br>&gt;<br>&gt; Mark<br>&gt;<br><br>Mark,<br><br><br>Thanks for the feedback.<br><br>I would like to ensure that sessions remain operational and a redial
<br>isn't necessary.<br><br>AIS will checkpoint the entire SIP session state into a data storage<br>area shared by multiple nodes.&nbsp;&nbsp;Since SIP uses UDP, it should be<br>possible to switch the IP address (ip address failover) when the active
<br>becomes standby.&nbsp;&nbsp;Then new operations will be directed to the same IP<br>address, which is now on the newly assigned active node.&nbsp;&nbsp;Then the<br>standby server will have an exact replica of the SIP session state when<br>
it recovers and becomes active.&nbsp;&nbsp;AIS takes care of all of the details of<br>the checkpoint management and assignment of active/standby states.&nbsp;&nbsp;The<br>only trick is to record any changed SIP state data using a checkpoint<br>
write call, and read state data on active assignment using a checkpoint<br>read call.&nbsp;&nbsp;I found sip_pvt which should contain all the private data.<br>Are there other data structures that I should worry about recording?<br>
<br>If that isn't clear, let me give an example with two nodes:<br><a href="http://192.168.1.10">192.168.1.10</a> active<br><a href="http://192.168.1.11">192.168.1.11</a> standby<br><br>The active has a virtual ip address 
<a href="http://192.168.1.200">192.168.1.200</a> which is the IP<br>address of the actual SIP server.&nbsp;&nbsp;if <a href="http://192.168.1.10">192.168.1.10</a> fails or is assigned<br>standby, it should delete this virtual ip address.&nbsp;&nbsp;Then 
<a href="http://192.168.1.11">192.168.1.11</a><br>will be assigned active, and it should create a virtual ip address<br><a href="http://192.168.1.200">192.168.1.200</a>.<br><br>Regarding the call control (SIP) connections..&nbsp;&nbsp;Are there 2 at each end,
<br>or just one instance at each end?<br><br>It appears that asterisk contains state data that is passed to some of<br>the operations.&nbsp;&nbsp;The comments indicate it has to do with pbx state<br>management.&nbsp;&nbsp;I assume this is for cli and gui access.&nbsp;&nbsp;Does this
<br>asterisk state contain any other useful information, or could I avoid<br>having to also replicate it, and instead just checkpoint the full SIP<br>session state.<br><br>One final question, I am not familiar with the purpose of RTP.&nbsp;&nbsp;Does it
<br>also have some state that is required for two ip phones to communicate?<br><br>regards<br>-steve<br><br>&gt; On 9/28/05, Steven Dake &lt;<a href="mailto:sdake@mvista.com">sdake@mvista.com</a>&gt; wrote:<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Fellow developers,
<br>&gt;<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; I maintain the open source project openais<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <a href="http://developer.osdl.org/dev/openais">http://developer.osdl.org/dev/openais</a> which is an open source<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; version of
<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; the Service Availability Forum's AIS specification.<br>&gt;<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; This implementation provides checkpointing and application<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; failover.<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; I'd like to create an integration between the SIP channel
<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; module and<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; openais AMF/checkpointing and perhaps have it integrated into<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; the<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; asterisk source base as a proof of concept of AIS.<br>&gt;<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; The integration would allow multiple servers to maintain an
<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; active/standby the state of all SIP sessions.&nbsp;&nbsp;Then the active<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; server<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; for which the IP phone is communicating with would continue to<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; operate<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; and maintain its session in the event the active server
<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; failed.<br>&gt;<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Would someone be kind enough to point me to the data<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; structures or<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; functions where the state of a SIP session is recorded.&nbsp;&nbsp;Is it<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; possible
<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; just to record SIPs state, or does the rest of the asterisk<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; server that<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; loads the sip module contain state about the SIP session?<br>&gt;<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; In SIP, is an IP phone configured to talk to one specific IP
<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; address, or<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; is there a discovery process to determine the SIP server's ip<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; address?<br>&gt;<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Finally in do_monitor, I notice there is a ast_sched_wait,<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; followed by
<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; an ast_io_wait.&nbsp;&nbsp;ast_io_wait appears to dispatch any pending<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; i/o events<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; as derived from poll.&nbsp;&nbsp;I need to plug in here with an<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ast_io_add to add<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; my &quot;healthchecking&quot; for the SIP server.&nbsp;&nbsp;My question is with
<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ast_sched_wait..&nbsp;&nbsp;Will it timeout immediately if there is I/O<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; waiting?<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; In other event systems, timers and events are usually<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; integrated..&nbsp;&nbsp;I'm<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; not sure how these two work in asterisk by looking at the
<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; code.<br>&gt;<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Thanks for the help<br>&gt;<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; regards<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; -steve<br>&gt;<br>&gt;<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; _______________________________________________<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Asterisk-Dev mailing list
<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <a href="mailto:Asterisk-Dev@lists.digium.com">Asterisk-Dev@lists.digium.com</a><br>&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <a href="http://lists.digium.com/mailman/listinfo/asterisk-dev">http://lists.digium.com/mailman/listinfo/asterisk-dev
</a><br>&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; To UNSUBSCRIBE or update options visit:<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="http://lists.digium.com/mailman/listinfo/asterisk-dev">http://lists.digium.com/mailman/listinfo/asterisk-dev</a><br>&gt;<br><br></blockquote>
</div><br>