Sponsored Content
Special Forums UNIX and Linux Applications High Performance Computing High reliability web server - cluster, redundancy, etc Post 302301986 by DukeNuke2 on Sunday 29th of March 2009 04:52:42 PM
Old 03-29-2009
you should invite a ha consultant to help you...
 

3 More Discussions You Might Find Interesting

1. Solaris

High Availability zone on Sun Cluster

HI Experts, Could some one help me in configuring high availability zone on Sun Cluster Reg: Sudhan (3 Replies)
Discussion started by: sudhan143
3 Replies

2. Red Hat

Red Hat High Availability (HA) Cluster

How can we implement a service in HA, which in not available in HA. like sldap or customize application. Requirement Details. NODE1 service slapd is running.(Require) NODE2 service slapd is running.(Require) on both the node replication is happening. Now here requirement is need... (2 Replies)
Discussion started by: Priy
2 Replies

3. Red Hat

Web server cluster at some point ?

What's the best way clusters for Storage at some point? (The way that data is the same in all parts) To set up a Web server cluster is the logical way?! Cluster database and Storage and then by keepalived + HA cluster will be communicated? Or, there a better solution? (For about 4 points) Thank... (0 Replies)
Discussion started by: mnnn
0 Replies
How-To initiate, modify or terminate calls.(3)			    libeXosip2			    How-To initiate, modify or terminate calls.(3)

NAME
How-To initiate, modify or terminate calls. - eXosip2 offers a flexible API to help you controling calls. Initiate a call To start an outgoing call, you typically need a few headers which will be used by eXosip2 to build a default SIP INVITE request. The code below is used to start a call: osip_message_t *invite; int i; i = eXosip_call_build_initial_invite (&invite, '<sip:to@antisip.com>', '<sip:from@antisip.com>', NULL, // optional route header 'This is a call for a conversation'); if (i != 0) { return -1; } osip_message_set_supported (invite, '100rel'); { char tmp[4096]; char localip[128]; eXosip_guess_localip (AF_INET, localip, 128); snprintf (tmp, 4096, 'v=0 ' 'o=josua 0 0 IN IP4 %s ' 's=conversation ' 'c=IN IP4 %s ' 't=0 0 ' 'm=audio %s RTP/AVP 0 8 101 ' 'a=rtpmap:0 PCMU/8000 ' 'a=rtpmap:8 PCMA/8000 ' 'a=rtpmap:101 telephone-event/8000 ' 'a=fmtp:101 0-11 ', localip, localip, port); osip_message_set_body (invite, tmp, strlen (tmp)); osip_message_set_content_type (invite, 'application/sdp'); } eXosip_lock (); i = eXosip_call_send_initial_invite (invite); if (i > 0) { eXosip_call_set_reference (i, reference); } eXosip_unlock (); return i; The above code is using eXosip_call_build_initial_invite to build a default SIP INVITE request for a new call. You have to insert a SDP body announcing your audio parameter for the RTP stream. The above code also show the flexibility of the eXosip2 API which allow you to insert additionnal headers such as 'Supported: 100rel' (announcing support for a SIP extension). Thus you can enterely control the creation of SIP requests. The returned element of eXosip_call_send_initial_invite is the call identifier that you can use to send a CANCEL. In future events other than 100 Trying, you'll also get the dialog identifier that will also be needed to control established calls. eXosip_call_set_reference is also a mean to attach one of your own context to a call so that you'll get your pointer back in eXosip_event. Answer a call The code below is another example that teach you how to answer an incoming call. You'll usually need to send a '180 Ringing' SIP answer when receiving a SIP INVITE: eXosip_lock (); eXosip_call_send_answer (ca->tid, 180, NULL); eXosip_unlock (); Note: The above code also shows that the stack is sometimes able to build and send a default SIP messages with only one API call Then, when the user wants to answer the call, you'll need to send a 200 ok and insert a SDP body in your SIP answer: osip_message_t *answer = NULL; eXosip_lock (); i = eXosip_call_build_answer (ca->tid, 200, &answer); if (i != 0) { eXosip_call_send_answer (ca->tid, 400, NULL); } else { i = sdp_complete_200ok (ca->did, answer); if (i != 0) { osip_message_free (answer); eXosip_call_send_answer (ca->tid, 415, NULL); } else eXosip_call_send_answer (ca->tid, 200, answer); } eXosip_unlock (); Note: In the above code, you can note that to send a response to a request, you have to use the transaction identifier (and not a call identifier or a dialog identifier!) Note2: For sending a 200ok, you'll usually need to insert a SDP body in the answer and before this, to negotiate the parameters and codecs that you want to support. In the test tool, provided by eXosip2 (josua application), you'll find a very basic implementation of the SDP negotiation. Sending other request The call control API allows you to send and receive REFER, UPDATE, INFO, OPTIONS, NOTIFY and INVITEs whitin calls. A few limitations still exist for answering other requests within calls, but it should be already possible to send any kind of request. Here you have a code sample to send an INFO requests used to send an out of band dtmf within the signalling layer. osip_message_t *info; char dtmf_body[1000]; int i; eXosip_lock (); i = eXosip_call_build_info (ca->did, &info); if (i == 0) { snprintf (dtmf_body, 999, 'Signal=%c Duration=250 ', c); osip_message_set_content_type (info, 'application/dtmf-relay'); osip_message_set_body (info, dtmf_body, strlen (dtmf_body)); i = eXosip_call_send_request (ca->did, info); } eXosip_unlock (); Author Generated automatically by Doxygen for libeXosip2 from the source code. Version 3.1.0 Sun Jun 24 2012 How-To initiate, modify or terminate calls.(3)
All times are GMT -4. The time now is 09:22 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy