<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:georss='http://www.georss.org/georss' xmlns:gd='http://schemas.google.com/g/2005' xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-1818419888217740295</id><updated>2012-01-25T14:10:37.304-08:00</updated><title type='text'>VoIP Tech Anand Dayal@asterisk, OpenSER,Calling Crad, IPPBX, Softswitch, Radius Billing &amp; Softphone</title><subtitle type='html'>SER, Mediaproxy, RTP, Radius &amp; VoIP Billing, NSDialer, Callcenter Solution ....etc.</subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://ananddayal.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1818419888217740295/posts/default?max-results=100'/><link rel='alternate' type='text/html' href='http://ananddayal.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>Anand Kumar Dayal</name><uri>http://www.blogger.com/profile/15821949256334333875</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://bp2.blogger.com/_X_AIQvaR6X4/SJGDCYgSLAI/AAAAAAAADcI/tod2zTuEQCw/S220/PIC-AD-257(2).jpg'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>24</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>100</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-1818419888217740295.post-1297982356628980263</id><published>2010-11-11T06:30:00.000-08:00</published><updated>2010-11-11T06:32:31.328-08:00</updated><title type='text'>OpenSIPs Core functions and parameters</title><content type='html'>This section lists the all the parameters and functions exported by &lt;strong&gt;OpenSIPS&lt;/strong&gt; core for script usage (to be used in opensips.cfg)&lt;br /&gt;&lt;/p&gt;&lt;br /&gt;&lt;p class="vspace"&gt;This document is for &lt;strong&gt;OpenSIPS 1.7.x / devel&lt;/strong&gt; &lt;br /&gt;&lt;/p&gt;&lt;br /&gt;&lt;div class="vspace"&gt;&lt;/div&gt;&lt;ol&gt;&lt;li&gt;&lt;a href="#keywords"&gt;Core keywords&lt;/a&gt;&lt;br /&gt;&lt;/li&gt;&lt;li&gt;&lt;a href="#values"&gt;Core values&lt;/a&gt;&lt;br /&gt;&lt;/li&gt;&lt;li&gt;&lt;a href="#parameters"&gt;Core parameters&lt;/a&gt;&lt;br /&gt;&lt;/li&gt;&lt;li&gt;&lt;a href="#functions"&gt;Core functions&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;/li&gt;&lt;/ol&gt;&lt;div class="vspace"&gt;&lt;/div&gt;&lt;hr&gt;&lt;br /&gt;&lt;p&gt;&lt;a name="keywords" id="keywords"&gt;&lt;/a&gt;&lt;br /&gt;&lt;/p&gt;&lt;h3&gt;&lt;a name="toc1" id="toc1"&gt;&lt;/a&gt;1.&amp;nbsp; Core Keywords&lt;/h3&gt;&lt;br /&gt;&lt;p&gt;Keywords specific to SIP messages which can be used mainly in 'if' expressions.&lt;br /&gt;&lt;/p&gt;&lt;br /&gt;&lt;div class="vspace"&gt;&lt;/div&gt;&lt;h4&gt;&lt;a name="toc2" id="toc2"&gt;&lt;/a&gt;1.1&amp;nbsp; af&lt;/h4&gt;&lt;br /&gt;&lt;p&gt;The address family of the received SIP message. It is INET if the message was received over IPv4 or INET6 if the message was received over IPv6.&lt;br /&gt;&lt;/p&gt;&lt;br /&gt;&lt;p class="vspace"&gt;Exampe of usage:&lt;br /&gt;&lt;/p&gt;&lt;br /&gt;&lt;div class="vspace"&gt;&lt;/div&gt;&lt;pre&gt;    if(af==INET6) {&lt;br /&gt;        log("Message received over IPv6 link\n");&lt;br /&gt;    };&lt;br /&gt;&lt;br /&gt;&lt;/pre&gt;&lt;div class="vspace"&gt;&lt;/div&gt;&lt;h4&gt;&lt;a name="toc3" id="toc3"&gt;&lt;/a&gt;1.2&amp;nbsp;dst_ip&lt;/h4&gt;&lt;br /&gt;&lt;p&gt;The IP of the local interface where the SIP message was received. When the proxy listens on many network interfaces, makes possible to detect which was the one that received the packet.&lt;br /&gt;&lt;/p&gt;&lt;br /&gt;&lt;p class="vspace"&gt;Example of usage:&lt;br /&gt;&lt;/p&gt;&lt;br /&gt;&lt;div class="vspace"&gt;&lt;/div&gt;&lt;pre&gt;   if(dst_ip==127.0.0.1) {&lt;br /&gt;      log("message received on loopback interface\n");&lt;br /&gt;   };&lt;br /&gt;&lt;/pre&gt;&lt;div class="vspace"&gt;&lt;/div&gt;&lt;h4&gt;&lt;a name="toc4" id="toc4"&gt;&lt;/a&gt;1.3&amp;nbsp;dst_port&lt;/h4&gt;&lt;br /&gt;&lt;p&gt;The local port where the SIP packet was received. When &lt;strong&gt;OpenSIPS&lt;/strong&gt; is listening on many ports, it is useful to learn which was the one that received the SIP packet.&lt;br /&gt;&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;p class="vspace"&gt;Example of usage:&lt;br /&gt;&lt;/p&gt;&lt;pre&gt;   if(dst_port==5061)&lt;br /&gt;   {&lt;br /&gt;       log("message was received on port 5061\n");&lt;br /&gt;   };&lt;br /&gt;&lt;/pre&gt;&lt;div class="vspace"&gt;&lt;/div&gt;&lt;h4&gt;&lt;a name="toc5" id="toc5"&gt;&lt;/a&gt;1.4&amp;nbsp;from_uri&lt;/h4&gt;&lt;br /&gt;&lt;p&gt;This script variable is a reference to the URI of 'From' header. It can be used to test 'From'- header URI value.&lt;br /&gt;&lt;/p&gt;&lt;br /&gt;&lt;p class="vspace"&gt;Example of usage:&lt;br /&gt;&lt;/p&gt;&lt;br /&gt;&lt;div class="vspace"&gt;&lt;/div&gt;&lt;pre&gt;    if(is_method("INVITE") &amp;amp;&amp;amp; from_uri=~".*@opensips.org")&lt;br /&gt;    {&lt;br /&gt;        log("the caller is from opensips.org\n");&lt;br /&gt;    };&lt;br /&gt;&lt;/pre&gt;&lt;div class="vspace"&gt;&lt;/div&gt;&lt;h4&gt;&lt;a name="toc6" id="toc6"&gt;&lt;/a&gt;1.5&amp;nbsp;method&lt;/h4&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;The variable is a reference to the SIP method of the message.&lt;br /&gt;&lt;/p&gt;&lt;br /&gt;&lt;p class="vspace"&gt;Example of usage:&lt;br /&gt;&lt;/p&gt;&lt;br /&gt;&lt;div class="vspace"&gt;&lt;/div&gt;&lt;pre&gt;    if(method=="REGISTER")&lt;br /&gt;    {&lt;br /&gt;       log("this SIP request is a REGISTER message\n");&lt;br /&gt;    };&lt;br /&gt;&lt;/pre&gt;&lt;div class="vspace"&gt;&lt;/div&gt;&lt;h4&gt;&lt;a name="toc7" id="toc7"&gt;&lt;/a&gt;1.6&amp;nbsp;msg:len&lt;/h4&gt;&lt;br /&gt;&lt;p&gt;The variable is a reference to the size of the message. It can be used in 'if' constructs to test message's size.&lt;br /&gt;&lt;/p&gt;&lt;br /&gt;&lt;p class="vspace"&gt;Example of usage:&lt;br /&gt;&lt;/p&gt;&lt;br /&gt;&lt;div class="vspace"&gt;&lt;/div&gt;&lt;pre&gt;    if(msg:len&amp;gt;2048)&lt;br /&gt;    {&lt;br /&gt;        sl_send_reply("413", "message too large");&lt;br /&gt;        exit;&lt;br /&gt;    };&lt;br /&gt;&lt;/pre&gt;&lt;div class="vspace"&gt;&lt;/div&gt;&lt;h4&gt;&lt;a name="toc8" id="toc8"&gt;&lt;/a&gt;1.7&amp;nbsp;$retcode&lt;/h4&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;It represents the value returned by last function executed (similar to $? from bash -- if you wish, you can use also $? in OpenSIPS config, both names '$retcode' and '$?' are supported). If tested after a call of a route, it is the value retuned by that route.&lt;br /&gt;&lt;/p&gt;&lt;br /&gt;&lt;p class="vspace"&gt;Example of usage:&lt;br /&gt;&lt;/p&gt;&lt;br /&gt;&lt;div class="vspace"&gt;&lt;/div&gt;&lt;pre&gt;   route {&lt;br /&gt;       route(1);&lt;br /&gt;       if($retcode==1)&lt;br /&gt;       {&lt;br /&gt;           log("The request is an INVITE\n");&lt;br /&gt;       };&lt;br /&gt;   }&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;   route[1] {&lt;br /&gt;       if(is_method("INVITE"))&lt;br /&gt;           return(1);&lt;br /&gt;       return(2);&lt;br /&gt;   }&lt;br /&gt;&lt;/pre&gt;&lt;div class="vspace"&gt;&lt;/div&gt;&lt;h4&gt;&lt;a name="toc9" id="toc9"&gt;&lt;/a&gt;1.8&amp;nbsp;proto&lt;/h4&gt;&lt;br /&gt;&lt;p&gt;This variable can be used to test the transport protocol of the SIP message.&lt;br /&gt;&lt;/p&gt;&lt;br /&gt;&lt;p class="vspace"&gt;Example of usage:&lt;br /&gt;&lt;/p&gt;&lt;br /&gt;&lt;div class="vspace"&gt;&lt;/div&gt;&lt;pre&gt;    if(proto==UDP)&lt;br /&gt;    {&lt;br /&gt;        log("SIP message received over UDP\n");&lt;br /&gt;    };&lt;br /&gt;&lt;/pre&gt;&lt;div class="vspace"&gt;&lt;/div&gt;&lt;h4&gt;&lt;a name="toc10" id="toc10"&gt;&lt;/a&gt;1.9&amp;nbsp;status&lt;/h4&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;If used in onreply_route, this variable is a reference to the status code of the reply. If it used in a standard route block, the variable is a reference to the status of the last reply sent out for the current request.&lt;br /&gt;&lt;/p&gt;&lt;br /&gt;&lt;p class="vspace"&gt;Example of usage:&lt;br /&gt;&lt;/p&gt;&lt;br /&gt;&lt;div class="vspace"&gt;&lt;/div&gt;&lt;pre&gt;    if(status=="200")&lt;br /&gt;    {&lt;br /&gt;        log("this is a 200 OK reply\n");&lt;br /&gt;    };&lt;br /&gt;&lt;/pre&gt;&lt;div class="vspace"&gt;&lt;/div&gt;&lt;h4&gt;&lt;a name="toc11" id="toc11"&gt;&lt;/a&gt;1.10&amp;nbsp;src_ip&lt;/h4&gt;&lt;br /&gt;&lt;p&gt;Reference to source IP address of the SIP message.&lt;br /&gt;&lt;/p&gt;&lt;br /&gt;&lt;p class="vspace"&gt;Example of usage:&lt;br /&gt;&lt;/p&gt;&lt;br /&gt;&lt;div class="vspace"&gt;&lt;/div&gt;&lt;pre&gt;    if(src_ip==127.0.0.1)&lt;br /&gt;    {&lt;br /&gt;        log("the message was sent from localhost!\n");&lt;br /&gt;    };&lt;br /&gt;&lt;/pre&gt;&lt;div class="vspace"&gt;&lt;/div&gt;&lt;h4&gt;&lt;a name="toc12" id="toc12"&gt;&lt;/a&gt;1.11&amp;nbsp; src_port&lt;/h4&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;Reference to source port of the SIP message (from which port the message was sent by previous hop).&lt;br /&gt;&lt;/p&gt;&lt;br /&gt;&lt;p class="vspace"&gt;Example of usage:&lt;br /&gt;&lt;/p&gt;&lt;br /&gt;&lt;div class="vspace"&gt;&lt;/div&gt;&lt;pre&gt;    if(src_port==5061)&lt;br /&gt;    {&lt;br /&gt;        log("message sent from port 5061\n");&lt;br /&gt;    }&lt;br /&gt;&lt;/pre&gt;&lt;div class="vspace"&gt;&lt;/div&gt;&lt;h4&gt;&lt;a name="toc13" id="toc13"&gt;&lt;/a&gt;1.12&amp;nbsp;to_uri&lt;/h4&gt;&lt;br /&gt;&lt;p&gt;This variable can be used to test the value of URI from To header.&lt;br /&gt;&lt;/p&gt;&lt;br /&gt;&lt;p class="vspace"&gt;Example of usage:&lt;br /&gt;&lt;/p&gt;&lt;br /&gt;&lt;div class="vspace"&gt;&lt;/div&gt;&lt;pre&gt;  if(to_uri=~"sip:.+@opensips.org")&lt;br /&gt;  {&lt;br /&gt;      log("this is a request for opensips.org users\n");&lt;br /&gt;  };&lt;br /&gt;&lt;/pre&gt;&lt;div class="vspace"&gt;&lt;/div&gt;&lt;h4&gt;&lt;a name="toc14" id="toc14"&gt;&lt;/a&gt;1.13&amp;nbsp;uri&lt;/h4&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;This variable can be used to test the value of the request URI.&lt;br /&gt;&lt;/p&gt;&lt;br /&gt;&lt;p class="vspace"&gt;Example of usage:&lt;br /&gt;&lt;/p&gt;&lt;br /&gt;&lt;div class="vspace"&gt;&lt;/div&gt;&lt;pre&gt;    if(uri=~"sip:.+@opensips.org")&lt;br /&gt;    {&lt;br /&gt;        log("this is a request for opensips.org users\n");&lt;br /&gt;    };&lt;br /&gt;&lt;/pre&gt;&lt;p class="vspace"&gt;&lt;a href="#toc"&gt;↑ Contents&lt;/a&gt;&lt;br /&gt;&lt;/p&gt;&lt;br /&gt;&lt;div class="vspace"&gt;&lt;/div&gt;&lt;hr&gt;&lt;br /&gt;&lt;p&gt;&lt;a name="values" id="values"&gt;&lt;/a&gt;&lt;br /&gt;&lt;/p&gt;&lt;h3&gt;&lt;a name="toc15" id="toc15"&gt;&lt;/a&gt;2.&amp;nbsp;Core Values&lt;/h3&gt;&lt;br /&gt;&lt;p&gt;Values that can be used in 'if' expressions to check against Core Keywords&lt;br /&gt;&lt;/p&gt;&lt;br /&gt;&lt;div class="vspace"&gt;&lt;/div&gt;&lt;h4&gt;&lt;a name="toc16" id="toc16"&gt;&lt;/a&gt;2.1&amp;nbsp;INET&lt;/h4&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;This keyword can be used to test whether the SIP packet was received over an IPv4 connection.&lt;br /&gt;&lt;/p&gt;&lt;br /&gt;&lt;p class="vspace"&gt;Example of usage:&lt;br /&gt;&lt;/p&gt;&lt;br /&gt;&lt;div class="vspace"&gt;&lt;/div&gt;&lt;pre&gt;    if(af==INET)&lt;br /&gt;    {&lt;br /&gt;        log("the SIP message was received over IPv4\n");&lt;br /&gt;    };&lt;br /&gt;&lt;/pre&gt;&lt;div class="vspace"&gt;&lt;/div&gt;&lt;h4&gt;&lt;a name="toc17" id="toc17"&gt;&lt;/a&gt;2.2&amp;nbsp;INET6&lt;/h4&gt;&lt;br /&gt;&lt;p&gt;This keyword can be used to test whether the SIP packet was received over an IPv6 connection.&lt;br /&gt;&lt;/p&gt;&lt;br /&gt;&lt;p class="vspace"&gt;Example of usage:&lt;br /&gt;&lt;/p&gt;&lt;br /&gt;&lt;div class="vspace"&gt;&lt;/div&gt;&lt;pre&gt;  if(af==INET6)&lt;br /&gt;  {&lt;br /&gt;      log("the SIP message was received over IPv6\n");&lt;br /&gt;  };&lt;br /&gt;&lt;/pre&gt;&lt;div class="vspace"&gt;&lt;/div&gt;&lt;h4&gt;&lt;a name="toc18" id="toc18"&gt;&lt;/a&gt;2.3&amp;nbsp;TCP&lt;/h4&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;This keyword can be used to test the value of 'proto' and check whether the SIP packet was received over TCP or not.&lt;br /&gt;&lt;/p&gt;&lt;br /&gt;&lt;p class="vspace"&gt;Example of usage:&lt;br /&gt;&lt;/p&gt;&lt;br /&gt;&lt;div class="vspace"&gt;&lt;/div&gt;&lt;pre&gt;  if(proto==TCP)&lt;br /&gt;  {&lt;br /&gt;      log("the SIP message was received over TCP\n");&lt;br /&gt;  };&lt;br /&gt;&lt;/pre&gt;&lt;div class="vspace"&gt;&lt;/div&gt;&lt;h4&gt;&lt;a name="toc19" id="toc19"&gt;&lt;/a&gt;2.4&amp;nbsp;UDP&lt;/h4&gt;&lt;br /&gt;&lt;p&gt;This keyword can be used to test the value of 'proto' and check whether the SIP packet was received over UDP or not.&lt;br /&gt;&lt;/p&gt;&lt;br /&gt;&lt;p class="vspace"&gt;Example of usage:&lt;br /&gt;&lt;/p&gt;&lt;br /&gt;&lt;div class="vspace"&gt;&lt;/div&gt;&lt;pre&gt;  if(proto==UDP)&lt;br /&gt;  {&lt;br /&gt;      log("the SIP message was received over UDP\n");&lt;br /&gt;  };&lt;br /&gt;&lt;/pre&gt;&lt;div class="vspace"&gt;&lt;/div&gt;&lt;h4&gt;&lt;a name="toc20" id="toc20"&gt;&lt;/a&gt;2.5&amp;nbsp;max_len&lt;/h4&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;This keyword is set to the maximum size of an UDP packet. It can be used to test message's size.&lt;br /&gt;&lt;/p&gt;&lt;br /&gt;&lt;p class="vspace"&gt;Example of usage:&lt;br /&gt;&lt;/p&gt;&lt;br /&gt;&lt;div class="vspace"&gt;&lt;/div&gt;&lt;pre&gt;    if(msg:len&amp;gt;max_len)&lt;br /&gt;    {&lt;br /&gt;        sl_send_reply("413", "message too large to be forwarded over UDP without fragmentation");&lt;br /&gt;        exit;&lt;br /&gt;    }&lt;br /&gt;&lt;/pre&gt;&lt;div class="vspace"&gt;&lt;/div&gt;&lt;h4&gt;&lt;a name="toc21" id="toc21"&gt;&lt;/a&gt;2.6&amp;nbsp;myself&lt;/h4&gt;&lt;br /&gt;&lt;p&gt;It is a reference to the list of local IP addresses, hostnames and aliases that has been set in &lt;strong&gt;OpenSIPS&lt;/strong&gt; configuration file. This lists contain the domains served by &lt;strong&gt;OpenSIPS&lt;/strong&gt;.&lt;br /&gt;&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;p class="vspace"&gt;The variable can be used to test if the host part of an URI is in the list. The usefulness of this test is to select the messages that has to be processed locally or has to be forwarded to another server.&lt;br /&gt;&lt;/p&gt;&lt;br /&gt;&lt;p class="vspace"&gt;See "alias" to add hostnames,IP addresses and aliases to the list.&lt;br /&gt;&lt;/p&gt;&lt;br /&gt;&lt;p class="vspace"&gt;Example of usage:&lt;br /&gt;&lt;/p&gt;&lt;br /&gt;&lt;div class="vspace"&gt;&lt;/div&gt;&lt;pre&gt;    if(uri==myself) {&lt;br /&gt;        log("the request is for local processing\n");&lt;br /&gt;    };&lt;br /&gt;&lt;/pre&gt;&lt;div class="vspace"&gt;&lt;/div&gt;&lt;h4&gt;&lt;a name="toc22" id="toc22"&gt;&lt;/a&gt;2.7&amp;nbsp;null&lt;/h4&gt;&lt;br /&gt;&lt;p&gt;Can be used in assignment to reset the value of a per-script variable or to delete an avp.&lt;br /&gt;&lt;/p&gt;&lt;br /&gt;&lt;p class="vspace"&gt;Example of usage:&lt;br /&gt;&lt;/p&gt;&lt;br /&gt;&lt;div class="vspace"&gt;&lt;/div&gt;&lt;pre&gt;    $avp(i:12) = null;&lt;br /&gt;    $var(x) = null;&lt;br /&gt;&lt;br /&gt;&lt;/pre&gt;&lt;p class="vspace"&gt;&lt;a href="#toc"&gt;↑ Contents&lt;/a&gt;&lt;br /&gt;&lt;/p&gt;&lt;br /&gt;&lt;div class="vspace"&gt;&lt;/div&gt;&lt;hr&gt;&lt;br /&gt;&lt;p&gt;&lt;a name="parameters" id="parameters"&gt;&lt;/a&gt;&lt;br /&gt;&lt;/p&gt;&lt;h3&gt;&lt;a name="toc23" id="toc23"&gt;&lt;/a&gt;3.&amp;nbsp;Core parameters&lt;/h3&gt;&lt;br /&gt;&lt;p&gt;Global parameters that can be set in configuration file. Accepted values are, depending on the actual parameters strings, numbers and yes/ no. If you need to specify either "yes" or "no" as part of a string, wrap this in double quotes.&lt;br /&gt;&lt;/p&gt;&lt;br /&gt;&lt;div class="vspace"&gt;&lt;/div&gt;&lt;h4&gt;&lt;a name="toc24" id="toc24"&gt;&lt;/a&gt;3.1&amp;nbsp;advertised_address&lt;/h4&gt;&lt;br /&gt;&lt;p&gt;It can be an IP address or string and represents the address advertised in Via header and&lt;br /&gt;other destination lumps (e.g RR header). If empty or not set (default value) the socket&lt;br /&gt;address from where the request will be sent is used.&lt;br /&gt;&lt;/p&gt;&lt;br /&gt;&lt;div class="vspace"&gt;&lt;/div&gt;&lt;pre&gt;  WARNING: &lt;br /&gt;  - don't set it unless you know what you are doing (e.g. nat traversal)&lt;br /&gt;  - you can set anything here, no check is made (e.g. foo.bar will be&lt;br /&gt;  accepted even if foo.bar doesn't exist)&lt;br /&gt;&lt;br /&gt;&lt;/pre&gt;&lt;p class="vspace"&gt;Example of usage:&lt;br /&gt;&lt;/p&gt;&lt;br /&gt;&lt;div class="vspace"&gt;&lt;/div&gt;&lt;pre&gt;    advertised_address="opensips.org"&lt;br /&gt;&lt;/pre&gt;&lt;div class="vspace"&gt;&lt;/div&gt;&lt;h4&gt;&lt;a name="toc25" id="toc25"&gt;&lt;/a&gt;3.2&amp;nbsp;advertised_port&lt;/h4&gt;&lt;br /&gt;&lt;p&gt;The port advertised in Via header and other destination lumps (e.g. RR). If empty or not set (default value) the port from where the message will be sent is used. Same warnings as for 'advertised_address'.&lt;br /&gt;&lt;/p&gt;&lt;br /&gt;&lt;p class="vspace"&gt;Example of usage:&lt;br /&gt;&lt;/p&gt;&lt;br /&gt;&lt;div class="vspace"&gt;&lt;/div&gt;&lt;pre&gt;    advertised_port=5080&lt;br /&gt;&lt;/pre&gt;&lt;div class="vspace"&gt;&lt;/div&gt;&lt;h4&gt;&lt;a name="toc26" id="toc26"&gt;&lt;/a&gt;3.3&amp;nbsp;alias&lt;/h4&gt;&lt;br /&gt;&lt;p&gt;Parameter to set alias hostnames for the server. It can be set many times, each value being added in a list to match the hostname when 'myself' is checked.&lt;br /&gt;&lt;br /&gt;&lt;/p&gt;&lt;br /&gt;&lt;p class="vspace"&gt;It is necessary to include the port (the port value used in the "port=" or "listen=" definitions) in the alias definition otherwise the loose_route() function will not work as expected for local forwards&lt;br /&gt;&lt;/p&gt;&lt;br /&gt;&lt;p class="vspace"&gt;Example of usage:&lt;br /&gt;&lt;/p&gt;&lt;br /&gt;&lt;div class="vspace"&gt;&lt;/div&gt;&lt;pre class="escaped"&gt;    alias=other.domain.com:5060&lt;br /&gt;    alias=another.domain.com:5060&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;div class="vspace"&gt;&lt;/div&gt;&lt;h4&gt;&lt;a name="toc27" id="toc27"&gt;&lt;/a&gt;3.4&amp;nbsp;avp_aliases&lt;/h4&gt;&lt;br /&gt;&lt;p&gt;Contains a multiple definition of aliases for AVP names.&lt;br /&gt;&lt;/p&gt;&lt;br /&gt;&lt;p class="vspace"&gt;Example of usage:&lt;br /&gt;&lt;/p&gt;&lt;br /&gt;&lt;div class="vspace"&gt;&lt;/div&gt;&lt;pre class="escaped"&gt;    avp_aliases="uuid=I:660;email=s:email_addr;fwd=i:753"&lt;br /&gt;&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;div class="vspace"&gt;&lt;/div&gt;&lt;h4&gt;&lt;a name="toc28" id="toc28"&gt;&lt;/a&gt;3.5&amp;nbsp;auto_aliases&lt;/h4&gt;&lt;br /&gt;&lt;p&gt;This parameter controls if aliases should be automatically discovered and added during fixing listening sockets. The auto discovered aliases are result of the DNS lookup (if listen is a name and not IP) or of a reverse DNS lookup on the listen IP.&lt;br /&gt;&lt;/p&gt;&lt;br /&gt;&lt;p class="vspace"&gt;Far backward compatibility reasons, the default value is "on".&lt;br /&gt;&lt;/p&gt;&lt;br /&gt;&lt;p class="vspace"&gt;Example of usage:&lt;br /&gt;&lt;/p&gt;&lt;br /&gt;&lt;div class="vspace"&gt;&lt;/div&gt;&lt;pre&gt;    auto_aliases=no&lt;br /&gt;    auto_aliases=0&lt;br /&gt;&lt;/pre&gt;&lt;div class="vspace"&gt;&lt;/div&gt;&lt;h4&gt;&lt;a name="toc29" id="toc29"&gt;&lt;/a&gt;3.6&amp;nbsp;check_via&lt;/h4&gt;&lt;br /&gt;&lt;p&gt;Check if the address in top most via of replies is local. Default value is 0 (check disabled).&lt;br /&gt;&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;p class="vspace"&gt;Example of usage:&lt;br /&gt;&lt;/p&gt;&lt;br /&gt;&lt;div class="vspace"&gt;&lt;/div&gt;&lt;pre&gt;    check_via=1 &lt;br /&gt;&lt;/pre&gt;&lt;div class="vspace"&gt;&lt;/div&gt;&lt;h4&gt;&lt;a name="toc30" id="toc30"&gt;&lt;/a&gt;3.7&amp;nbsp;children&lt;/h4&gt;&lt;br /&gt;&lt;p&gt;Number of children to fork for the UDP interfaces (one set for each interface - ip:port). Default value is 8.&lt;br /&gt;&lt;/p&gt;&lt;br /&gt;&lt;p class="vspace"&gt;Example of usage:&lt;br /&gt;&lt;/p&gt;&lt;br /&gt;&lt;div class="vspace"&gt;&lt;/div&gt;&lt;pre&gt;    children=16&lt;br /&gt;&lt;/pre&gt;&lt;div class="vspace"&gt;&lt;/div&gt;&lt;h4&gt;&lt;a name="toc31" id="toc31"&gt;&lt;/a&gt;3.8&amp;nbsp;chroot&lt;/h4&gt;&lt;br /&gt;&lt;p&gt;The value must be a valid path in the system. If set, &lt;strong&gt;OpenSIPS&lt;/strong&gt; will chroot (change root directory) to its value.&lt;br /&gt;&lt;br /&gt;&lt;/p&gt;&lt;br /&gt;&lt;p class="vspace"&gt;Example of usage:&lt;br /&gt;&lt;/p&gt;&lt;br /&gt;&lt;div class="vspace"&gt;&lt;/div&gt;&lt;pre&gt;    chroot=/other/fakeroot&lt;br /&gt;&lt;/pre&gt;&lt;div class="vspace"&gt;&lt;/div&gt;&lt;h4&gt;&lt;a name="toc32" id="toc32"&gt;&lt;/a&gt;3.9&amp;nbsp;db_version_table&lt;/h4&gt;&lt;br /&gt;&lt;p&gt;The name of the table version to be used by the DB API to check the version of the used tables.&lt;br&gt;Default value is &lt;strong&gt;"version"&lt;/strong&gt;&lt;br /&gt;&lt;/p&gt;&lt;br /&gt;&lt;p class="vspace"&gt;Example of usage:&lt;br /&gt;&lt;/p&gt;&lt;br /&gt;&lt;div class="vspace"&gt;&lt;/div&gt;&lt;pre&gt;    db_version_table="version_1_5"&lt;br /&gt;&lt;br /&gt;&lt;/pre&gt;&lt;div class="vspace"&gt;&lt;/div&gt;&lt;h4&gt;&lt;a name="toc33" id="toc33"&gt;&lt;/a&gt;3.10&amp;nbsp;debug&lt;/h4&gt;&lt;br /&gt;&lt;p&gt;Set the debug level. Higher values make &lt;strong&gt;OpenSIPS&lt;/strong&gt; to print more debug messages.&lt;br /&gt;&lt;/p&gt;&lt;br /&gt;&lt;p class="vspace"&gt;Examples of usage:&lt;br /&gt;&lt;/p&gt;&lt;br /&gt;&lt;div class="vspace"&gt;&lt;/div&gt;&lt;pre class="escaped"&gt;    debug=3 -- print only important messages (like errors or more critical situations) &lt;br /&gt;    - recommended for running proxy as daemon&lt;br /&gt;&lt;br /&gt;    debug=9 -- print a lot of debug messages - use it only when doing debugging sessions&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;p class="vspace"&gt;The 'debug' parameter is usually used in concordance with 'log_stderror' parameter.&lt;br /&gt;&lt;/p&gt;&lt;br /&gt;&lt;p class="vspace"&gt;Value of 'debug' parameter can also be get and set dynamically using 'debug' Core MI function.&lt;br /&gt;&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;p class="vspace"&gt;For more see: &lt;a class="urllink" href="http://www.voice-system.ro/docs/ser-syslog/" rel="nofollow"&gt;http://www.voice-system.ro/docs/ser-syslog/&lt;/a&gt;&lt;br /&gt;&lt;/p&gt;&lt;br /&gt;&lt;div class="vspace"&gt;&lt;/div&gt;&lt;h4&gt;&lt;a name="toc34" id="toc34"&gt;&lt;/a&gt;3.11&amp;nbsp;disable_503_translation&lt;/h4&gt;&lt;br /&gt;&lt;p&gt;If 'yes', OpenSIPS will not translate the received 503 replies into 500 replies (RFC 3261 clearly states that a proxy should never relay a 503 response, but instead it must transform it into a 500).&lt;br /&gt;&lt;/p&gt;&lt;br /&gt;&lt;p class="vspace"&gt;Default value is 'no' (do translation).&lt;br /&gt;&lt;/p&gt;&lt;br /&gt;&lt;div class="vspace"&gt;&lt;/div&gt;&lt;h4&gt;&lt;a name="toc35" id="toc35"&gt;&lt;/a&gt;3.12&amp;nbsp;disable_core_dump&lt;/h4&gt;&lt;br /&gt;&lt;p&gt;Can be 'yes' or 'no'. By default core dump limits are set to unlimited or&lt;br /&gt;a high enough value. Set this config variable to 'yes' to disable core dump-ing&lt;br /&gt;(will set core limits to 0).&lt;br /&gt;&lt;/p&gt;&lt;br /&gt;&lt;p class="vspace"&gt;Default value is 'no'.&lt;br /&gt;&lt;br /&gt;&lt;/p&gt;&lt;br /&gt;&lt;p class="vspace"&gt;Example of usage:&lt;br /&gt;&lt;/p&gt;&lt;br /&gt;&lt;div class="vspace"&gt;&lt;/div&gt;&lt;pre&gt;    disable_core_dump=yes&lt;br /&gt;&lt;/pre&gt;&lt;div class="vspace"&gt;&lt;/div&gt;&lt;h4&gt;&lt;a name="toc36" id="toc36"&gt;&lt;/a&gt;3.13&amp;nbsp;disable_dns_blacklist&lt;/h4&gt;&lt;br /&gt;&lt;p&gt;The DNS resolver, when configured with failover, can automatically store in a temporary blacklist the failed destinations. This will prevent (for a limited period of time) &lt;strong&gt;OpenSIPS&lt;/strong&gt; to send requests to destination known as failed. So, the blacklist can be used as a memory for the DNS resolver. &lt;br /&gt;&lt;/p&gt;&lt;br /&gt;&lt;p class="vspace"&gt;The temporary blacklist created by DNS resolver is named "dns" and it is by default selected for usage (no need use the use_blacklist()) function. The rules from this list have a life time of 4 minutes - you can change it at compile time, from blacklists.h .&lt;br /&gt;&lt;/p&gt;&lt;br /&gt;&lt;p class="vspace"&gt;Can be 'yes' or 'no'. By default the blacklist is disabled (Default value is 'yes').&lt;br /&gt;&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;p class="vspace"&gt;Example of usage:&lt;br /&gt;&lt;/p&gt;&lt;br /&gt;&lt;div class="vspace"&gt;&lt;/div&gt;&lt;pre&gt;    disable_dns_blacklist=no&lt;br /&gt;&lt;/pre&gt;&lt;div class="vspace"&gt;&lt;/div&gt;&lt;h4&gt;&lt;a name="toc37" id="toc37"&gt;&lt;/a&gt;3.14&amp;nbsp;disable_dns_failover&lt;/h4&gt;&lt;br /&gt;&lt;p&gt;Can be 'yes' or 'no'. By default DNS-based failover is enabled. Set this config variable to 'yes' to disable the DNS-based failover. This is a global option, affecting the core and the modules also.&lt;br /&gt;&lt;/p&gt;&lt;br /&gt;&lt;p class="vspace"&gt;Default value is 'no'.&lt;br /&gt;&lt;/p&gt;&lt;br /&gt;&lt;p class="vspace"&gt;Example of usage:&lt;br /&gt;&lt;/p&gt;&lt;br /&gt;&lt;div class="vspace"&gt;&lt;/div&gt;&lt;pre&gt;    disable_dns_failover=yes&lt;br /&gt;&lt;/pre&gt;&lt;div class="vspace"&gt;&lt;/div&gt;&lt;h4&gt;&lt;a name="toc38" id="toc38"&gt;&lt;/a&gt;3.15&amp;nbsp;disable_stateless_fwd&lt;/h4&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;Can be 'yes' or 'no'. This parameter controls the handling of stateless replies:&lt;br /&gt;&lt;/p&gt;&lt;pre class="escaped"&gt;    yes - drop stateless replies if stateless fwd functions (like forward) are not used in script&lt;br /&gt;    no - forward stateless replies&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;p&gt;Default value is 'yes'.&lt;br /&gt;&lt;/p&gt;&lt;br /&gt;&lt;div class="vspace"&gt;&lt;/div&gt;&lt;h4&gt;&lt;a name="toc39" id="toc39"&gt;&lt;/a&gt;3.16&amp;nbsp;disable_tcp&lt;/h4&gt;&lt;br /&gt;&lt;p&gt;Global parameter to disable TCP support in the SIP server. Default value is 'no'.&lt;br /&gt;&lt;/p&gt;&lt;br /&gt;&lt;p class="vspace"&gt;Example of usage:&lt;br /&gt;&lt;/p&gt;&lt;br /&gt;&lt;div class="vspace"&gt;&lt;/div&gt;&lt;pre&gt;    disable_tcp=yes&lt;br /&gt;&lt;/pre&gt;&lt;div class="vspace"&gt;&lt;/div&gt;&lt;h4&gt;&lt;a name="toc40" id="toc40"&gt;&lt;/a&gt;3.17&amp;nbsp;disable_tls&lt;/h4&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;Global parameter to disable TLS support in the SIP server. Default value is 'yes'.&lt;br /&gt;&lt;/p&gt;&lt;br /&gt;&lt;p class="vspace"&gt;Example of usage:&lt;br /&gt;&lt;/p&gt;&lt;br /&gt;&lt;div class="vspace"&gt;&lt;/div&gt;&lt;pre&gt;    disable_tcp=no&lt;br /&gt;&lt;/pre&gt;&lt;div class="vspace"&gt;&lt;/div&gt;&lt;h4&gt;&lt;a name="toc41" id="toc41"&gt;&lt;/a&gt;3.18&amp;nbsp;dns&lt;/h4&gt;&lt;br /&gt;&lt;p&gt;This parameter controls if the SIP server should attempt to lookup its own domain name in DNS. If this parameter is set to yes and the domain name is not in DNS a warning is printed on syslog and a "received=" field is added to the via header. &lt;br /&gt;&lt;/p&gt;&lt;br /&gt;&lt;p class="vspace"&gt;Default is no.&lt;br /&gt;&lt;/p&gt;&lt;br /&gt;&lt;div class="vspace"&gt;&lt;/div&gt;&lt;h4&gt;&lt;a name="toc42" id="toc42"&gt;&lt;/a&gt;3.19&amp;nbsp;dns_retr_time&lt;/h4&gt;&lt;br /&gt;&lt;p&gt;Time in seconds before retrying a dns request. Default value is system specific,&lt;br /&gt;depends also on the '/etc/resolv.conf' content (usually 5s).&lt;br /&gt;&lt;br /&gt;&lt;/p&gt;&lt;br /&gt;&lt;p class="vspace"&gt;Example of usage:&lt;br /&gt;&lt;/p&gt;&lt;br /&gt;&lt;div class="vspace"&gt;&lt;/div&gt;&lt;pre&gt;    dns_retr_time=3&lt;br /&gt;&lt;/pre&gt;&lt;div class="vspace"&gt;&lt;/div&gt;&lt;h4&gt;&lt;a name="toc43" id="toc43"&gt;&lt;/a&gt;3.20&amp;nbsp;dns_retr_no&lt;/h4&gt;&lt;br /&gt;&lt;p&gt;Number of dns retransmissions before giving up. Default value is system specific,&lt;br /&gt;depends also on the '/etc/resolv.conf' content (usually 4).&lt;br /&gt;&lt;/p&gt;&lt;br /&gt;&lt;p class="vspace"&gt;Example of usage:&lt;br /&gt;&lt;/p&gt;&lt;br /&gt;&lt;div class="vspace"&gt;&lt;/div&gt;&lt;pre&gt;    dns_retr_no=3&lt;br /&gt;&lt;/pre&gt;&lt;div class="vspace"&gt;&lt;/div&gt;&lt;h4&gt;&lt;a name="toc44" id="toc44"&gt;&lt;/a&gt;3.21&amp;nbsp;dns_servers_no&lt;/h4&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;How many dns servers from the ones defined in '/etc/resolv.conf' will be used. &lt;br /&gt;Default value is to use all of them.&lt;br /&gt;&lt;/p&gt;&lt;br /&gt;&lt;p class="vspace"&gt;Example of usage:&lt;br /&gt;&lt;/p&gt;&lt;br /&gt;&lt;div class="vspace"&gt;&lt;/div&gt;&lt;pre&gt;    dns_servers_no=2&lt;br /&gt;&lt;/pre&gt;&lt;div class="vspace"&gt;&lt;/div&gt;&lt;h4&gt;&lt;a name="toc45" id="toc45"&gt;&lt;/a&gt;3.22&amp;nbsp;dns_try_ipv6&lt;/h4&gt;&lt;br /&gt;&lt;p&gt;Can be 'yes' or 'no'. If it is set to 'yes' and a DNS lookup fails, it will retry it&lt;br /&gt;for ipv6 (AAAA record). Default value is 'no'.&lt;br /&gt;&lt;/p&gt;&lt;br /&gt;&lt;p class="vspace"&gt;Example of usage:&lt;br /&gt;&lt;/p&gt;&lt;br /&gt;&lt;div class="vspace"&gt;&lt;/div&gt;&lt;pre&gt;    dns_try_ipv6=yes&lt;br /&gt;&lt;/pre&gt;&lt;div class="vspace"&gt;&lt;/div&gt;&lt;h4&gt;&lt;a name="toc46" id="toc46"&gt;&lt;/a&gt;3.23&amp;nbsp;dns_use_search_list&lt;/h4&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;Can be 'yes' or 'no'. If set to 'no', the search list in '/etc/resolv.conf'&lt;br /&gt;will be ignored (=&amp;gt; fewer lookups =&amp;gt; gives up faster). Default value is 'yes'.&lt;br /&gt;&lt;/p&gt;&lt;br /&gt;&lt;p class="vspace"&gt;HINT: even if you don't have a search list defined, setting this option&lt;br /&gt;to 'no' will still be "faster", because an empty search list is in &lt;br /&gt;fact search "" (so even if the search list is empty/missing there will&lt;br /&gt;still be 2 dns queries, eg. foo+'.' and foo+""+'.')&lt;br /&gt;&lt;/p&gt;&lt;br /&gt;&lt;p class="vspace"&gt;Example of usage:&lt;br /&gt;&lt;/p&gt;&lt;br /&gt;&lt;div class="vspace"&gt;&lt;/div&gt;&lt;pre&gt;    dns_use_search_list=no&lt;br /&gt;&lt;/pre&gt;&lt;div class="vspace"&gt;&lt;/div&gt;&lt;h4&gt;&lt;a name="toc47" id="toc47"&gt;&lt;/a&gt;3.24&amp;nbsp;dst_blacklist&lt;/h4&gt;&lt;br /&gt;&lt;p&gt;Definition of a static (read-only) IP/destination blacklist. These lists can be selected from script (at runtime) to filter  the outgoing requests, based on IP, protocol, port, etc.&lt;br /&gt;&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;p class="vspace"&gt;Its primary purposes will be to prevent sending requests to critical IPs (like GWs) due DNS or to avoid sending to destinations that are known to be unavailable (temporary or permanent). &lt;br /&gt;&lt;/p&gt;&lt;br /&gt;&lt;p class="vspace"&gt;Example of usage:&lt;br /&gt;&lt;/p&gt;&lt;br /&gt;&lt;div class="vspace"&gt;&lt;/div&gt;&lt;pre class="escaped"&gt;   # filter out requests going to ips of my gws&lt;br /&gt;   dst_blacklist = gw:{( tcp , 192.168.2.100 , 5060 , "" ),( any , 192.168.2.101 , 0 , "" )}&lt;br /&gt;   # block requests going to "evil" networks&lt;br /&gt;   dst_blacklist = net_filter:{ ( any , 192.168.1.100/255.255.255.0 , 0 , "" )}&lt;br /&gt;   # block message requests with nasty words&lt;br /&gt;   dst_blacklist = msg_filter:{ ( any , 192.168.20.0/255.255.255.0 , 0 , "MESSAGE*ugly_word" )}&lt;br /&gt;   # block requests not going to a specific subnet&lt;br /&gt;   dst_blacklist = net_filter2:{ !( any , 192.168.30.0/255.255.255.0 , 0 , "" )}&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;p class="vspace"&gt;Each rule is defined by:&lt;br /&gt;&lt;/p&gt;&lt;ul&gt;&lt;li&gt;protocol : TCP, UDP, TLS or "any" for anything&lt;br /&gt;&lt;/li&gt;&lt;li&gt;port : number or 0 for any&lt;br /&gt;&lt;/li&gt;&lt;li&gt;ip/mask&lt;br /&gt;&lt;/li&gt;&lt;li&gt;test patter - is a filename like matching (see  "man 3 fnmatch") applied on the outgoing request buffer (first_line+hdrs+body) &lt;br /&gt;&lt;/li&gt;&lt;/ul&gt;&lt;div class="vspace"&gt;&lt;/div&gt;&lt;h4&gt;&lt;a name="toc48" id="toc48"&gt;&lt;/a&gt;3.25&amp;nbsp;fork&lt;/h4&gt;&lt;br /&gt;&lt;p&gt;If set to 'yes' the proxy will fork and run in daemon mode - one process will be created for each network interface the proxy listens to and for each protocol (TCP/UDP), multiplied with the value of 'children' parameter.&lt;br /&gt;&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;p class="vspace"&gt;When set to 'no', the proxy will stay bound to the terminal and runs as single process. First interface is used for listening to.&lt;br /&gt;&lt;/p&gt;&lt;br /&gt;&lt;p class="vspace"&gt;Default value is 'yes'.&lt;br /&gt;&lt;/p&gt;&lt;br /&gt;&lt;p class="vspace"&gt;Example of usage:&lt;br /&gt;&lt;/p&gt;&lt;br /&gt;&lt;div class="vspace"&gt;&lt;/div&gt;&lt;pre&gt;    fork=no&lt;br /&gt;&lt;/pre&gt;&lt;div class="vspace"&gt;&lt;/div&gt;&lt;h4&gt;&lt;a name="toc49" id="toc49"&gt;&lt;/a&gt;3.26&amp;nbsp;group gid&lt;/h4&gt;&lt;br /&gt;&lt;p&gt;The group id to run &lt;strong&gt;OpenSIPS&lt;/strong&gt;.&lt;br /&gt;&lt;/p&gt;&lt;br /&gt;&lt;p class="vspace"&gt;Example of usage:&lt;br /&gt;&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;div class="vspace"&gt;&lt;/div&gt;&lt;pre&gt;  group="opensips"&lt;br /&gt;&lt;/pre&gt;&lt;div class="vspace"&gt;&lt;/div&gt;&lt;h4&gt;&lt;a name="toc50" id="toc50"&gt;&lt;/a&gt;3.27&amp;nbsp;listen&lt;/h4&gt;&lt;br /&gt;&lt;p&gt;Set the network addresses the SIP server should listen to. It can be an IP address, hostname or network interface id or combination of protocol:address:port (e.g., udp:10.10.10.10:5060). This parameter can be set multiple times in same configuration file, the server listening on all addresses specified.&lt;br /&gt;&lt;/p&gt;&lt;br /&gt;&lt;p class="vspace"&gt;Example of usage:&lt;br /&gt;&lt;/p&gt;&lt;br /&gt;&lt;div class="vspace"&gt;&lt;/div&gt;&lt;pre class="escaped"&gt;    listen=10.10.10.10&lt;br /&gt;    listen=eth1:5062&lt;br /&gt;    listen=udp:10.10.10.10:5064&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;p class="vspace"&gt;If you omit this directive then the SIP server will listen on all interfaces. On start the SIP server reports all the interfaces that it is listening on. Even if you specify only UDP interfaces here, the server will start the TCP engine too. If you don't want this, you need to disable the TCP support completely with the core parameter disable_tcp.&lt;br /&gt;&lt;/p&gt;&lt;br /&gt;&lt;div class="vspace"&gt;&lt;/div&gt;&lt;h4&gt;&lt;a name="toc51" id="toc51"&gt;&lt;/a&gt;3.28&amp;nbsp;log_facility&lt;/h4&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;If &lt;strong&gt;OpenSIPS&lt;/strong&gt; logs to syslog, you can control the facility for logging. Very&lt;br /&gt;useful when you want to divert all &lt;strong&gt;OpenSIPS&lt;/strong&gt; logs to a different log file.&lt;br /&gt;See the man page syslog(3) for more details.&lt;br /&gt;&lt;/p&gt;&lt;br /&gt;&lt;p class="vspace"&gt;For more see: &lt;a class="urllink" href="http://www.voice-system.ro/docs/ser-syslog/" rel="nofollow"&gt;http://www.voice-system.ro/docs/ser-syslog/&lt;/a&gt;&lt;br /&gt;&lt;/p&gt;&lt;br /&gt;&lt;p class="vspace"&gt;Default value is LOG_DAEMON.&lt;br /&gt;&lt;/p&gt;&lt;br /&gt;&lt;p class="vspace"&gt;Example of usage:&lt;br /&gt;&lt;/p&gt;&lt;br /&gt;&lt;div class="vspace"&gt;&lt;/div&gt;&lt;pre&gt;    log_facility=LOG_LOCAL0&lt;br /&gt;&lt;br /&gt;&lt;/pre&gt;&lt;div class="vspace"&gt;&lt;/div&gt;&lt;h4&gt;&lt;a name="toc52" id="toc52"&gt;&lt;/a&gt;3.29&amp;nbsp;log_name&lt;/h4&gt;&lt;br /&gt;&lt;p&gt;Set the id to be printed in syslog. The value must be a string and has&lt;br /&gt;effect only when &lt;strong&gt;OpenSIPS&lt;/strong&gt; runs in daemon mode (fork=yes), after daemonize.&lt;br /&gt;Default value is argv[0].&lt;br /&gt;&lt;/p&gt;&lt;br /&gt;&lt;p class="vspace"&gt;Example of usage:&lt;br /&gt;&lt;/p&gt;&lt;br /&gt;&lt;div class="vspace"&gt;&lt;/div&gt;&lt;pre&gt;    log_name="osips-5070"&lt;br /&gt;&lt;/pre&gt;&lt;div class="vspace"&gt;&lt;/div&gt;&lt;h4&gt;&lt;a name="toc53" id="toc53"&gt;&lt;/a&gt;3.30&amp;nbsp;log_stderror&lt;/h4&gt;&lt;br /&gt;&lt;p&gt;With this parameter you can make &lt;strong&gt;OpenSIPS&lt;/strong&gt; to write log and debug messages to standard error. Possible values are:&lt;br /&gt;&lt;br /&gt;&lt;/p&gt;&lt;br /&gt;&lt;p class="vspace"&gt;- "yes" - write the messages to standard error&lt;br /&gt;&lt;/p&gt;&lt;br /&gt;&lt;p class="vspace"&gt;- "no" - write the messages to syslog&lt;br /&gt;&lt;/p&gt;&lt;br /&gt;&lt;p class="vspace"&gt;Default value is "no".&lt;br /&gt;&lt;/p&gt;&lt;br /&gt;&lt;p class="vspace"&gt;For more see: &lt;a class="urllink" href="http://www.voice-system.ro/docs/ser-syslog/" rel="nofollow"&gt;http://www.voice-system.ro/docs/ser-syslog/&lt;/a&gt;&lt;br /&gt;&lt;/p&gt;&lt;br /&gt;&lt;p class="vspace"&gt;Example of usage:&lt;br /&gt;&lt;/p&gt;&lt;br /&gt;&lt;div class="vspace"&gt;&lt;/div&gt;&lt;pre&gt;    log_stderror=yes&lt;br /&gt;&lt;/pre&gt;&lt;div class="vspace"&gt;&lt;/div&gt;&lt;h4&gt;&lt;a name="toc54" id="toc54"&gt;&lt;/a&gt;3.31&amp;nbsp;max_while_loops&lt;/h4&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;The parameters set the value of maximum loops that can be done within a "while". Comes as a protection to avoid infinite loops in config file execution. Default is 100.&lt;br /&gt;&lt;/p&gt;&lt;br /&gt;&lt;p class="vspace"&gt;Example of usage:&lt;br /&gt;&lt;/p&gt;&lt;br /&gt;&lt;div class="vspace"&gt;&lt;/div&gt;&lt;pre&gt;    max_while_loops=200&lt;br /&gt;&lt;/pre&gt;&lt;div class="vspace"&gt;&lt;/div&gt;&lt;h4&gt;&lt;a name="toc55" id="toc55"&gt;&lt;/a&gt;3.32&amp;nbsp;maxbuffer&lt;/h4&gt;&lt;br /&gt;&lt;p&gt;The size in bytes not to be exceeded during the auto-probing procedure of discovering the maximum buffer size for receiving UDP messages. Default value is 262144.&lt;br /&gt;&lt;/p&gt;&lt;br /&gt;&lt;p class="vspace"&gt;Example of usage:&lt;br /&gt;&lt;/p&gt;&lt;br /&gt;&lt;div class="vspace"&gt;&lt;/div&gt;&lt;pre&gt;    maxbuffer=65536&lt;br /&gt;&lt;/pre&gt;&lt;div class="vspace"&gt;&lt;/div&gt;&lt;h4&gt;&lt;a name="toc56" id="toc56"&gt;&lt;/a&gt;3.33&amp;nbsp;memdump | mem_dump&lt;/h4&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;Log level to print memory status information (runtime and shutdown). It has to be less than the value of 'debug' parameter if you want memory info to be logged. Default: memdump=L_DBG (4)&lt;br /&gt;&lt;/p&gt;&lt;br /&gt;&lt;p class="vspace"&gt;Example of usage:&lt;br /&gt;&lt;/p&gt;&lt;br /&gt;&lt;div class="vspace"&gt;&lt;/div&gt;&lt;pre&gt;    memdump=2&lt;br /&gt;&lt;/pre&gt;&lt;p class="vspace"&gt;NOTE that setting memlog (see below), will also set the memdump parameter - if you want different values for memlog and memdump, you need to first set memlog and then memdump.&lt;br /&gt;&lt;/p&gt;&lt;br /&gt;&lt;div class="vspace"&gt;&lt;/div&gt;&lt;h4&gt;&lt;a name="toc57" id="toc57"&gt;&lt;/a&gt;3.34&amp;nbsp;memlog | mem_log&lt;/h4&gt;&lt;br /&gt;&lt;p&gt;Log level to print memory debug info. It has to be less than the value of 'debug' parameter if you want memory info to be logged. Default: memlog=L_DBG (4)&lt;br /&gt;&lt;/p&gt;&lt;br /&gt;&lt;p class="vspace"&gt;Example of usage:&lt;br /&gt;&lt;/p&gt;&lt;br /&gt;&lt;div class="vspace"&gt;&lt;/div&gt;&lt;pre&gt;    memlog=2&lt;br /&gt;&lt;br /&gt;&lt;/pre&gt;&lt;p class="vspace"&gt;NOTE: by setting memlog parameter, the memdump will automatically be set to the same value (see memdump docs).&lt;br /&gt;&lt;/p&gt;&lt;br /&gt;&lt;div class="vspace"&gt;&lt;/div&gt;&lt;h4&gt;&lt;a name="toc58" id="toc58"&gt;&lt;/a&gt;3.35&amp;nbsp;mcast_loopback&lt;/h4&gt;&lt;br /&gt;&lt;p&gt;It can be 'yes' or 'no'. If set to 'yes', multicast datagram are sent over loopback. Default value is 'no'.&lt;br /&gt;&lt;/p&gt;&lt;br /&gt;&lt;p class="vspace"&gt;Example of usage:&lt;br /&gt;&lt;/p&gt;&lt;br /&gt;&lt;div class="vspace"&gt;&lt;/div&gt;&lt;pre&gt;    mcast_loopback=yes&lt;br /&gt;&lt;/pre&gt;&lt;div class="vspace"&gt;&lt;/div&gt;&lt;h4&gt;&lt;a name="toc59" id="toc59"&gt;&lt;/a&gt;3.36&amp;nbsp;mcast_ttl&lt;/h4&gt;&lt;br /&gt;&lt;p&gt;Set the value for multicast ttl. Default value is OS specific (usually 1).&lt;br /&gt;&lt;/p&gt;&lt;br /&gt;&lt;p class="vspace"&gt;Example of usage:&lt;br /&gt;&lt;br /&gt;&lt;/p&gt;&lt;br /&gt;&lt;div class="vspace"&gt;&lt;/div&gt;&lt;pre&gt;    mcast_ttl=32&lt;br /&gt;&lt;/pre&gt;&lt;div class="vspace"&gt;&lt;/div&gt;&lt;h4&gt;&lt;a name="toc60" id="toc60"&gt;&lt;/a&gt;3.37&amp;nbsp;mhomed&lt;/h4&gt;&lt;br /&gt;&lt;p&gt;Set the server to try to locate outbound interface on multihomed host. By default is not (0) - it is rather time consuming.&lt;br /&gt;&lt;/p&gt;&lt;br /&gt;&lt;p class="vspace"&gt;Example of usage:&lt;br /&gt;&lt;/p&gt;&lt;br /&gt;&lt;div class="vspace"&gt;&lt;/div&gt;&lt;pre&gt;    mhomed=1&lt;br /&gt;&lt;/pre&gt;&lt;div class="vspace"&gt;&lt;/div&gt;&lt;h4&gt;&lt;a name="toc61" id="toc61"&gt;&lt;/a&gt;3.38&amp;nbsp;mpath&lt;/h4&gt;&lt;br /&gt;&lt;p&gt;Set the module search path.  This can be used to simplify the loadmodule parameter&lt;br /&gt;&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;p class="vspace"&gt;Example of usage:&lt;br /&gt;&lt;/p&gt;&lt;br /&gt;&lt;div class="vspace"&gt;&lt;/div&gt;&lt;pre class="escaped"&gt;    mpath="/usr/local/lib/opensips/modules"&lt;br /&gt;    loadmodule "mysql.so"&lt;br /&gt;    loadmodule "uri.so"&lt;br /&gt;    loadmodule "uri_db.so"&lt;br /&gt;    loadmodule "sl.so"&lt;br /&gt;    loadmodule "tm.so"&lt;br /&gt;    ...&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;div class="vspace"&gt;&lt;/div&gt;&lt;h4&gt;&lt;a name="toc62" id="toc62"&gt;&lt;/a&gt;3.39&amp;nbsp;open_files_limit&lt;/h4&gt;&lt;br /&gt;&lt;p&gt;If set and bigger than the current open file limit, &lt;strong&gt;OpenSIPS&lt;/strong&gt; will try&lt;br /&gt;to increase its open file limit to this number. Note: &lt;strong&gt;OpenSIPS&lt;/strong&gt; must be&lt;br /&gt;started as root to be able to increase a limit past the hard limit&lt;br /&gt;(which, for open files, is 1024 on most systems).&lt;br /&gt;&lt;/p&gt;&lt;br /&gt;&lt;p class="vspace"&gt;Example of usage:&lt;br /&gt;&lt;br /&gt;&lt;/p&gt;&lt;br /&gt;&lt;div class="vspace"&gt;&lt;/div&gt;&lt;pre&gt;    open_files_limit=2048&lt;br /&gt;&lt;/pre&gt;&lt;div class="vspace"&gt;&lt;/div&gt;&lt;h4&gt;&lt;a name="toc63" id="toc63"&gt;&lt;/a&gt;3.40&amp;nbsp;port&lt;/h4&gt;&lt;br /&gt;&lt;p&gt;The port the SIP server listens to. The default value for it is 5060.&lt;br /&gt;&lt;/p&gt;&lt;br /&gt;&lt;p class="vspace"&gt;Example of usage:&lt;br /&gt;&lt;/p&gt;&lt;br /&gt;&lt;div class="vspace"&gt;&lt;/div&gt;&lt;pre&gt;    port=5080&lt;br /&gt;&lt;/pre&gt;&lt;div class="vspace"&gt;&lt;/div&gt;&lt;h4&gt;&lt;a name="toc64" id="toc64"&gt;&lt;/a&gt;3.41&amp;nbsp;reply_to_via&lt;/h4&gt;&lt;br /&gt;&lt;p&gt;If it is set to 1, any local reply is sent to the address advertised in top most Via of the request. Default value is 0 (off).&lt;br /&gt;&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;p class="vspace"&gt;Example of usage:&lt;br /&gt;&lt;/p&gt;&lt;br /&gt;&lt;div class="vspace"&gt;&lt;/div&gt;&lt;pre&gt;    reply_to_via=0&lt;br /&gt;&lt;/pre&gt;&lt;div class="vspace"&gt;&lt;/div&gt;&lt;h4&gt;&lt;a name="toc65" id="toc65"&gt;&lt;/a&gt;3.42&amp;nbsp;rev_dns&lt;/h4&gt;&lt;br /&gt;&lt;p&gt;This parameter controls if the SIP server should attempt to lookup its own IP address in DNS. If this parameter is set to yes and the IP address is not in DNS a warning is printed on syslog and a "received=" field is added to the via header. &lt;br /&gt;&lt;/p&gt;&lt;br /&gt;&lt;p class="vspace"&gt;Default is no.&lt;br /&gt;&lt;/p&gt;&lt;br /&gt;&lt;div class="vspace"&gt;&lt;/div&gt;&lt;h4&gt;&lt;a name="toc66" id="toc66"&gt;&lt;/a&gt;3.43&amp;nbsp;server_header&lt;/h4&gt;&lt;br /&gt;&lt;p&gt;The body of Server header field generated by &lt;strong&gt;OpenSIPS&lt;/strong&gt; when it sends a request as UAS.  It defaults to "OpenSIPS (&amp;lt;version&amp;gt; (&amp;lt;arch&amp;gt;/&amp;lt;os&amp;gt;))".  &lt;br /&gt;&lt;br /&gt;&lt;/p&gt;&lt;br /&gt;&lt;p class="vspace"&gt;Example of usage:&lt;br /&gt;&lt;/p&gt;&lt;br /&gt;&lt;div class="vspace"&gt;&lt;/div&gt;&lt;pre class="escaped"&gt;server_header="Server: My Company SIP Proxy"&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;p class="vspace"&gt;Please note that you have to add the header name "Server:", otherwise &lt;strong&gt;OpenSIPS&lt;/strong&gt; will just write a header like:&lt;br /&gt;&lt;/p&gt;&lt;br /&gt;&lt;div class="vspace"&gt;&lt;/div&gt;&lt;pre class="escaped"&gt;My Company SIP Proxy&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;div class="vspace"&gt;&lt;/div&gt;&lt;h4&gt;&lt;a name="toc67" id="toc67"&gt;&lt;/a&gt;3.44&amp;nbsp;server_signature&lt;/h4&gt;&lt;br /&gt;&lt;p&gt;This parameter controls the "Server" header in any locally generated message. &lt;br /&gt;&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;p class="vspace"&gt;Example of usage:&lt;br /&gt;&lt;/p&gt;&lt;br /&gt;&lt;div class="vspace"&gt;&lt;/div&gt;&lt;pre&gt;     server_signature=no&lt;br /&gt;&lt;/pre&gt;&lt;p class="vspace"&gt;If it is enabled (default=yes) a header is generated as in the following example:&lt;br /&gt;&lt;/p&gt;&lt;br /&gt;&lt;div class="vspace"&gt;&lt;/div&gt;&lt;pre&gt;     Server: OpenSIPS (0.9.5 (i386/linux))&lt;br /&gt;&lt;/pre&gt;&lt;div class="vspace"&gt;&lt;/div&gt;&lt;h4&gt;&lt;a name="toc68" id="toc68"&gt;&lt;/a&gt;3.45&amp;nbsp;sip_warning&lt;/h4&gt;&lt;br /&gt;&lt;p&gt;Can be 0 or 1. If set to 1 (default value is 0) a 'Warning' header is added to each reply generated by &lt;strong&gt;OpenSIPS&lt;/strong&gt;.&lt;br /&gt;The header contains several details that help troubleshooting using the network traffic dumps.&lt;br /&gt;&lt;/p&gt;&lt;br /&gt;&lt;p class="vspace"&gt;Example of usage:&lt;br /&gt;&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;div class="vspace"&gt;&lt;/div&gt;&lt;pre&gt;    sip_warning=0&lt;br /&gt;&lt;/pre&gt;&lt;div class="vspace"&gt;&lt;/div&gt;&lt;h4&gt;&lt;a name="toc69" id="toc69"&gt;&lt;/a&gt;3.46&amp;nbsp;tcp_children&lt;/h4&gt;&lt;br /&gt;&lt;p&gt;Number of children processes to be created for reading from TCP connections. If no value is explicitly set, the same number of TCP children as UDP children (see "children" parameter) will be used.&lt;br /&gt;&lt;/p&gt;&lt;br /&gt;&lt;p class="vspace"&gt;Example of usage:&lt;br /&gt;&lt;/p&gt;&lt;br /&gt;&lt;div class="vspace"&gt;&lt;/div&gt;&lt;pre&gt;    tcp_children=4&lt;br /&gt;&lt;/pre&gt;&lt;div class="vspace"&gt;&lt;/div&gt;&lt;h4&gt;&lt;a name="toc70" id="toc70"&gt;&lt;/a&gt;3.47&amp;nbsp;tcp_accept_aliases&lt;/h4&gt;&lt;br /&gt;&lt;h4&gt;&lt;a name="toc71" id="toc71"&gt;&lt;/a&gt;3.48&amp;nbsp;tcp_send_timeout&lt;/h4&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;Time in seconds after a TCP connection will be closed if it is not available&lt;br /&gt;for writing in this interval (and &lt;strong&gt;OpenSIPS&lt;/strong&gt; wants to send something on it).&lt;br /&gt;&lt;/p&gt;&lt;br /&gt;&lt;p class="vspace"&gt;Example of usage:&lt;br /&gt;&lt;/p&gt;&lt;br /&gt;&lt;div class="vspace"&gt;&lt;/div&gt;&lt;pre&gt;    tcp_send_timeout=3&lt;br /&gt;&lt;/pre&gt;&lt;div class="vspace"&gt;&lt;/div&gt;&lt;h4&gt;&lt;a name="toc72" id="toc72"&gt;&lt;/a&gt;3.49&amp;nbsp;tcp_connect_timeout&lt;/h4&gt;&lt;br /&gt;&lt;p&gt;Time in seconds before an ongoing attempt to connect will be aborted.&lt;br /&gt;&lt;/p&gt;&lt;br /&gt;&lt;p class="vspace"&gt;Example of usage:&lt;br /&gt;&lt;/p&gt;&lt;br /&gt;&lt;div class="vspace"&gt;&lt;/div&gt;&lt;pre&gt;    tcp_connect_timeout=5&lt;br /&gt;&lt;br /&gt;&lt;/pre&gt;&lt;div class="vspace"&gt;&lt;/div&gt;&lt;h4&gt;&lt;a name="toc73" id="toc73"&gt;&lt;/a&gt;3.50&amp;nbsp;tcp_connection_lifetime!!!!&lt;/h4&gt;&lt;br /&gt;&lt;p&gt;Lifetime in seconds for TCP sessions. TCP sessions which are inactive for &amp;gt;tcp_connection_lifetime will be closed by &lt;strong&gt;OpenSIPS&lt;/strong&gt;. Default value is defined in tcp_conn.h: #define DEFAULT_TCP_CONNECTION_LIFETIME 120. Setting this value to 0 will close the TCP connection pretty quick ;-). You can also set the TCP lifetime to the expire value of the REGISTER by using the tcp_persistent_flag parameter of the registrar module.&lt;br /&gt;&lt;/p&gt;&lt;br /&gt;&lt;p class="vspace"&gt;Example of usage:&lt;br /&gt;&lt;/p&gt;&lt;br /&gt;&lt;div class="vspace"&gt;&lt;/div&gt;&lt;pre&gt;    tcp_connection_lifetime=3600&lt;br /&gt;&lt;/pre&gt;&lt;div class="vspace"&gt;&lt;/div&gt;&lt;h4&gt;&lt;a name="toc74" id="toc74"&gt;&lt;/a&gt;3.51&amp;nbsp;tcp_max_connections&lt;/h4&gt;&lt;br /&gt;&lt;p&gt;maximum number of tcp connections (if the number is exceeded no new tcp connections will be accepted). Default is defined in tcp_conn.h: #define DEFAULT_TCP_MAX_CONNECTIONS 2048&lt;br /&gt;&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;p class="vspace"&gt;Example of usage:&lt;br /&gt;&lt;/p&gt;&lt;br /&gt;&lt;div class="vspace"&gt;&lt;/div&gt;&lt;pre&gt;    tcp_max_connections=4096&lt;br /&gt;&lt;/pre&gt;&lt;div class="vspace"&gt;&lt;/div&gt;&lt;h4&gt;&lt;a name="toc75" id="toc75"&gt;&lt;/a&gt;3.52&amp;nbsp;tcp_poll_method&lt;/h4&gt;&lt;br /&gt;&lt;p&gt;poll method used (by default the best one for the current OS is selected). For available types see io_wait.c and poll_types.h: none, poll, epoll_lt, epoll_et, sigio_rt, select, kqueue, /dev/poll&lt;br /&gt;&lt;/p&gt;&lt;br /&gt;&lt;p class="vspace"&gt;Example of usage:&lt;br /&gt;&lt;/p&gt;&lt;br /&gt;&lt;div class="vspace"&gt;&lt;/div&gt;&lt;pre&gt;    tcp_poll_method=select&lt;br /&gt;&lt;/pre&gt;&lt;div class="vspace"&gt;&lt;/div&gt;&lt;h4&gt;&lt;a name="toc76" id="toc76"&gt;&lt;/a&gt;3.53&amp;nbsp;tls_ca_list&lt;/h4&gt;&lt;br /&gt;&lt;div class="vspace"&gt;&lt;/div&gt;&lt;h4&gt;&lt;a name="toc77" id="toc77"&gt;&lt;/a&gt;3.54&amp;nbsp;tls_certificate&lt;/h4&gt;&lt;br /&gt;&lt;br /&gt;&lt;div class="vspace"&gt;&lt;/div&gt;&lt;h4&gt;&lt;a name="toc78" id="toc78"&gt;&lt;/a&gt;3.55&amp;nbsp;tls_ciphers_list&lt;/h4&gt;&lt;br /&gt;&lt;div class="vspace"&gt;&lt;/div&gt;&lt;h4&gt;&lt;a name="toc79" id="toc79"&gt;&lt;/a&gt;3.56&amp;nbsp;tls_domain&lt;/h4&gt;&lt;br /&gt;&lt;div class="vspace"&gt;&lt;/div&gt;&lt;h4&gt;&lt;a name="toc80" id="toc80"&gt;&lt;/a&gt;3.57&amp;nbsp;tls_handshake_timeout&lt;/h4&gt;&lt;br /&gt;&lt;div class="vspace"&gt;&lt;/div&gt;&lt;h4&gt;&lt;a name="toc81" id="toc81"&gt;&lt;/a&gt;3.58&amp;nbsp;tls_log&lt;/h4&gt;&lt;br /&gt;&lt;div class="vspace"&gt;&lt;/div&gt;&lt;h4&gt;&lt;a name="toc82" id="toc82"&gt;&lt;/a&gt;3.59&amp;nbsp;tls_method&lt;/h4&gt;&lt;br /&gt;&lt;div class="vspace"&gt;&lt;/div&gt;&lt;h4&gt;&lt;a name="toc83" id="toc83"&gt;&lt;/a&gt;3.60&amp;nbsp;tls_port_no&lt;/h4&gt;&lt;br /&gt;&lt;br /&gt;&lt;div class="vspace"&gt;&lt;/div&gt;&lt;h4&gt;&lt;a name="toc84" id="toc84"&gt;&lt;/a&gt;3.61&amp;nbsp;tls_private_key&lt;/h4&gt;&lt;br /&gt;&lt;div class="vspace"&gt;&lt;/div&gt;&lt;h4&gt;&lt;a name="toc85" id="toc85"&gt;&lt;/a&gt;3.62&amp;nbsp;tls_require_certificate&lt;/h4&gt;&lt;br /&gt;&lt;div class="vspace"&gt;&lt;/div&gt;&lt;h4&gt;&lt;a name="toc86" id="toc86"&gt;&lt;/a&gt;3.63&amp;nbsp;tls_send_timeout&lt;/h4&gt;&lt;br /&gt;&lt;div class="vspace"&gt;&lt;/div&gt;&lt;h4&gt;&lt;a name="toc87" id="toc87"&gt;&lt;/a&gt;3.64&amp;nbsp;tls_verify&lt;/h4&gt;&lt;br /&gt;&lt;div class="vspace"&gt;&lt;/div&gt;&lt;h4&gt;&lt;a name="toc88" id="toc88"&gt;&lt;/a&gt;3.65&amp;nbsp;tos&lt;/h4&gt;&lt;br /&gt;&lt;p&gt;The TOS (Type Of Service) to be used for the sent IP packages (both TCP and UDP).&lt;br /&gt;&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;p class="vspace"&gt;Example of usage:&lt;br /&gt;&lt;/p&gt;&lt;br /&gt;&lt;div class="vspace"&gt;&lt;/div&gt;&lt;pre class="escaped"&gt;    tos=IPTOS_LOWDELAY&lt;br /&gt;    tos=0x10&lt;br /&gt;    tos=IPTOS_RELIABILITY&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;div class="vspace"&gt;&lt;/div&gt;&lt;h4&gt;&lt;a name="toc89" id="toc89"&gt;&lt;/a&gt;3.66&amp;nbsp;user uid&lt;/h4&gt;&lt;br /&gt;&lt;p&gt;The user id to run &lt;strong&gt;OpenSIPS&lt;/strong&gt; (OpenSIPS will suid to it).&lt;br /&gt;&lt;/p&gt;&lt;br /&gt;&lt;p class="vspace"&gt;Example of usage:&lt;br /&gt;&lt;/p&gt;&lt;br /&gt;&lt;div class="vspace"&gt;&lt;/div&gt;&lt;pre&gt;    user="opensips"&lt;br /&gt;&lt;br /&gt;&lt;/pre&gt;&lt;div class="vspace"&gt;&lt;/div&gt;&lt;h4&gt;&lt;a name="toc90" id="toc90"&gt;&lt;/a&gt;3.67&amp;nbsp;user_agent_header&lt;/h4&gt;&lt;br /&gt;&lt;p&gt;The body of User-Agent header field generated by &lt;strong&gt;OpenSIPS&lt;/strong&gt; when it sends a request as UAC.  It defaults to "OpenSIPS (&amp;lt;version&amp;gt; (&amp;lt;arch&amp;gt;/&amp;lt;os&amp;gt;))". &lt;br /&gt;&lt;/p&gt;&lt;br /&gt;&lt;p class="vspace"&gt;Example of usage:&lt;br /&gt;&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;div class="vspace"&gt;&lt;/div&gt;&lt;pre class="escaped"&gt;user_agent_header="User-Agent: My Company SIP Proxy"&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;p class="vspace"&gt;Please note that you have to include the header name "User-Agent:" as &lt;strong&gt;OpenSIPS&lt;/strong&gt; does not add it and you will get an erroneous header like:&lt;br /&gt;&lt;/p&gt;&lt;pre class="escaped"&gt;My Company SIP Proxy&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;div class="vspace"&gt;&lt;/div&gt;&lt;h4&gt;&lt;a name="toc91" id="toc91"&gt;&lt;/a&gt;3.68&amp;nbsp;wdir&lt;/h4&gt;&lt;br /&gt;&lt;p&gt;The working directory used by &lt;strong&gt;OpenSIPS&lt;/strong&gt; at runtime. You might find it usefull when come to generating core files :)&lt;br /&gt;&lt;/p&gt;&lt;br /&gt;&lt;p class="vspace"&gt;Example of usage:&lt;br /&gt;&lt;br /&gt;&lt;/p&gt;&lt;pre class="escaped"&gt;     wdir="/usr/local/opensips"&lt;br /&gt;     or&lt;br /&gt;     wdir=/usr/opensips_wd&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;p class="vspace"&gt;&lt;a href="#toc"&gt;↑ Contents&lt;/a&gt;&lt;br /&gt;&lt;/p&gt;&lt;br /&gt;&lt;div class="vspace"&gt;&lt;/div&gt;&lt;hr&gt;&lt;br /&gt;&lt;p&gt;&lt;a name="functions" id="functions"&gt;&lt;/a&gt;&lt;br /&gt;&lt;/p&gt;&lt;h3&gt;&lt;a name="toc92" id="toc92"&gt;&lt;/a&gt;4.&amp;nbsp;Core Functions&lt;/h3&gt;&lt;br /&gt;&lt;p&gt;Functions exported by core that can be used in route blocks.&lt;br /&gt;&lt;/p&gt;&lt;br /&gt;&lt;div class="vspace"&gt;&lt;/div&gt;&lt;h4&gt;&lt;a name="toc93" id="toc93"&gt;&lt;/a&gt;4.1&amp;nbsp;add_local_rport()&lt;/h4&gt;&lt;br /&gt;&lt;p&gt;Add 'rport' parameter to the Via header generated by server (see RFC3581 for its meaning). It affects only the current processed request.&lt;br /&gt;&lt;br /&gt;&lt;/p&gt;&lt;br /&gt;&lt;p class="vspace"&gt;Example of usage:&lt;br /&gt;&lt;/p&gt;&lt;br /&gt;&lt;div class="vspace"&gt;&lt;/div&gt;&lt;pre&gt;    add_local_rport()&lt;br /&gt;&lt;/pre&gt;&lt;div class="vspace"&gt;&lt;/div&gt;&lt;h4&gt;&lt;a name="toc94" id="toc94"&gt;&lt;/a&gt;4.2&amp;nbsp;append_branch()&lt;/h4&gt;&lt;br /&gt;&lt;p&gt;Similarly to t_fork_to, it extends destination set by a new entry. The difference is that current URI is taken as new entry. &lt;br /&gt;&lt;/p&gt;&lt;br /&gt;&lt;p class="vspace"&gt;Without parameter, the function copies the current URI into a new branch. Thus, leaving the main branch (the URI) for further manipulation.&lt;br /&gt;&lt;/p&gt;&lt;br /&gt;&lt;p class="vspace"&gt;With a parameter, the function copies the URI in the parameter into a new branch. Thus, the current URI is not manipulated.&lt;br /&gt;&lt;/p&gt;&lt;br /&gt;&lt;p class="vspace"&gt;Note that it's not possible to append a new branch in "on_failure_route" block if a 6XX response has been previously received (it would be against RFC 3261).&lt;br /&gt;&lt;/p&gt;&lt;br /&gt;&lt;p class="vspace"&gt;Example of usage:&lt;br /&gt;&lt;br /&gt;&lt;/p&gt;&lt;pre class="escaped"&gt;    # if someone calls B, the call should be forwarded to C too.&lt;br /&gt;    #&lt;br /&gt;    if (method=="INVITE" &amp;amp;&amp;amp; uri=~"sip:B@xx.xxx.xx ")&lt;br /&gt;    {&lt;br /&gt;        # copy the current branch (branches[0]) into&lt;br /&gt;        # a new branch (branches[1])&lt;br /&gt;        append_branch();&lt;br /&gt;        # all URI manipulation functions work on branches[0]&lt;br /&gt;        # thus, URI manipulation does not touch the &lt;br /&gt;        # appended branch (branches[1])&lt;br /&gt;        seturi("sip:C@domain");&lt;br /&gt;&lt;br /&gt;        # now: branch 0 = C@domain&lt;br /&gt;        #      branch 1 = B@xx.xx.xx.xx&lt;br /&gt;&lt;br /&gt;        # and if you need a third destination ...&lt;br /&gt;&lt;br /&gt;        # copy the current branch (branches[0]) into&lt;br /&gt;        # a new branch (branches[2])&lt;br /&gt;        append_branch();&lt;br /&gt;&lt;br /&gt;        # all URI manipulation functions work on branches[0]&lt;br /&gt;        # thus, URI manipulation does not touch the &lt;br /&gt;        # appended branch (branches[1-2])&lt;br /&gt;        seturi("sip:D@domain");&lt;br /&gt;&lt;br /&gt;        # now: branch 0 = D@domain&lt;br /&gt;        #      branch 1 = B@xx.xx.xx.xx&lt;br /&gt;        #      branch 2 = C@domain&lt;br /&gt;&lt;br /&gt;        t_relay();&lt;br /&gt;        exit;&lt;br /&gt;    };&lt;br /&gt;&lt;br /&gt;    # You could also use append_branch("sip:C@domain") which adds a branch with the new URI:&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;    if(method=="INVITE" &amp;amp;&amp;amp; uri=~"sip:B@xx.xxx.xx ") {&lt;br /&gt;        # append a new branch with the second destination&lt;br /&gt;        append_branch("sip:user@domain");&lt;br /&gt;        # now: branch 0 = B@xx.xx.xx.xx&lt;br /&gt;        # now: branch 1 = C@domain&lt;br /&gt;&lt;br /&gt;        t_relay();&lt;br /&gt;        exit;&lt;br /&gt;}&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;div class="vspace"&gt;&lt;/div&gt;&lt;h4&gt;&lt;a name="toc95" id="toc95"&gt;&lt;/a&gt;4.3&amp;nbsp;cache_store( storage_id, attribute_name, attribute_name [,timeout])&lt;/h4&gt;&lt;br /&gt;&lt;p&gt;This sets in a memory-cache-like-storage system a new value for an attribute. Both the attribute name and value may contain pseudo-variables. If the attribute does not already exist in the memcache, it will be inserted with the given value; if already present, its value will be replaced with the new one. The function may optionally take an extra parameter, a timeout (or lifetime) value for the attribute - after the lifetime is exceeded, the attribute is automatically purged from memcache.&lt;br /&gt;&lt;/p&gt;&lt;br /&gt;&lt;p class="vspace"&gt;As these functions (memcache) are just part of a generic memcache interface, you need to specify what memcache implementation you want  to use via this command -&amp;gt; the &lt;em&gt;storage_id&lt;/em&gt; points the memcache implementation. Currently there is only one available, "local", provided by the &lt;a class="urllink" href="http://www.opensips.org/html/docs/modules/devel/localcache.html" rel="nofollow"&gt;&lt;strong&gt;localcache&lt;/strong&gt; module&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;&lt;/p&gt;&lt;br /&gt;&lt;p class="vspace"&gt;Function returns true is the new attribute was successfully inserted.&lt;br /&gt;&lt;/p&gt;&lt;br /&gt;&lt;div class="vspace"&gt;&lt;/div&gt;&lt;pre class="escaped"&gt;cache_store("local","my_attr","$avp(i:55)",1200);&lt;br /&gt;cache_store("local","passwd_$tu","$var(x)");&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;p class="vspace"&gt;A more complex example can be found in the &lt;a class="wikilink" href="http://www.opensips.org/Resources/DocsTutMemcache"&gt;MemCache Tutorial&lt;/a&gt;.&lt;br /&gt;&lt;/p&gt;&lt;br /&gt;&lt;div class="vspace"&gt;&lt;/div&gt;&lt;h4&gt;&lt;a name="toc96" id="toc96"&gt;&lt;/a&gt;4.4&amp;nbsp;cache_remove( storage_id, attribute_name)&lt;/h4&gt;&lt;br /&gt;&lt;p&gt;This removes an attribute from a memory-cache-like-storage system. The attribute name may contain pseudo-variables.&lt;br /&gt;&lt;/p&gt;&lt;br /&gt;&lt;p class="vspace"&gt;As these functions (memcache) are just part of a generic memcache interface, you need to specify what memcache implementation you want  to use via this command -&amp;gt; the &lt;em&gt;storage_id&lt;/em&gt; points the memcache implementation. Currently there is only one available, "local", provided by the &lt;a class="urllink" href="http://www.opensips.org/html/docs/modules/devel/localcache.html" rel="nofollow"&gt;&lt;strong&gt;localcache&lt;/strong&gt; module&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;&lt;/p&gt;&lt;br /&gt;&lt;p class="vspace"&gt;Function returns false only if the &lt;em&gt;storage_id&lt;/em&gt; is invalid.&lt;br /&gt;&lt;/p&gt;&lt;br /&gt;&lt;div class="vspace"&gt;&lt;/div&gt;&lt;pre class="escaped"&gt;cache_remove("local","my_attr");&lt;br /&gt;cache_remove("local","passwd_$tu");&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;p class="vspace"&gt;A more complex example can be found in the &lt;a class="wikilink" href="http://www.opensips.org/Resources/DocsTutMemcache"&gt;MemCache Tutorial&lt;/a&gt;.&lt;br /&gt;&lt;/p&gt;&lt;br /&gt;&lt;div class="vspace"&gt;&lt;/div&gt;&lt;h4&gt;&lt;a name="toc97" id="toc97"&gt;&lt;/a&gt;4.5&amp;nbsp;cache_fetch( storage_id, attribute_name, result_avp)&lt;/h4&gt;&lt;br /&gt;&lt;p&gt;This function fetches from a memory-cache-like-storage system the value of an attribute. The attribute name may contain pseudo-variables. The result (if any) will be stored in the &lt;strong&gt;result_avp&lt;/strong&gt; &lt;a class="urllink" href="http://www.opensips.org/index.php?n=Resources.DocsCoreVar#toc2" rel="nofollow"&gt;AVP variable&lt;/a&gt;. &lt;br /&gt;&lt;br /&gt;&lt;/p&gt;&lt;br /&gt;&lt;p class="vspace"&gt;As these functions (memcache) are just part of a generic memcache interface, you need to specify what memcache implementation you want  to use via this command -&amp;gt; the &lt;em&gt;storage_id&lt;/em&gt; points the memcache implementation. Currently there is only one available, "local", provided by the &lt;a class="urllink" href="http://www.opensips.org/html/docs/modules/devel/localcache.html" rel="nofollow"&gt;&lt;strong&gt;localcache&lt;/strong&gt; module&lt;/a&gt;.&lt;br /&gt;&lt;/p&gt;&lt;br /&gt;&lt;p class="vspace"&gt;Function returns true if the attribute was found and its value returned.&lt;br /&gt;&lt;/p&gt;&lt;br /&gt;&lt;div class="vspace"&gt;&lt;/div&gt;&lt;pre class="escaped"&gt;cache_fetch("local","my_attr", $avp(i:11) );&lt;br /&gt;cache_fetch("local","passwd_$tu", $var(x) );&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;p class="vspace"&gt;A more complex example can be found in the &lt;a class="wikilink" href="http://www.opensips.org/Resources/DocsTutMemcache"&gt;MemCache Tutorial&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;&lt;/p&gt;&lt;br /&gt;&lt;div class="vspace"&gt;&lt;/div&gt;&lt;h4&gt;&lt;a name="toc98" id="toc98"&gt;&lt;/a&gt;4.6&amp;nbsp;break()&lt;/h4&gt;&lt;br /&gt;&lt;p&gt;Since v0.10.0-dev3, 'break' can no longer be used to stop the execution of a route. The only place to use is to end a 'case' block in a 'switch' statement. 'return' must be now used instead of old 'break'.&lt;br /&gt;&lt;/p&gt;&lt;br /&gt;&lt;p class="vspace"&gt;'return' and 'break' have now a similar meaning as in c/shell.&lt;br /&gt;&lt;/p&gt;&lt;br /&gt;&lt;div class="vspace"&gt;&lt;/div&gt;&lt;h4&gt;&lt;a name="toc99" id="toc99"&gt;&lt;/a&gt;4.7&amp;nbsp;construct_uri(proto,user,domain,port,extra,result_avp)&lt;/h4&gt;&lt;br /&gt;&lt;p&gt;The function builds a valid sip uri based on the arguments it receives. The result (if any) will be stored in the result_avp AVP variable.&lt;br /&gt;The function accepts plain text arguments, as well as $var and $avp variables. If you want to omit a part of the sip uri, just set the respective parameter to a blank string.&lt;br /&gt;&lt;/p&gt;&lt;br /&gt;&lt;p class="vspace"&gt;Example usage:&lt;br /&gt;&lt;/p&gt;&lt;pre class="escaped"&gt;construct_uri("$var(proto)", "vlad", "$var(domain)", "", "$var(params)",$avp(s:newuri));&lt;br /&gt;xlog("Constructed URI is &amp;lt;$avp(s:newuri)&amp;gt; \n");&lt;br /&gt;&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;div class="vspace"&gt;&lt;/div&gt;&lt;h4&gt;&lt;a name="toc100" id="toc100"&gt;&lt;/a&gt;4.8&amp;nbsp;drop()&lt;/h4&gt;&lt;br /&gt;&lt;p&gt;Stop the execution of the configuration script and alter the implicit action which is done afterwards.&lt;br /&gt;&lt;/p&gt;&lt;br /&gt;&lt;p class="vspace"&gt;If the function is called in a 'branch_route' then the branch is discarded (implicit action for 'branch_route' is to forward the request).&lt;br /&gt;&lt;/p&gt;&lt;br /&gt;&lt;p class="vspace"&gt;If the function is called in a 'onreply_route' then any provisional reply is discarded (implicit action for 'onreply_route' is to send the reply upstream according to Via header).&lt;br /&gt;&lt;/p&gt;&lt;br /&gt;&lt;p class="vspace"&gt;Example of usage:&lt;br /&gt;&lt;/p&gt;&lt;br /&gt;&lt;div class="vspace"&gt;&lt;/div&gt;&lt;pre&gt;    onreply_route {&lt;br /&gt;        if(status=="183") {&lt;br /&gt;            drop();&lt;br /&gt;        }&lt;br /&gt;    }&lt;br /&gt;&lt;/pre&gt;&lt;div class="vspace"&gt;&lt;/div&gt;&lt;h4&gt;&lt;a name="toc101" id="toc101"&gt;&lt;/a&gt;4.9&amp;nbsp;exit()&lt;/h4&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;Stop the execution of the configuration script -- it has the same behaviour as return(0). It does not affect the implicit action to be taken after script execution. &lt;br /&gt;&lt;/p&gt;&lt;br /&gt;&lt;div class="vspace"&gt;&lt;/div&gt;&lt;pre&gt;  route {&lt;br /&gt;    if (route(2)) {&lt;br /&gt;      xlog("L_NOTICE","method $rm is INVITE\n");&lt;br /&gt;    } else {&lt;br /&gt;      xlog("L_NOTICE","method is $rm\n");&lt;br /&gt;    };&lt;br /&gt;  }&lt;br /&gt;&lt;br /&gt;  route[2] {&lt;br /&gt;    if (is_method("INVITE")) {&lt;br /&gt;      return(1);&lt;br /&gt;    } else if (is_method("REGISTER")) {&lt;br /&gt;      return(-1);&lt;br /&gt;    } else if (is_method("MESSAGE")) {&lt;br /&gt;      sl_send_reply("403","IM not allowed");&lt;br /&gt;      exit;&lt;br /&gt;    };&lt;br /&gt;  }&lt;br /&gt;&lt;/pre&gt;&lt;div class="vspace"&gt;&lt;/div&gt;&lt;h4&gt;&lt;a name="toc102" id="toc102"&gt;&lt;/a&gt;4.10&amp;nbsp;force_rport()&lt;/h4&gt;&lt;br /&gt;&lt;p&gt;Force_rport() adds the rport parameter to the first Via header. Thus, &lt;strong&gt;OpenSIPS&lt;/strong&gt; will add the received IP port to the top most via header in the SIP message, even if the client does not indicate support for rport. This enables subsequent SIP messages to return to the proper port later on in a SIP transaction.&lt;br /&gt;&lt;/p&gt;&lt;br /&gt;&lt;p class="vspace"&gt;The rport parameter is defined in RFC 3581.&lt;br /&gt;&lt;/p&gt;&lt;br /&gt;&lt;p class="vspace"&gt;Example of usage:&lt;br /&gt;&lt;/p&gt;&lt;br /&gt;&lt;div class="vspace"&gt;&lt;/div&gt;&lt;pre&gt;    force_rport();&lt;br /&gt;&lt;br /&gt;&lt;/pre&gt;&lt;div class="vspace"&gt;&lt;/div&gt;&lt;h4&gt;&lt;a name="toc103" id="toc103"&gt;&lt;/a&gt;4.11&amp;nbsp;force_send_socket([proto:]address[:port])&lt;/h4&gt;&lt;br /&gt;&lt;p&gt;Force &lt;strong&gt;OpenSIPS&lt;/strong&gt; to send the message from the specified socket (it _must_ be one of the sockets &lt;strong&gt;OpenSIPS&lt;/strong&gt; listens on). If the protocol doesn't match (e.g. UDP message "forced" to a TCP socket) the closest socket of the same protocol is used.&lt;br /&gt;&lt;/p&gt;&lt;br /&gt;&lt;p class="vspace"&gt;Example of usage:&lt;br /&gt;&lt;/p&gt;&lt;br /&gt;&lt;div class="vspace"&gt;&lt;/div&gt;&lt;pre&gt;    force_send_socket(10.10.10.10:5060);&lt;br /&gt;&lt;/pre&gt;&lt;div class="vspace"&gt;&lt;/div&gt;&lt;h4&gt;&lt;a name="toc104" id="toc104"&gt;&lt;/a&gt;4.12&amp;nbsp;force_tcp_alias()&lt;/h4&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;force_tcp_alias(port)      &lt;br /&gt;&lt;/p&gt;&lt;br /&gt;&lt;p class="vspace"&gt;adds a tcp port alias for the current connection (if tcp).&lt;br /&gt;Usefull if you want to send all the trafic to port_alias through&lt;br /&gt;the same connection this request came from [it could help &lt;br /&gt;for firewall or nat traversal].&lt;br /&gt;With no parameters adds the port from the message via as the alias.&lt;br /&gt;When the "aliased" connection is closed (e.g. it's idle for too&lt;br /&gt;much time), all the port aliases are removed.&lt;br /&gt;&lt;/p&gt;&lt;br /&gt;&lt;div class="vspace"&gt;&lt;/div&gt;&lt;h4&gt;&lt;a name="toc105" id="toc105"&gt;&lt;/a&gt;4.13&amp;nbsp;forward(destination)&lt;/h4&gt;&lt;br /&gt;&lt;p&gt;Forward the SIP request to the given destination in stateless mode. This has the format of [proto:]host[:port]. Host can be an IP or hostname; supported protocols are UDP, TCP and TLS. (For TLS, you need to compile the TLS support into core).&lt;br /&gt;If proto or port are not specified, NAPTR and SRV lookups will be used to determine them (if possible).&lt;br /&gt;&lt;/p&gt;&lt;br /&gt;&lt;p class="vspace"&gt;If destination parameter is missing, the forward will be done based on RURI.&lt;br /&gt;&lt;/p&gt;&lt;br /&gt;&lt;p class="vspace"&gt;Example of usage:&lt;br /&gt;&lt;/p&gt;&lt;br /&gt;&lt;div class="vspace"&gt;&lt;/div&gt;&lt;pre&gt;    forward("10.0.0.10:5060");&lt;br /&gt;    #or&lt;br /&gt;    forward();&lt;br /&gt;&lt;/pre&gt;&lt;div class="vspace"&gt;&lt;/div&gt;&lt;h4&gt;&lt;a name="toc106" id="toc106"&gt;&lt;/a&gt;4.14&amp;nbsp;isdsturiset()&lt;/h4&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;Test if the dst_uri field (next hop address) is set.&lt;br /&gt;&lt;/p&gt;&lt;br /&gt;&lt;p class="vspace"&gt;Example of usage:&lt;br /&gt;&lt;/p&gt;&lt;br /&gt;&lt;div class="vspace"&gt;&lt;/div&gt;&lt;pre&gt;    if(isdsturiset()) {&lt;br /&gt;        log("dst_uri is set\n");&lt;br /&gt;    };&lt;br /&gt;&lt;/pre&gt;&lt;div class="vspace"&gt;&lt;/div&gt;&lt;h4&gt;&lt;a name="toc107" id="toc107"&gt;&lt;/a&gt;4.15&amp;nbsp;isflagset(int)&lt;/h4&gt;&lt;br /&gt;&lt;p&gt;Test if a flag is set for current processed message (if the flag value is 1). The value of the parameter can be in range of 0..31.&lt;br /&gt;&lt;/p&gt;&lt;br /&gt;&lt;p class="vspace"&gt;For more see &lt;a class="urllink" href="http://www.voice-system.ro/docs/ser-flags/" rel="nofollow"&gt;http://www.voice-system.ro/docs/ser-flags/&lt;/a&gt; or &lt;a class="wikilink" href="http://www.opensips.org/Resources/DocsCoreFlags"&gt;Flags Documentation&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;&lt;/p&gt;&lt;br /&gt;&lt;p class="vspace"&gt;Example of usage:&lt;br /&gt;&lt;/p&gt;&lt;br /&gt;&lt;div class="vspace"&gt;&lt;/div&gt;&lt;pre&gt;    if(isflagset(3)) {&lt;br /&gt;        log("flag 3 is set\n");&lt;br /&gt;    };&lt;br /&gt;&lt;/pre&gt;&lt;div class="vspace"&gt;&lt;/div&gt;&lt;h4&gt;&lt;a name="toc108" id="toc108"&gt;&lt;/a&gt;4.16&amp;nbsp;isbflagset([branch_idx,] flag_idx)&lt;/h4&gt;&lt;br /&gt;&lt;p&gt;Test if a flag is set for a specific branch (if the flag value is 1). The value of the "flag_idx" parameter can be in range of 0..31. "branch_idx" identify the branch for which the flags are tested - it must be a positiv number. Branch index 0 refers to the RURI branch. If this parameter is missing, 0 branch index is used as default.&lt;br /&gt;&lt;/p&gt;&lt;br /&gt;&lt;p class="vspace"&gt;For more about script flags, see &lt;a class="wikilink" href="http://www.opensips.org/Resources/DocsCoreFlags"&gt;Flags Documentation&lt;/a&gt;.&lt;br /&gt;&lt;/p&gt;&lt;br /&gt;&lt;p class="vspace"&gt;Example of usage:&lt;br /&gt;&lt;/p&gt;&lt;br /&gt;&lt;div class="vspace"&gt;&lt;/div&gt;&lt;pre&gt;    if(isbflagset(1,3)) {&lt;br /&gt;        log("flag 3 is set in branch 1\n");&lt;br /&gt;    };&lt;br /&gt;&lt;br /&gt;&lt;/pre&gt;&lt;div class="vspace"&gt;&lt;/div&gt;&lt;h4&gt;&lt;a name="toc109" id="toc109"&gt;&lt;/a&gt;4.17&amp;nbsp;issflagset(flag_idx)&lt;/h4&gt;&lt;br /&gt;&lt;p&gt;Test if a script flag is set (if the flag value is 1). The value of the "flag_idx" parameter can be in range of 0..31.&lt;br /&gt;&lt;/p&gt;&lt;br /&gt;&lt;p class="vspace"&gt;For more about script flags, see &lt;a class="wikilink" href="http://www.opensips.org/Resources/DocsCoreFlags"&gt;Flags Documentation&lt;/a&gt;.&lt;br /&gt;&lt;/p&gt;&lt;br /&gt;&lt;p class="vspace"&gt;Example of usage:&lt;br /&gt;&lt;/p&gt;&lt;br /&gt;&lt;div class="vspace"&gt;&lt;/div&gt;&lt;pre&gt;    if(issflagset(2)) {&lt;br /&gt;        log("script flag 2 is set\n");&lt;br /&gt;    };&lt;br /&gt;&lt;/pre&gt;&lt;div class="vspace"&gt;&lt;/div&gt;&lt;h4&gt;&lt;a name="toc110" id="toc110"&gt;&lt;/a&gt;4.18&amp;nbsp;log([level,] string)&lt;/h4&gt;&lt;br /&gt;&lt;p&gt;Write text message to standard error terminal or syslog. You can specify the log level as first parameter.&lt;br /&gt;&lt;br /&gt;&lt;/p&gt;&lt;br /&gt;&lt;p class="vspace"&gt;For more see: &lt;a class="urllink" href="http://www.voice-system.ro/docs/ser-syslog/" rel="nofollow"&gt;http://www.voice-system.ro/docs/ser-syslog/&lt;/a&gt;&lt;br /&gt;&lt;/p&gt;&lt;br /&gt;&lt;p class="vspace"&gt;Example of usage:&lt;br /&gt;&lt;/p&gt;&lt;br /&gt;&lt;div class="vspace"&gt;&lt;/div&gt;&lt;pre&gt;    log("just some text message\n");&lt;br /&gt;&lt;/pre&gt;&lt;div class="vspace"&gt;&lt;/div&gt;&lt;h4&gt;&lt;a name="toc111" id="toc111"&gt;&lt;/a&gt;4.19&amp;nbsp;next_branches()&lt;/h4&gt;&lt;br /&gt;&lt;p&gt;Adds to the request a new destination set that includes all highest priority class contacts ('q' value based) from the serialized branches (see serialize_branches()). If called from a route block, it rewrites the request uri with first contact and adds the remaining contacts as parallel branches.  If called from failure route block, adds all contacts as parallel branches.  All used&lt;br /&gt;contacts are removes the serialized branches.&lt;br /&gt;&lt;/p&gt;&lt;br /&gt;&lt;p class="vspace"&gt;Returns true if at least one contact was added for the request's destination set - returns 1 if other branches are still pending and return 2 if no other branches are left for future processing - shortly, if 2: this is the last branch, if 1: other will follow. False is return is nothing was done (no more serialized branches).&lt;br /&gt;&lt;/p&gt;&lt;br /&gt;&lt;p class="vspace"&gt;Example of usage:&lt;br /&gt;&lt;br /&gt;&lt;/p&gt;&lt;br /&gt;&lt;div class="vspace"&gt;&lt;/div&gt;&lt;pre&gt;    next_branches();&lt;br /&gt;&lt;/pre&gt;&lt;div class="vspace"&gt;&lt;/div&gt;&lt;h4&gt;&lt;a name="toc112" id="toc112"&gt;&lt;/a&gt;4.20&amp;nbsp;prefix(string)&lt;/h4&gt;&lt;br /&gt;&lt;p&gt;Add the string parameter in front of username in R-URI.&lt;br /&gt;&lt;/p&gt;&lt;br /&gt;&lt;p class="vspace"&gt;Example of usage:&lt;br /&gt;&lt;/p&gt;&lt;br /&gt;&lt;div class="vspace"&gt;&lt;/div&gt;&lt;pre&gt;    prefix("00");&lt;br /&gt;&lt;/pre&gt;&lt;div class="vspace"&gt;&lt;/div&gt;&lt;h4&gt;&lt;a name="toc113" id="toc113"&gt;&lt;/a&gt;4.21&amp;nbsp;pv_printf(pv, string)&lt;/h4&gt;&lt;br /&gt;&lt;p&gt;Prints the formatted 'string' in the AVP 'pv'. The 'string' parameter can include any pseudo-variable defined in &lt;strong&gt;OpenSIPS&lt;/strong&gt;. The 'pv' can be any writable pseudo-variable -- e.g.,: AVPs, VARs, $ru, $rU, $rd, $du, $br, $fs.&lt;br /&gt;&lt;br /&gt;&lt;/p&gt;&lt;br /&gt;&lt;p class="vspace"&gt;It was extended from the avp_printf(...) function exported in previous versions by the avpops module. Starting with 1.3.0, avp_printf(...) is just an alias to pv_printf(...).&lt;br /&gt;&lt;/p&gt;&lt;br /&gt;&lt;p class="vspace"&gt;Example of usage:&lt;br /&gt;&lt;/p&gt;&lt;br /&gt;&lt;div class="vspace"&gt;&lt;/div&gt;&lt;pre&gt;    pv_printf("$var(x)", "r-uri: $ru");&lt;br /&gt;    pv_printf("$avp(i:3)", "from uri: $fu");&lt;br /&gt;&lt;/pre&gt;&lt;div class="vspace"&gt;&lt;/div&gt;&lt;h4&gt;&lt;a name="toc114" id="toc114"&gt;&lt;/a&gt;4.22&amp;nbsp;return(int)&lt;/h4&gt;&lt;br /&gt;&lt;p&gt;The return() function allows you to return any integer value from a called route() block.&lt;br /&gt;You can test the value returned by a route using "$retcode" variable.&lt;br /&gt;&lt;/p&gt;&lt;br /&gt;&lt;p class="vspace"&gt;return(0) is same as "exit()";&lt;br /&gt;&lt;/p&gt;&lt;br /&gt;&lt;p class="vspace"&gt;In bool expressions:&lt;br /&gt;&lt;/p&gt;&lt;br /&gt;&lt;div class="vspace"&gt;&lt;/div&gt;&lt;pre&gt;  * Negative and ZERO is FALSE&lt;br /&gt;  * Positive is TRUE&lt;br /&gt;&lt;br /&gt;&lt;/pre&gt;&lt;p class="vspace"&gt;Example usage: &lt;br /&gt;&lt;/p&gt;&lt;br /&gt;&lt;div class="vspace"&gt;&lt;/div&gt;&lt;pre class="escaped"&gt;route {&lt;br /&gt;  if (route(2)) {&lt;br /&gt;    xlog("L_NOTICE","method $rm is INVITE\n");&lt;br /&gt;  } else {&lt;br /&gt;    xlog("L_NOTICE","method $rm is REGISTER\n");&lt;br /&gt;  };&lt;br /&gt;}&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;pre class="escaped"&gt;route[2] {&lt;br /&gt;  if (is_method("INVITE")) {&lt;br /&gt;    return(1);&lt;br /&gt;  } else if (is_method("REGISTER")) {&lt;br /&gt;    return(-1);&lt;br /&gt;  } else {&lt;br /&gt;    return(0);&lt;br /&gt;  };&lt;br /&gt;}&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;div class="vspace"&gt;&lt;/div&gt;&lt;h4&gt;&lt;a name="toc115" id="toc115"&gt;&lt;/a&gt;4.23&amp;nbsp;resetdsturi()&lt;/h4&gt;&lt;br /&gt;&lt;p&gt;Set the value of dst_uri filed to NULL. dst_uri field is usually set after loose_route() or lookup("location") if the contact address is behind a NAT.&lt;br /&gt;&lt;/p&gt;&lt;br /&gt;&lt;p class="vspace"&gt;Example of usage:&lt;br /&gt;&lt;/p&gt;&lt;br /&gt;&lt;div class="vspace"&gt;&lt;/div&gt;&lt;pre&gt;    resetdsturi();&lt;br /&gt;&lt;/pre&gt;&lt;div class="vspace"&gt;&lt;/div&gt;&lt;h4&gt;&lt;a name="toc116" id="toc116"&gt;&lt;/a&gt;4.24&amp;nbsp;resetflag(int)&lt;/h4&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;Reset a flag for current processed message (set the value to 0). The value of the parameter can be in range of 0..31.&lt;br /&gt;&lt;/p&gt;&lt;br /&gt;&lt;p class="vspace"&gt;For more see &lt;a class="urllink" href="http://www.voice-system.ro/docs/ser-flags/" rel="nofollow"&gt;http://www.voice-system.ro/docs/ser-flags/&lt;/a&gt; or &lt;a class="wikilink" href="http://www.opensips.org/Resources/DocsCoreFlags"&gt;Flags Documentation&lt;/a&gt;.&lt;br /&gt;&lt;/p&gt;&lt;br /&gt;&lt;p class="vspace"&gt;Example of usage:&lt;br /&gt;&lt;/p&gt;&lt;br /&gt;&lt;div class="vspace"&gt;&lt;/div&gt;&lt;pre&gt;    resetflag(3);&lt;br /&gt;&lt;/pre&gt;&lt;div class="vspace"&gt;&lt;/div&gt;&lt;h4&gt;&lt;a name="toc117" id="toc117"&gt;&lt;/a&gt;4.25&amp;nbsp;resetbflag([branch_idx,] flag_idx)&lt;/h4&gt;&lt;br /&gt;&lt;p&gt;Reset a flag for a specific branch (set flag to value 0). The value of the "flag_idx" parameter can be in range of 0..31. "branch_idx" identify the branch for which the flag is reset - it must be a positiv number. Branch index 0 refers to the RURI branch. If this parameter is missing, 0 branch index is used as default.&lt;br /&gt;&lt;br /&gt;&lt;/p&gt;&lt;br /&gt;&lt;p class="vspace"&gt;For more about script flags, see &lt;a class="wikilink" href="http://www.opensips.org/Resources/DocsCoreFlags"&gt;Flags Documentation&lt;/a&gt;.&lt;br /&gt;&lt;/p&gt;&lt;br /&gt;&lt;p class="vspace"&gt;Example of usage:&lt;br /&gt;&lt;/p&gt;&lt;pre class="escaped"&gt;    resetbflag(1,3);&lt;br /&gt;    # or&lt;br /&gt;    resetbflag(3); # same with resetbflag(0,3)&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;div class="vspace"&gt;&lt;/div&gt;&lt;h4&gt;&lt;a name="toc118" id="toc118"&gt;&lt;/a&gt;4.26&amp;nbsp;resetsflag(flag_idx)&lt;/h4&gt;&lt;br /&gt;&lt;p&gt;Reset a script flag (set flag to value 0). The value of the "flag_idx" parameter can be in range of 0..31.&lt;br /&gt;&lt;/p&gt;&lt;br /&gt;&lt;p class="vspace"&gt;For more about script flags, see &lt;a class="wikilink" href="http://www.opensips.org/Resources/DocsCoreFlags"&gt;Flags Documentation&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;&lt;/p&gt;&lt;br /&gt;&lt;p class="vspace"&gt;Example of usage:&lt;br /&gt;&lt;/p&gt;&lt;br /&gt;&lt;div class="vspace"&gt;&lt;/div&gt;&lt;pre&gt;    resetsflag(2);&lt;br /&gt;&lt;/pre&gt;&lt;div class="vspace"&gt;&lt;/div&gt;&lt;h4&gt;&lt;a name="toc119" id="toc119"&gt;&lt;/a&gt;4.27&amp;nbsp;revert_uri()&lt;/h4&gt;&lt;br /&gt;&lt;p&gt;Set the R-URI to the value of the R-URI as it was when the request was received by server (undo all changes of R-URI).&lt;br /&gt;&lt;/p&gt;&lt;br /&gt;&lt;p class="vspace"&gt;Example of usage:&lt;br /&gt;&lt;/p&gt;&lt;br /&gt;&lt;div class="vspace"&gt;&lt;/div&gt;&lt;pre&gt;    revert_uri();&lt;br /&gt;&lt;/pre&gt;&lt;div class="vspace"&gt;&lt;/div&gt;&lt;h4&gt;&lt;a name="toc120" id="toc120"&gt;&lt;/a&gt;4.28&amp;nbsp;rewritehost() / sethost()&lt;/h4&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;Rewrite the domain part of the R-URI with the value of function's parameter. Other parts of the R-URI like username, port and URI parameters remain unchanged.&lt;br /&gt;&lt;/p&gt;&lt;br /&gt;&lt;p class="vspace"&gt;Example of usage:&lt;br /&gt;&lt;/p&gt;&lt;br /&gt;&lt;div class="vspace"&gt;&lt;/div&gt;&lt;pre&gt;    rewritehost("1.2.3.4");&lt;br /&gt;&lt;/pre&gt;&lt;div class="vspace"&gt;&lt;/div&gt;&lt;h4&gt;&lt;a name="toc121" id="toc121"&gt;&lt;/a&gt;4.29&amp;nbsp;rewritehostport() / sethostport()&lt;/h4&gt;&lt;br /&gt;&lt;p&gt;Rewrite the domain part and port of the R-URI with the value of function's parameter. Other parts of the R-URI like username and URI parameters remain unchanged.&lt;br /&gt;&lt;/p&gt;&lt;br /&gt;&lt;p class="vspace"&gt;Example of usage:&lt;br /&gt;&lt;/p&gt;&lt;br /&gt;&lt;div class="vspace"&gt;&lt;/div&gt;&lt;pre&gt;    rewritehostport("1.2.3.4:5080");&lt;br /&gt;&lt;/pre&gt;&lt;div class="vspace"&gt;&lt;/div&gt;&lt;h4&gt;&lt;a name="toc122" id="toc122"&gt;&lt;/a&gt;4.30&amp;nbsp;rewriteuser(string) / setuser(string)&lt;/h4&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;Rewrite the user part of the R-URI with the value of function's parameter.&lt;br /&gt;&lt;/p&gt;&lt;br /&gt;&lt;p class="vspace"&gt;Example of usage:&lt;br /&gt;&lt;/p&gt;&lt;br /&gt;&lt;div class="vspace"&gt;&lt;/div&gt;&lt;pre&gt;    rewriteuser("newuser");&lt;br /&gt;&lt;/pre&gt;&lt;div class="vspace"&gt;&lt;/div&gt;&lt;h4&gt;&lt;a name="toc123" id="toc123"&gt;&lt;/a&gt;4.31&amp;nbsp;rewriteuserpass() / setuserpass()&lt;/h4&gt;&lt;br /&gt;&lt;p&gt;Rewrite the password part of the R-URI with the value of function's parameter.&lt;br /&gt;&lt;/p&gt;&lt;br /&gt;&lt;p class="vspace"&gt;Example of usage:&lt;br /&gt;&lt;/p&gt;&lt;br /&gt;&lt;div class="vspace"&gt;&lt;/div&gt;&lt;pre&gt;    rewriteuserpass("my_secret_passwd");&lt;br /&gt;&lt;/pre&gt;&lt;div class="vspace"&gt;&lt;/div&gt;&lt;h4&gt;&lt;a name="toc124" id="toc124"&gt;&lt;/a&gt;4.32&amp;nbsp;rewriteport() / setport()&lt;/h4&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;Rewrites/sets the port part of the R-URI with the value of function's parameter.&lt;br /&gt;&lt;/p&gt;&lt;br /&gt;&lt;p class="vspace"&gt;Example of usage:&lt;br /&gt;&lt;/p&gt;&lt;br /&gt;&lt;div class="vspace"&gt;&lt;/div&gt;&lt;pre&gt;    rewriteport("5070");&lt;br /&gt;&lt;/pre&gt;&lt;div class="vspace"&gt;&lt;/div&gt;&lt;h4&gt;&lt;a name="toc125" id="toc125"&gt;&lt;/a&gt;4.33&amp;nbsp;rewriteuri(str) / seturi(str)&lt;/h4&gt;&lt;br /&gt;&lt;p&gt;Rewrite the request URI.&lt;br /&gt;&lt;/p&gt;&lt;br /&gt;&lt;p class="vspace"&gt;Example of usage:&lt;br /&gt;&lt;/p&gt;&lt;br /&gt;&lt;div class="vspace"&gt;&lt;/div&gt;&lt;pre&gt;    rewriteuri("sip:test@opensips.org");&lt;br /&gt;&lt;/pre&gt;&lt;div class="vspace"&gt;&lt;/div&gt;&lt;h4&gt;&lt;a name="toc126" id="toc126"&gt;&lt;/a&gt;4.34&amp;nbsp;send(destination)&lt;/h4&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;Send the original SIP message to a specific destination in stateless mode. This is definied as [proto:]host[:port]. No changes are applied to received message, no Via header is added. Host can be an IP or hostname; supported protocols are UDP, TCP and TLS. (For TLS, you need to compile the TLS support into core). If proto or port are not specified, NAPTR and SRV lookups will be used to determine them (if possible).&lt;br /&gt;&lt;/p&gt;&lt;br /&gt;&lt;p class="vspace"&gt;Parameter is mandatory and has string format.&lt;br /&gt;&lt;/p&gt;&lt;br /&gt;&lt;p class="vspace"&gt;Example of usage:&lt;br /&gt;&lt;/p&gt;&lt;br /&gt;&lt;div class="vspace"&gt;&lt;/div&gt;&lt;pre&gt;   send("udp:10.10.10.10:5070");&lt;br /&gt;&lt;/pre&gt;&lt;div class="vspace"&gt;&lt;/div&gt;&lt;h4&gt;&lt;a name="toc127" id="toc127"&gt;&lt;/a&gt;4.35&amp;nbsp;serialize_branches(clear)&lt;/h4&gt;&lt;br /&gt;&lt;p&gt;Takes all the branches added for parallel forking (with append_branch() and including the current RURI) and prepare them for serial forking. The ordering is done in increasing "q" order. The serialized branches are internally stored in AVPs - you will be able to fetch and use via the "next_branches()" function.&lt;br&gt;NOTE that (according to RFC3261), the branches with the same "q" value will still be parallel forked during a certain step in the serial forking (it will result a combination of serial with parallel forking).&lt;br&gt;NOTE that this function is not changing RURI in the messages - it is just converting from parallel to serial branches (preparing branches).&lt;br /&gt;&lt;/p&gt;&lt;br /&gt;&lt;p class="vspace"&gt;If "clear" is set to non-zero, all previous results of another "serialize_branches" (serialized branches which were not yet used) will be deleted before setting the new serialized branches.&lt;br /&gt;&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;p class="vspace"&gt;Example of usage:&lt;br /&gt;&lt;/p&gt;&lt;br /&gt;&lt;div class="vspace"&gt;&lt;/div&gt;&lt;pre&gt;   serialize_branches(1);&lt;br /&gt;&lt;/pre&gt;&lt;div class="vspace"&gt;&lt;/div&gt;&lt;h4&gt;&lt;a name="toc128" id="toc128"&gt;&lt;/a&gt;4.36&amp;nbsp;set_advertised_address(ip|string)&lt;/h4&gt;&lt;br /&gt;&lt;p&gt;Same as 'advertised_address' but it affects only the current message. It has priority if 'advertised_address' is also set.&lt;br /&gt;&lt;/p&gt;&lt;br /&gt;&lt;p class="vspace"&gt;Example of usage:&lt;br /&gt;&lt;/p&gt;&lt;br /&gt;&lt;div class="vspace"&gt;&lt;/div&gt;&lt;pre&gt;    set_advertised_address("opensips.org");&lt;br /&gt;&lt;/pre&gt;&lt;div class="vspace"&gt;&lt;/div&gt;&lt;h4&gt;&lt;a name="toc129" id="toc129"&gt;&lt;/a&gt;4.37&amp;nbsp;set_advertised_port(int)&lt;/h4&gt;&lt;br /&gt;&lt;p&gt;Same as 'advertised_port' but it affects only the current message. It has priority over 'advertised_port'.&lt;br /&gt;&lt;br /&gt;&lt;/p&gt;&lt;br /&gt;&lt;p class="vspace"&gt;Example of usage:&lt;br /&gt;&lt;/p&gt;&lt;br /&gt;&lt;div class="vspace"&gt;&lt;/div&gt;&lt;pre&gt;    set_advertised_port(5080);&lt;br /&gt;&lt;/pre&gt;&lt;div class="vspace"&gt;&lt;/div&gt;&lt;h4&gt;&lt;a name="toc130" id="toc130"&gt;&lt;/a&gt;4.38&amp;nbsp;setdebug([level])&lt;/h4&gt;&lt;br /&gt;&lt;p&gt;Changes the debug level of the current process from script. If called without the parameter then the debug level of the current process will be reset to the global level. If the debug level of the current process is changed then changing the global debug level (using MI function) does not affect it, so be careful and make sure to reset the process debug level when you are done. This function is very helpful if you are tracing and debugging only a specific piece of code. &lt;br /&gt;&lt;/p&gt;&lt;br /&gt;&lt;p class="vspace"&gt;Example of usage:&lt;br /&gt;&lt;/p&gt;&lt;br /&gt;&lt;div class="vspace"&gt;&lt;/div&gt;&lt;pre&gt;    debug= -1 # errors only&lt;br /&gt;    .....&lt;br /&gt;    {&lt;br /&gt;      ......&lt;br /&gt;      setdebug(4); # set the debug level of the current process to DBG&lt;br /&gt;      uac_replace_from(....);&lt;br /&gt;      setdebug(); # reset the debug level of the current process to the global level&lt;br /&gt;      .......&lt;br /&gt;    }&lt;br /&gt;&lt;/pre&gt;&lt;div class="vspace"&gt;&lt;/div&gt;&lt;h4&gt;&lt;a name="toc131" id="toc131"&gt;&lt;/a&gt;4.39&amp;nbsp;setdsturi(string)&lt;/h4&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;Explicitely set the dst_uri field to the value of the paramater. The parameter has to be a valid SIP URI.&lt;br /&gt;&lt;/p&gt;&lt;br /&gt;&lt;p class="vspace"&gt;Example of usage:&lt;br /&gt;&lt;/p&gt;&lt;br /&gt;&lt;div class="vspace"&gt;&lt;/div&gt;&lt;pre&gt;    setdsturi("sip:10.10.10.10:5090");&lt;br /&gt;&lt;/pre&gt;&lt;div class="vspace"&gt;&lt;/div&gt;&lt;h4&gt;&lt;a name="toc132" id="toc132"&gt;&lt;/a&gt;4.40&amp;nbsp;setflag(int)&lt;/h4&gt;&lt;br /&gt;&lt;p&gt;Set a flag for current processed message. The value of the parameter can be in range of 0..31. The flags are used to mark the message for special processing (e.g., accounting) or to keep some state (e.g., message authenticated).&lt;br /&gt;&lt;/p&gt;&lt;br /&gt;&lt;p class="vspace"&gt;For more see &lt;a class="urllink" href="http://www.voice-system.ro/docs/ser-flags/" rel="nofollow"&gt;http://www.voice-system.ro/docs/ser-flags/&lt;/a&gt; .&lt;br /&gt;&lt;/p&gt;&lt;br /&gt;&lt;p class="vspace"&gt;Example of usage:&lt;br /&gt;&lt;br /&gt;&lt;/p&gt;&lt;br /&gt;&lt;div class="vspace"&gt;&lt;/div&gt;&lt;pre&gt;    setflag(3);&lt;br /&gt;&lt;/pre&gt;&lt;div class="vspace"&gt;&lt;/div&gt;&lt;h4&gt;&lt;a name="toc133" id="toc133"&gt;&lt;/a&gt;4.41&amp;nbsp;setbflag([branch_idx,] flag_idx)&lt;/h4&gt;&lt;br /&gt;&lt;p&gt;Set a flag for a specific branch (set flag to value 1). The value of the "flag_idx" parameter can be in range of 0..31. "branch_idx" identify the branch for which the flag is set - it must be a positiv number. Branch index 0 refers to the RURI branch. If this parameter is missing, 0 branch index is used as default.&lt;br /&gt;&lt;/p&gt;&lt;br /&gt;&lt;p class="vspace"&gt;For more about script flags, see &lt;a class="wikilink" href="http://www.opensips.org/Resources/DocsCoreFlags"&gt;Flags Documentation&lt;/a&gt;.&lt;br /&gt;&lt;/p&gt;&lt;br /&gt;&lt;p class="vspace"&gt;Example of usage:&lt;br /&gt;&lt;/p&gt;&lt;br /&gt;&lt;div class="vspace"&gt;&lt;/div&gt;&lt;pre&gt;    setbflag(1,3);&lt;br /&gt;    # or&lt;br /&gt;    setbflag(3); # same with setbflag(0,3)&lt;br /&gt;&lt;/pre&gt;&lt;div class="vspace"&gt;&lt;/div&gt;&lt;h4&gt;&lt;a name="toc134" id="toc134"&gt;&lt;/a&gt;4.42&amp;nbsp;setsflag(flag_idx)&lt;/h4&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;Set a script flag (set flag to value 0). The value of the "flag_idx" parameter can be in range of 0..31.&lt;br /&gt;&lt;/p&gt;&lt;br /&gt;&lt;p class="vspace"&gt;For more about script flags, see &lt;a class="wikilink" href="http://www.opensips.org/Resources/DocsCoreFlags"&gt;Flags Documentation&lt;/a&gt;.&lt;br /&gt;&lt;/p&gt;&lt;br /&gt;&lt;p class="vspace"&gt;Example of usage:&lt;br /&gt;&lt;/p&gt;&lt;br /&gt;&lt;div class="vspace"&gt;&lt;/div&gt;&lt;pre&gt;    setsflag(2);&lt;br /&gt;&lt;/pre&gt;&lt;div class="vspace"&gt;&lt;/div&gt;&lt;h4&gt;&lt;a name="toc135" id="toc135"&gt;&lt;/a&gt;4.43&amp;nbsp;strip(int)&lt;/h4&gt;&lt;br /&gt;&lt;p&gt;Strip the first N-th characters from username of R-URI (N is the value of the parameter).&lt;br /&gt;&lt;/p&gt;&lt;br /&gt;&lt;p class="vspace"&gt;Example of usage:&lt;br /&gt;&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;div class="vspace"&gt;&lt;/div&gt;&lt;pre&gt;    strip(3);&lt;br /&gt;&lt;/pre&gt;&lt;div class="vspace"&gt;&lt;/div&gt;&lt;h4&gt;&lt;a name="toc136" id="toc136"&gt;&lt;/a&gt;4.44&amp;nbsp;strip_tail(int)&lt;/h4&gt;&lt;br /&gt;&lt;p&gt;Strip the last N-th characters from username of R-URI (N is the value of the parameter).&lt;br /&gt;&lt;/p&gt;&lt;br /&gt;&lt;p class="vspace"&gt;Example of usage:&lt;br /&gt;&lt;/p&gt;&lt;br /&gt;&lt;div class="vspace"&gt;&lt;/div&gt;&lt;pre&gt;  strip_tail(3);&lt;br /&gt;&lt;/pre&gt;&lt;div class="blogger-post-footer"&gt;akdayal@yahoo.com&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1818419888217740295-1297982356628980263?l=ananddayal.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ananddayal.blogspot.com/feeds/1297982356628980263/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1818419888217740295&amp;postID=1297982356628980263' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1818419888217740295/posts/default/1297982356628980263'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1818419888217740295/posts/default/1297982356628980263'/><link rel='alternate' type='text/html' href='http://ananddayal.blogspot.com/2010/11/opensips-core-functions-and-parameters.html' title='OpenSIPs Core functions and parameters'/><author><name>Anand Kumar Dayal</name><uri>http://www.blogger.com/profile/15821949256334333875</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://bp2.blogger.com/_X_AIQvaR6X4/SJGDCYgSLAI/AAAAAAAADcI/tod2zTuEQCw/S220/PIC-AD-257(2).jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1818419888217740295.post-6582236078661556819</id><published>2010-11-11T06:10:00.000-08:00</published><updated>2010-11-11T06:14:51.695-08:00</updated><title type='text'>SIP Load Balancing (SLB) using Opensips</title><content type='html'>&lt;h3&gt;1.  Load Balancing in &lt;strong&gt;OpenSIPS&lt;/strong&gt;&lt;/h3&gt; &lt;p&gt;The "load-balancing" module comes to provide traffic routing based on load. Shortly, when &lt;strong&gt;OpenSIPS&lt;/strong&gt;  routes calls to a set of destinations, it is able to keep the load  status (as number of ongoing calls) of each destination and to choose to  route to the less loaded destination (at that moment). &lt;strong&gt;OpenSIPS&lt;/strong&gt; is aware of the capacity of each destination -  it is preconfigured with the maximum load accepted by the destinations.  To be more precise, when routing, &lt;strong&gt;OpenSIPS&lt;/strong&gt; will  consider the less loaded destination not the destination with the  smallest number of ongoing calls, but the destination with the largest  available slot. &lt;/p&gt; &lt;p class="vspace"&gt;Also, the "load-balancing" (LB) module is able to  receive feedback from the destinations (if they are capable of). This  mechanism is used for notifying &lt;strong&gt;OpenSIPS&lt;/strong&gt; when the maximum capacity of a destination changed (like a GW with more or less E1 cards). &lt;/p&gt; &lt;p class="vspace"&gt;The "load-balancing" functionality comes to enhance  the "dispatcher" one. The difference comes in having or not load  information about the destinations where you are routing to: &lt;/p&gt; &lt;ul&gt;&lt;li&gt;&lt;strong&gt;Dispatcher has no load information&lt;/strong&gt;  - it just blindly forwards calls to the destinations based on a  probabilistic dispersion logic. It gets no feedback about the load of  the destination (like how many calls that were sent actually were  established or how many are still going). &lt;/li&gt;&lt;li&gt;&lt;strong&gt;Load-balancer is load driven&lt;/strong&gt;  - LB routing logic is based primary on the load information. The LB  module is using the DIALOG module in order to keep trace of the load  (ongoing calls). &lt;/li&gt;&lt;/ul&gt;&lt;br /&gt;&lt;h3&gt;2.  Load Balancing - how it works&lt;/h3&gt; &lt;p&gt;When looking at the LB implementation in &lt;strong&gt;OpenSIPS&lt;/strong&gt;, we have 3 aspects: &lt;/p&gt; &lt;h4&gt;&lt;a name="toc3" id="toc3"&gt;&lt;/a&gt;2.1  Destination set&lt;/h4&gt; &lt;p&gt;A destination is defined by its address (a SIP URI) and its description as capacity. &lt;/p&gt; &lt;p class="vspace"&gt;Form the LB module perspective, the &lt;strong&gt;destinations are not homogeneous&lt;/strong&gt; - they are not alike; and not only from capacity point of view, but also from what kind of &lt;strong&gt;services/resources&lt;/strong&gt;  they offer. For example, you may have a set of Yate/Asterisk boxes for  media-related services -some of them are doing transcoding, other  voicemail or conference,  other simple announcement , other PSTN  termination. But you may have mixed boxes - one box may do PSTN and  voicemail in the same time. So each destination from the set may offer a  different set of services/resources. &lt;/p&gt; &lt;p class="vspace"&gt;So, for each destination, the LB module defines the offered resources, and for each resource, it defines the &lt;strong&gt;capacity / maximum load&lt;/strong&gt; as number of concurrent calls the destination can handle for that resource. &lt;/p&gt; &lt;p class="vspace"&gt;Example: &lt;/p&gt;&lt;pre class="escaped"&gt;4 destinations/boxes in the LB set&lt;br /&gt;  1) offers 30 channels for transcoding and 32 for PSTN&lt;br /&gt;  2) offers 100 voicemail channels and 10 for transcoding&lt;br /&gt;  3) offers 50 voicemail channels and 300 for conference&lt;br /&gt;  4) offers 10 voicemail, 10 conference, 10 transcoding and 32 PSTN&lt;br /&gt;&lt;br /&gt;This translated into the following setup:&lt;br /&gt;&lt;br /&gt;+----+----------+------------------------+---------------------------------+&lt;br /&gt;| id | group_id | dst_uri                | resources                       |&lt;br /&gt;+----+----------+------------------------+---------------------------------+&lt;br /&gt;|  1 |        1 | sip:yate1.mycluset.net | transc=30; pstn=32              |&lt;br /&gt;|  2 |        1 | sip:yate2.mycluset.net | vm=100; transc=10               |&lt;br /&gt;|  3 |        1 | sip:yate3.mycluset.net | vm=50; conf=300                 |&lt;br /&gt;|  4 |        1 | sip:yate4.mycluset.net | vm=10;conf=10;transc=10;pstn=32 |&lt;br /&gt;+----+----------+------------------------+---------------------------------+&lt;br /&gt;&lt;br /&gt;&lt;/pre&gt; &lt;p class="vspace"&gt;For runtime, the LB module provides MI commands for: &lt;/p&gt;&lt;ul&gt;&lt;li&gt;reloading the definition of destination sets &lt;/li&gt;&lt;li&gt;changing the capacity for a resource for a destination &lt;/li&gt;&lt;/ul&gt;&lt;h4&gt;&lt;a name="toc4" id="toc4"&gt;&lt;/a&gt;2.2  Invoking Load-balancing&lt;/h4&gt; &lt;p&gt;Using the LB functionality is very simple - you just have to pass to the LB module what kind of resources the call requires. &lt;/p&gt; &lt;p class="vspace"&gt;The resource detection is done in the &lt;strong&gt;OpenSIPS&lt;/strong&gt;  routing script, based on whatever information is appropriated. For  example, looking at the RURI (dialed number) you can see if the call  must go to PSTN or if it a voicemail or conference number; also, by  looking at the codecs advertised in the SDP, you can figure out if  transcoding is or not also required. &lt;/p&gt; &lt;pre class="escaped"&gt;  if (!load_balance("1","transc;pstn")) {&lt;br /&gt;    sl_send_reply("500","Service full");&lt;br /&gt;    exit;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;&lt;/pre&gt; &lt;p class="vspace"&gt;The first parameter of the function identifies the LB  set to be used (see the group_id column in the above DB snapshot).  Second parameter is list of the required resource for the call. &lt;/p&gt; &lt;p class="vspace"&gt;The &lt;strong&gt;load_balance()&lt;/strong&gt; will automatically  create the dialog state for the call (in order to monitor it) and will  also allocate the requested resources for it (from the selected box).&lt;br /&gt;The function will set as destination URI ($du) the address of the selected destination/box. &lt;/p&gt; &lt;p class="vspace"&gt;The resources will be automatically released when the call terminates.  &lt;/p&gt; &lt;p class="vspace"&gt;The LB module provides an MI function that allows the admin to inspect the current load over the destinations. &lt;/p&gt; &lt;h4&gt;&lt;a name="toc5" id="toc5"&gt;&lt;/a&gt;2.3  The LB logic&lt;/h4&gt; &lt;p&gt;The logic used by the LB module to select the destination is: &lt;/p&gt;&lt;ol&gt;&lt;li&gt;gets the &lt;strong&gt;destination set based on the group_id&lt;/strong&gt; (first parameter of the &lt;em&gt;load_balance()&lt;/em&gt; function) &lt;/li&gt;&lt;li&gt;selects from the set only the &lt;strong&gt;destinations that are able to provide the requested resources&lt;/strong&gt; (second parameter of the &lt;em&gt;load_balance()&lt;/em&gt; function) &lt;/li&gt;&lt;li&gt;for the selected destinations, it &lt;strong&gt;evaluated the current load&lt;/strong&gt; for each requested resource &lt;/li&gt;&lt;li&gt;the winning destination is the one with &lt;strong&gt;the biggest value for the minimum available load&lt;/strong&gt; per resources. &lt;/li&gt;&lt;/ol&gt;&lt;pre class="escaped"&gt;Example:&lt;br /&gt;&lt;br /&gt;4 destinations/boxes in the LB set&lt;br /&gt;  1) offers 30 channels for transcoding and 32 for PSTN&lt;br /&gt;  2) offers 100 voicemail channels and 10 for transcoding&lt;br /&gt;  3) offers 50 voicemail channels and 300 for conference&lt;br /&gt;  4) offers 10 voicemail, 10 conference, 10 transcoding and 32 PSTN&lt;br /&gt;&lt;br /&gt;when calling load_balance("1","transc;pstn") -&gt;&lt;br /&gt;&lt;br /&gt;1) only boxes (1) and (4) will be selected at as they offer both transcoding and pstn&lt;br /&gt;&lt;br /&gt;2) evaluating the load  :&lt;br /&gt;  (1) transcoding - 10 channels used; PSTN - 18 used&lt;br /&gt;  (4) transcoding - 9 channels used; PSTN - 16 used&lt;br /&gt;&lt;br /&gt; evaluating available load (capacity-load) :&lt;br /&gt;  (1) transcoding - 20 channels used; PSTN - 14 used&lt;br /&gt;  (4) transcoding - 1 channels used; PSTN - 16 used&lt;br /&gt;&lt;br /&gt;3) for each box, the minimum available load (through all resources)&lt;br /&gt;  (1) 14 (PSTN)&lt;br /&gt;  (2) 1 (transcoding)&lt;br /&gt;&lt;br /&gt;4) final selected box in (1) as it has the the biggest (=14) available load for the most loaded resource.&lt;br /&gt;&lt;br /&gt;&lt;/pre&gt; &lt;p class="vspace"&gt;The selection algorithm tries to avoid the intensive usage of a resource per box. &lt;/p&gt; &lt;hr /&gt; &lt;h3&gt;&lt;a name="toc6" id="toc6"&gt;&lt;/a&gt;3.  Study Case: routing the media gateways&lt;/h3&gt; &lt;p class="vspace"&gt;Here is the full configuration and script for performing LB between media peers. &lt;/p&gt; &lt;h4&gt;&lt;a name="toc7" id="toc7"&gt;&lt;/a&gt;3.1  Configuration&lt;/h4&gt; &lt;p&gt;Let's consider the case previously described: &lt;/p&gt; &lt;pre class="escaped"&gt;4 destinations/boxes in the LB set&lt;br /&gt;  1) offers 30 channels for transcoding and 32 for PSTN&lt;br /&gt;  2) offers 100 voicemail channels and 10 for transcoding&lt;br /&gt;  3) offers 50 voicemail channels and 300 for conference&lt;br /&gt;  4) offers 10 voicemail, 10 conference, 10 transcoding and 32 PSTN&lt;br /&gt;&lt;br /&gt;This translated into the following setup:&lt;br /&gt;&lt;br /&gt;+----+----------+------------------------+---------------------------------+&lt;br /&gt;| id | group_id | dst_uri                | resources                       |&lt;br /&gt;+----+----------+------------------------+---------------------------------+&lt;br /&gt;|  1 |        1 | sip:yate1.mycluset.net | transc=30; pstn=32              |&lt;br /&gt;|  2 |        1 | sip:yate2.mycluset.net | vm=100; transc=10               |&lt;br /&gt;|  3 |        1 | sip:yate3.mycluset.net | vm=50; conf=300                 |&lt;br /&gt;|  4 |        1 | sip:yate4.mycluset.net | vm=10;conf=10;transc=10;pstn=32 |&lt;br /&gt;+----+----------+------------------------+---------------------------------+&lt;br /&gt;&lt;br /&gt;&lt;/pre&gt; &lt;h4&gt;&lt;a name="toc8" id="toc8"&gt;&lt;/a&gt;3.2  OpenSIPS Scripting &lt;/h4&gt; &lt;pre class="escaped"&gt;debug=1&lt;br /&gt;memlog=1&lt;br /&gt;&lt;br /&gt;fork=yes&lt;br /&gt;children=2&lt;br /&gt;log_stderror=no&lt;br /&gt;log_facility=LOG_LOCAL0&lt;br /&gt;&lt;br /&gt;disable_tcp=yes&lt;br /&gt;disable_dns_blacklist = yes&lt;br /&gt;&lt;br /&gt;auto_aliases=no&lt;br /&gt;&lt;br /&gt;check_via=no&lt;br /&gt;dns=off&lt;br /&gt;rev_dns=off&lt;br /&gt;&lt;br /&gt;listen=udp:xxx.xxx.xxx.xxx:5060&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;loadmodule "modules/maxfwd/maxfwd.so"&lt;br /&gt;loadmodule "modules/sl/sl.so"&lt;br /&gt;loadmodule "modules/db_mysql/db_mysql.so"&lt;br /&gt;loadmodule "modules/tm/tm.so"&lt;br /&gt;loadmodule "modules/xlog/xlog.so"&lt;br /&gt;loadmodule "modules/uri/uri.so"&lt;br /&gt;loadmodule "modules/rr/rr.so"&lt;br /&gt;loadmodule "modules/dialog/dialog.so"&lt;br /&gt;loadmodule "modules/mi_fifo/mi_fifo.so"&lt;br /&gt;loadmodule "modules/mi_xmlrpc/mi_xmlrpc.so"&lt;br /&gt;loadmodule "modules/signaling/signaling.so"&lt;br /&gt;loadmodule "modules/textops/textops.so"&lt;br /&gt;loadmodule "modules/load_balancer/load_balancer.so"&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;modparam("mi_fifo", "fifo_name", "/tmp/opensips_fifo")&lt;br /&gt;&lt;br /&gt;modparam("dialog", "dlg_flag", 13)&lt;br /&gt;modparam("dialog", "db_mode", 1)&lt;br /&gt;modparam("dialog", "db_url", "mysql://opensips:opensipsrw@localhost/opensips")&lt;br /&gt;&lt;br /&gt;modparam("rr","enable_double_rr",1)&lt;br /&gt;modparam("rr","append_fromtag",1)&lt;br /&gt;&lt;br /&gt;modparam("load_balancer", "db_url","mysql://opensips:opensipsrw@localhost/opensips")&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;route{&lt;br /&gt;if (!mf_process_maxfwd_header("3")) {&lt;br /&gt; sl_send_reply("483","looping");&lt;br /&gt; exit;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;if (!has_totag()) {&lt;br /&gt;              # initial request&lt;br /&gt; record_route();&lt;br /&gt;} else {&lt;br /&gt; # sequential request -&gt; obey Route indication&lt;br /&gt; loose_route();&lt;br /&gt;              t_relay();&lt;br /&gt;              exit;&lt;br /&gt;      }&lt;br /&gt;&lt;br /&gt;      # handle cancel and re-transmissions&lt;br /&gt;if ( is_method("CANCEL") ) {&lt;br /&gt; if ( t_check_trans() )&lt;br /&gt;  t_relay();&lt;br /&gt; exit;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;      # from now on we have only the initial requests&lt;br /&gt;      if (!is_method("INVITE")) {&lt;br /&gt;              send_reply("405","Method Not Allowed");&lt;br /&gt;              exit;&lt;br /&gt;      }&lt;br /&gt;&lt;br /&gt;      # detect resources and do balancing&lt;br /&gt;      if ($rU=~"^1") {&lt;br /&gt;              # looks like a Conference call&lt;br /&gt;              load_balance("1","conf");&lt;br /&gt;      } else if ($rU=~"^2") {&lt;br /&gt;              # looks like a VoiceMail call&lt;br /&gt;              load_balance("1","vm");&lt;br /&gt;      } else {&lt;br /&gt;              # PSTN call, but the GWs supports only G711&lt;br /&gt;              # for calls without G711, transcoding will be used on the GW&lt;br /&gt;              if ( !search_body("G711") ) {&lt;br /&gt;                     load_balance("1","transc;pstn");&lt;br /&gt;              } else {&lt;br /&gt;                     load_balance("1","pstn");&lt;br /&gt;              }&lt;br /&gt;      }&lt;br /&gt;&lt;br /&gt;      # LB function returns negative if no suitable destination (for requested resources) is found,&lt;br /&gt;      # or if all destinations are full&lt;br /&gt;      if ($retcode&lt;0)&gt;&lt;div class="blogger-post-footer"&gt;akdayal@yahoo.com&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1818419888217740295-6582236078661556819?l=ananddayal.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ananddayal.blogspot.com/feeds/6582236078661556819/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1818419888217740295&amp;postID=6582236078661556819' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1818419888217740295/posts/default/6582236078661556819'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1818419888217740295/posts/default/6582236078661556819'/><link rel='alternate' type='text/html' href='http://ananddayal.blogspot.com/2010/11/load-balancing-in-opensips.html' title='SIP Load Balancing (SLB) using Opensips'/><author><name>Anand Kumar Dayal</name><uri>http://www.blogger.com/profile/15821949256334333875</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://bp2.blogger.com/_X_AIQvaR6X4/SJGDCYgSLAI/AAAAAAAADcI/tod2zTuEQCw/S220/PIC-AD-257(2).jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1818419888217740295.post-6241227341622932252</id><published>2010-11-11T06:07:00.000-08:00</published><updated>2010-11-11T06:08:34.588-08:00</updated><title type='text'>OpenSIPS Installation notes</title><content type='html'>&lt;!--[if gte mso 9]&gt;&lt;xml&gt;  &lt;w:worddocument&gt;   &lt;w:view&gt;Normal&lt;/w:View&gt;   &lt;w:zoom&gt;0&lt;/w:Zoom&gt;   &lt;w:compatibility&gt;    &lt;w:breakwrappedtables/&gt;    &lt;w:snaptogridincell/&gt;    &lt;w:wraptextwithpunct/&gt;    &lt;w:useasianbreakrules/&gt;   &lt;/w:Compatibility&gt;   &lt;w:browserlevel&gt;MicrosoftInternetExplorer4&lt;/w:BrowserLevel&gt;  &lt;/w:WordDocument&gt; &lt;/xml&gt;&lt;![endif]--&gt;&lt;!--[if !mso]&gt;&lt;object classid="clsid:38481807-CA0E-42D2-BF39-B33AF135CC4D" id="ieooui"&gt;&lt;/object&gt; &lt;style&gt; st1\:*{behavior:url(#ieooui) } &lt;/style&gt; &lt;![endif]--&gt;&lt;!--[if gte mso 10]&gt; &lt;style&gt;  /* Style Definitions */  table.MsoNormalTable  {mso-style-name:"Table Normal";  mso-tstyle-rowband-size:0;  mso-tstyle-colband-size:0;  mso-style-noshow:yes;  mso-style-parent:"";  mso-padding-alt:0in 5.4pt 0in 5.4pt;  mso-para-margin:0in;  mso-para-margin-bottom:.0001pt;  mso-pagination:widow-orphan;  font-size:10.0pt;  font-family:"Times New Roman";} &lt;/style&gt; &lt;![endif]--&gt;  &lt;p class="MsoNormal"&gt;1. First install the following dependencies that will be needed to compile OpenSIPS sources:&lt;br /&gt;&lt;br /&gt;- bison&lt;br /&gt;- flex&lt;br /&gt;- mysql&lt;br /&gt;- mysql-devel&lt;br /&gt;- subversion (if you intend to use subversion to get its sources&lt;br /&gt;&lt;br /&gt;*you can install the said sources via tarballs or rpms or via yum which I did :-)&lt;br /&gt;&lt;br /&gt;2. Get the latest source package of OpenSIPs (currently it's 1.5.x series)&lt;br /&gt;&lt;br /&gt;wget http://opensips.org/pub/opensips/1.5.0/src/opensips-1.5.0-tls_src.tar.gz&lt;br /&gt;&lt;br /&gt;3. Unzip and extract the files&lt;br /&gt;&lt;br /&gt;tar xvzf opensips-1.5.0-tls_src.tar.gz&lt;br /&gt;&lt;br /&gt;4. cd to the source directory&lt;br /&gt;&lt;br /&gt;cd opensips-1.5.0-tls&lt;br /&gt;&lt;br /&gt;5. Do following for compilation and installation&lt;br /&gt;&lt;br /&gt;make clean&lt;br /&gt;make all&lt;br /&gt;make install ; it seems to be simplified ah ;-) by default everything will be installed at /usr/local&lt;br /&gt;&lt;br /&gt;6. Now edit first openserctlrc&lt;br /&gt;&lt;br /&gt;vi /usr/local/etc/opensips/opensipsctlrc&lt;br /&gt;&lt;br /&gt;uncomment the line that says&lt;br /&gt;&lt;br /&gt;DBENGINE=MYSQL&lt;br /&gt;&lt;br /&gt;7. Now we can create the database for the OpenSIPs&lt;br /&gt;&lt;br /&gt;/usr/local/sbin/opensipsdbctl create&lt;br /&gt;&lt;br /&gt;; this will prompt for mysql root password&lt;br /&gt;&lt;br /&gt;*Note that upon execution of this command it will create 2 users for OpenSIPs&lt;br /&gt;&lt;br /&gt;; by default the mysql database user created is:&lt;br /&gt;&lt;br /&gt;username: opensips&lt;br /&gt;password: opensipsrw&lt;br /&gt;&lt;br /&gt;8. Now edit opensips.cfg&lt;br /&gt;&lt;br /&gt;vi /usr/local/etc/opensips/opensips.cfg&lt;br /&gt;&lt;br /&gt;uncomment all lines in configuration file opensips.cfg which are related to&lt;br /&gt;authentication:&lt;br /&gt;- loadmodule "/usr/lib/opensips/modules/db_mysql.so"&lt;br /&gt;- loadmodule "/usr/lib/opensips/modules/auth.so"&lt;br /&gt;- loadmodule "/usr/lib/opensips/modules/auth_db.so"&lt;br /&gt;- modparam("usrloc", "db_mode", 2)&lt;br /&gt;- modparam("auth", "calculate_ha1", yes)&lt;br /&gt;- modparam("auth_db", "password_column", "password")&lt;br /&gt;- if (!www_authorize("sip.org", "subscriber")) {&lt;br /&gt;www_challenge("sip.org", "0");&lt;br /&gt;break;&lt;br /&gt;&lt;br /&gt;Make sure you change the two sip.org instances in the above config, to your&lt;br /&gt;domain, or realm. In my case, I changed this to 192.168.2.235 which was the&lt;br /&gt;IP address of this box.&lt;br /&gt;&lt;br /&gt;Also, be sure to comment out the following line:&lt;br /&gt;&lt;br /&gt;modparam("usrloc", "db_mode", 0)&lt;br /&gt;&lt;br /&gt;9. Now let us copy the init script so as to start OpenSIPs as service ( such as starting it at boot). Copy the openser.init which can be found on the base directory of the OpenSIPs source. In my case it is at /usr/src&lt;br /&gt;&lt;br /&gt;cp /usr/src/opensips-1.5.0-tls/packaging/rpm/opensips.init /etc/init.d/openser&lt;br /&gt;&lt;br /&gt;chmod 755 /etc/init.d/opensips&lt;br /&gt;/sbin/chkconfig --add opensips&lt;br /&gt;&lt;br /&gt;also before you start the openser correct the path of its service execution&lt;br /&gt;&lt;br /&gt;vi /etc/init.d/opensips&lt;br /&gt;&lt;br /&gt;change the following line&lt;br /&gt;&lt;br /&gt;osips=/usr/sbin/opensips&lt;br /&gt;&lt;br /&gt;with this one since we installed the binaries on path /usr/local&lt;br /&gt;&lt;br /&gt;osips=/usr/local/sbin/opensips&lt;br /&gt;&lt;br /&gt;10. Now you can start OpenSIPs service&lt;br /&gt;&lt;br /&gt;/sbin/service opensips start&lt;br /&gt;&lt;br /&gt;To check if it is running issue&lt;br /&gt;&lt;br /&gt;ps aux|grep opensips&lt;br /&gt;&lt;br /&gt;you should see something like this&lt;br /&gt;&lt;br /&gt;root 4210 0.3 0.6 43048 3548 ? S 21:21 0:00 /usr/local/sbin/opensips -P /var/run/opensips.pid&lt;br /&gt;root 4214 0.0 0.2 43048 1216 ? S 21:21 0:00 /usr/local/sbin/opensips -P /var/run/opensips.pid&lt;br /&gt;root 4217 0.0 0.2 43048 1140 ? S 21:21 0:00 /usr/local/sbin/opensips -P /var/run/opensips.pid&lt;br /&gt;&lt;br /&gt;11. To test we will create user / SIP account to test our set up. We can do this by using the opensipsctl tool&lt;br /&gt;&lt;br /&gt;/usr/local/sbin/opensipsctl add mytest 'abc123!@#'&lt;br /&gt;&lt;br /&gt;*Note you might encounter problem once you issued the command above and complaining for the SIP_DOMAiN. To fix that,&lt;br /&gt;issue the command as follows:&lt;br /&gt;&lt;br /&gt;export SIP_DOMAIN=192.168.2.235&lt;br /&gt;&lt;br /&gt;Now re issue the command for adding new user / SIP account&lt;br /&gt;&lt;br /&gt;12. Test it by registering a softphone and filling up the phone's registration info's. You should be able to register already.&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;akdayal@yahoo.com&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1818419888217740295-6241227341622932252?l=ananddayal.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ananddayal.blogspot.com/feeds/6241227341622932252/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1818419888217740295&amp;postID=6241227341622932252' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1818419888217740295/posts/default/6241227341622932252'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1818419888217740295/posts/default/6241227341622932252'/><link rel='alternate' type='text/html' href='http://ananddayal.blogspot.com/2010/11/opensips-installation-notes.html' title='OpenSIPS Installation notes'/><author><name>Anand Kumar Dayal</name><uri>http://www.blogger.com/profile/15821949256334333875</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://bp2.blogger.com/_X_AIQvaR6X4/SJGDCYgSLAI/AAAAAAAADcI/tod2zTuEQCw/S220/PIC-AD-257(2).jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1818419888217740295.post-6002822372282078789</id><published>2008-08-05T00:44:00.001-07:00</published><updated>2008-08-05T00:44:32.128-07:00</updated><title type='text'>Asterisk Detailed Variable List</title><content type='html'>Asterisk standard channel variables &lt;br /&gt;&lt;hr /&gt;There are a number of variables that are defined or read&lt;br /&gt;by Asterisk. Here is a list of them. More information is&lt;br /&gt;available in each application's help text. All these variables&lt;br /&gt;are in UPPER CASE only.&lt;br /&gt;&lt;br /&gt;Variables marked with a * are builtin functions and can't be set,&lt;br /&gt;only read in the dialplan.  Writes to such variables are silently &lt;br /&gt;ignored.&lt;br /&gt;&lt;br /&gt;${ACCOUNTCODE}    * Account code (if specified) (Deprecated; use ${CDR(accountcode)})&lt;br /&gt;${BLINDTRANSFER}  The name of the channel on the other side of a blind transfer&lt;br /&gt;${BRIDGEPEER}   Bridged peer&lt;br /&gt;${CALLERANI}   * Caller ANI (PRI channels) (Deprecated; use ${CALLERID(ani)})&lt;br /&gt;${CALLERID}   * Caller ID (Deprecated; use ${CALLERID(all)})&lt;br /&gt;${CALLERIDNAME}   * Caller ID Name only (Deprecated; use ${CALLERID(name)})&lt;br /&gt;${CALLERIDNUM}   * Caller ID Number only (Deprecated; use ${CALLERID(num)})&lt;br /&gt;${CALLINGANI2}   * Caller ANI2 (PRI channels)&lt;br /&gt;${CALLINGPRES}   * Caller ID presentation for incoming calls (PRI channels)&lt;br /&gt;${CALLINGTNS}    * Transit Network Selector (PRI channels)&lt;br /&gt;${CALLINGTON}     * Caller Type of Number (PRI channels)&lt;br /&gt;${CHANNEL}   * Current channel name&lt;br /&gt;${CONTEXT}        * Current context&lt;br /&gt;${DATETIME}   * Current date time in the format: DDMMYYYY-HH:MM:SS (Deprecated; use ${STRFTIME(${EPOCH},,%d%m&lt;span class="dynavar" style="display: inline;" id="dyn_Y-_display"&gt;NaV&lt;/span&gt;H:&lt;span class="dynavar" style="display: inline;" id="dyn_M:_display"&gt;NaV&lt;/span&gt;S)})&lt;br /&gt;${DB_RESULT}  Result value of DB_EXISTS() dial plan function&lt;br /&gt;${DNID}           * Dialed Number Identifier (Deprecated; use ${CALLERID(dnid)})&lt;br /&gt;${EPOCH}   * Current unix style epoch&lt;br /&gt;${EXTEN}   * Current extension&lt;br /&gt;${ENV(VAR)}   Environmental variable VAR&lt;br /&gt;${GOTO_ON_BLINDXFR} Transfer to the specified context/extension/priority&lt;br /&gt;   after a blind transfer (use ^ characters in place of&lt;br /&gt;   | to separate context/extension/priority when setting&lt;br /&gt;   this variable from the dialplan)&lt;br /&gt;${HANGUPCAUSE}   * Asterisk cause of hangup (inbound/outbound)&lt;br /&gt;${HINT}           * Channel hints for this extension&lt;br /&gt;${HINTNAME}       * Suggested Caller*ID name for this extension&lt;br /&gt;${INVALID_EXTEN}  The invalid called extension (used in the "i" extension)&lt;br /&gt;${LANGUAGE}   * Current language (Deprecated; use ${LANGUAGE()})&lt;br /&gt;${LEN(VAR)}   * String length of VAR (integer)&lt;br /&gt;${PRIORITY}   * Current priority in the dialplan&lt;br /&gt;${PRIREDIRECTREASON}  Reason for redirect on PRI, if a call was directed&lt;br /&gt;${RDNIS}          * Redirected Dial Number ID Service (Deprecated; use ${CALLERID(rdnis)})&lt;br /&gt;${TIMESTAMP}   * Current date time in the format: YYYYMMDD-HHMMSS (Deprecated; use ${STRFTIME(${EPOCH},,%Y%m&lt;span class="dynavar" style="display: inline;" id="dyn_d-_display"&gt;NaV&lt;/span&gt;H%M%S)})&lt;br /&gt;${TRANSFER_CONTEXT}  Context for transferred calls&lt;br /&gt;${FORWARD_CONTEXT}     Context for forwarded calls&lt;br /&gt;${UNIQUEID}   * Current call unique identifier&lt;br /&gt;${SYSTEMNAME}  * value of the systemname option of asterisk.conf&lt;br /&gt;&lt;br /&gt;Application return values&lt;br /&gt;&lt;hr /&gt;In Asterisk 1.2, many applications return the result in a variable&lt;br /&gt;instead of, as in Asterisk 1.0, changing the dial plan priority (+101).&lt;br /&gt;For the various status values, see each application's help text.&lt;br /&gt;&lt;br /&gt;${AGISTATUS}   * agi()&lt;br /&gt;${AQMSTATUS}   * addqueuemember()&lt;br /&gt;${AVAILSTATUS}   * chanisavail()&lt;br /&gt;${CHECKGROUPSTATUS}  * checkgroup()&lt;br /&gt;${CHECKMD5STATUS}  * checkmd5()&lt;br /&gt;${CPLAYBACKSTATUS}  * controlplayback()&lt;br /&gt;${DIALSTATUS}     * dial()  - see also ${HANGUPCAUSE}&lt;br /&gt;${DBGETSTATUS}   * dbget()&lt;br /&gt;${ENUMSTATUS}   * enumlookup()&lt;br /&gt;${HASVMSTATUS}   * hasnewvoicemail()&lt;br /&gt;${LOOKUPBLSTATUS}  * lookupblacklist()&lt;br /&gt;${OSPAUTHSTATUS}  * ospauth()&lt;br /&gt;${OSPLOOKUPSTATUS}  * osplookup()&lt;br /&gt;${OSPNEXTSTATUS}  * ospnext()&lt;br /&gt;${OSPFINISHSTATUS}  * ospfinish()&lt;br /&gt;${PARKEDAT}   * parkandannounce()&lt;br /&gt;${PLAYBACKSTATUS}  * playback()&lt;br /&gt;${PQMSTATUS}   * pausequeuemember()&lt;br /&gt;${PRIVACYMGRSTATUS}  * privacymanager()&lt;br /&gt;${QUEUESTATUS}   * queue()&lt;br /&gt;${RQMSTATUS}   * removequeuemember()&lt;br /&gt;${SENDIMAGESTATUS}  * sendimage()&lt;br /&gt;${SENDTEXTSTATUS}  * sendtext()&lt;br /&gt;${SENDURLSTATUS}  * sendurl()&lt;br /&gt;${SYSTEMSTATUS}   * system()&lt;br /&gt;${TRANSFERSTATUS}  * transfer()&lt;br /&gt;${TXTCIDNAMESTATUS}  * txtcidname()&lt;br /&gt;${UPQMSTATUS}   * unpausequeuemember()&lt;br /&gt;${VMSTATUS}   * voicmail()&lt;br /&gt;${VMBOXEXISTSSTATUS}  * vmboxexists()&lt;br /&gt;${WAITSTATUS}   * waitforsilence()&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Various application variables&lt;br /&gt;&lt;hr /&gt;${CURL}   * Resulting page content for curl()&lt;br /&gt;${ENUM}   * Result of application EnumLookup&lt;br /&gt;${EXITCONTEXT}  Context to exit to in IVR menu (app background())&lt;br /&gt;   or in the RetryDial() application&lt;br /&gt;${MONITOR}  * Set to "TRUE" if the channel is/has been monitored (app monitor())&lt;br /&gt;${MONITOR_EXEC}  Application to execute after monitoring a call&lt;br /&gt;${MONITOR_EXEC_ARGS} Arguments to application&lt;br /&gt;${MONITOR_FILENAME}  File for monitoring (recording) calls in queue&lt;br /&gt;${QUEUE_PRIO}  Queue priority&lt;br /&gt;${QUEUE_MAX_PENALTY} Maximum member penalty allowed to answer caller&lt;br /&gt;${QUEUESTATUS}   Status of the call, one of:&lt;br /&gt;   (TIMEOUT | FULL | JOINEMPTY | LEAVEEMPTY | JOINUNAVAIL | LEAVEUNAVAIL)&lt;br /&gt;${RECORDED_FILE}  * Recorded file in record()&lt;br /&gt;${TALK_DETECTED}  * Result from talkdetect()&lt;br /&gt;${TOUCH_MONITOR}  The filename base to use with Touch Monitor (auto record)&lt;br /&gt;${TOUCH_MONITOR_FORMAT} The audio format to use with Touch Monitor (auto record)&lt;br /&gt;${TOUCH_MONITOR_OUTPUT} * Recorded file from Touch Monitor (auto record)&lt;br /&gt;${TXTCIDNAME}  * Result of application TXTCIDName&lt;br /&gt;${VPB_GETDTMF}  chan_vpb&lt;br /&gt;&lt;br /&gt;The MeetMe Conference Bridge uses the following variables:&lt;br /&gt;&lt;hr /&gt;${MEETME_RECORDINGFILE}  Name of file for recording a conference with &lt;br /&gt;    the "r" option&lt;br /&gt;${MEETME_RECORDINGFORMAT}  Format of file to be recorded&lt;br /&gt;${MEETME_EXIT_CONTEXT}   Context for exit out of meetme meeting&lt;br /&gt;${MEETME_AGI_BACKGROUND}  AGI script for Meetme (zap only)&lt;br /&gt;${MEETMESECS}    * Number of seconds a user participated in a MeetMe conference&lt;br /&gt;&lt;br /&gt;The VoiceMail() application uses the following variables:&lt;br /&gt;&lt;hr /&gt;${VM_CATEGORY}  Sets voicemail category&lt;br /&gt;${VM_NAME}  * Full name in voicemail&lt;br /&gt;${VM_DUR}  * Voicemail duration&lt;br /&gt;${VM_MSGNUM}  * Number of voicemail message in mailbox&lt;br /&gt;${VM_CALLERID}  * Voicemail Caller ID (Person leaving vm)&lt;br /&gt;${VM_CIDNAME}  * Voicemail Caller ID Name&lt;br /&gt;${VM_CIDNUM}  * Voicemail Caller ID Number&lt;br /&gt;${VM_DATE}  * Voicemail Date&lt;br /&gt;${VM_MESSAGEFILE} * Path to message left by caller&lt;br /&gt;&lt;br /&gt;The VMAuthenticate() application uses the following variables:&lt;br /&gt;&lt;hr /&gt;${AUTH_MAILBOX} * Authenticated mailbox&lt;br /&gt;${AUTH_CONTEXT} * Authenticated mailbox context&lt;br /&gt;&lt;br /&gt;DUNDiLookup() uses the following variables&lt;br /&gt;&lt;hr /&gt;${DUNDTECH} * The Technology of the result from a call to DUNDiLookup()&lt;br /&gt;${DUNDDEST} * The Destination of the result from a call to DUNDiLookup()&lt;br /&gt;&lt;br /&gt;The Zaptel channel sets the following variables:&lt;br /&gt;&lt;hr /&gt;${ANI2} * The ANI2 Code provided by the network on the incoming call. (ie, Code 29 identifies call as a Prison/Inmate Call) See also: &lt;a class="external" onclick="javascript: pageTracker._trackPageview('/outgoing/wikipages/www.nanpa.com/number_resource_info/ani_ii_assignments.html' );" href="http://www.nanpa.com/number_resource_info/ani_ii_assignments.html"&gt;NANPA ANI II Digits Assignments&lt;/a&gt;&lt;br /&gt;${CALLTYPE}  * Type of call (Speech, Digital, etc)&lt;br /&gt;${CALLEDTON}  * Type of number for incoming PRI extension&lt;br /&gt;   i.e. 0=unknown, 1=international, 2=domestic, 3=net_specific, &lt;br /&gt;   4=subscriber, 6=abbreviated, 7=reserved &lt;br /&gt;${CALLINGSUBADDR} * Called PRI Subaddress&lt;br /&gt;${FAXEXTEN}   * The extension called before being redirected to "fax" &lt;br /&gt;${PRIREDIRECTREASON} * Reason for redirect, if a call was directed&lt;br /&gt;${SMDI_VM_TYPE}  * When an call is received with an SMDI message, the 'type'&lt;br /&gt;   of message 'b' or 'u'&lt;br /&gt;&lt;br /&gt;The SIP channel uses the following variables:&lt;br /&gt;&lt;hr /&gt;${SIPCALLID}   * SIP Call-ID: header verbatim (for logging or CDR matching)&lt;br /&gt;${SIPDOMAIN}     * SIP destination domain of an inbound call (if appropriate)&lt;br /&gt;${SIPUSERAGENT}  * SIP user agent &lt;br /&gt;${SIPURI}  * SIP uri&lt;br /&gt;${SIP_CODEC}   Set the SIP codec for a call &lt;br /&gt;${SIP_URI_OPTIONS} * additional options to add to the URI for an outgoing call&lt;br /&gt;${RTPAUDIOQOS}  RTCP QoS report for the audio of this call&lt;br /&gt;${RTPVIDEOQOS}  RTCP QoS report for the video of this call&lt;br /&gt;&lt;br /&gt;The Agent channel uses the following variables:&lt;br /&gt;&lt;hr /&gt;${AGENTMAXLOGINTRIES} Set the maximum number of failed logins&lt;br /&gt;${AGENTUPDATECDR} Whether to update the CDR record with Agent channel data&lt;br /&gt;${AGENTGOODBYE}  Sound file to use for "Good Bye" when agent logs out&lt;br /&gt;${AGENTACKCALL}  Whether the agent should acknowledge the incoming call&lt;br /&gt;${AGENTAUTOLOGOFF} Auto logging off for an agent&lt;br /&gt;${AGENTWRAPUPTIME} Setting the time for wrapup between incoming calls&lt;br /&gt;${AGENTNUMBER}  * Agent number (username) set at login&lt;br /&gt;${AGENTSTATUS}  * Status of login ( fail | on | off )&lt;br /&gt;${AGENTEXTEN}  * Extension for logged in agent&lt;br /&gt;&lt;br /&gt;The Dial() application uses the following variables:&lt;br /&gt;&lt;hr /&gt;${DIALEDPEERNAME}   * Dialed peer name&lt;br /&gt;${DIALEDPEERNUMBER}   * Dialed peer number&lt;br /&gt;${DIALEDTIME}     * Time for the call (seconds)&lt;br /&gt;${ANSWEREDTIME}   * Time from dial to answer (seconds)&lt;br /&gt;${DIALSTATUS}     * Status of the call, one of:&lt;br /&gt;&lt;span style="font-family: monospace;"&gt;                 (CHANUNAVAIL | CONGESTION | BUSY | NOANSWER  &lt;/span&gt;&lt;br /&gt;     | ANSWER | CANCEL | DONTCALL | TORTURE)&lt;br /&gt;${DYNAMIC_FEATURES}  * The list of features (from the &lt;a href="http://www.voip-info.org/wiki/view/applicationmap"&gt;applicationmap&lt;/a&gt; section of&lt;br /&gt;      features.conf) to activate during the call, with feature&lt;br /&gt;      names separated by '#' characters&lt;br /&gt;${LIMIT_PLAYAUDIO_CALLER} Soundfile for call limits&lt;br /&gt;${LIMIT_PLAYAUDIO_CALLEE} Soundfile for call limits&lt;br /&gt;${LIMIT_WARNING_FILE}  Soundfile for call limits&lt;br /&gt;${LIMIT_TIMEOUT_FILE}  Soundfile for call limits&lt;br /&gt;${LIMIT_CONNECT_FILE}  Soundfile for call limits&lt;br /&gt;${OUTBOUND_GROUP}  Default groups for peer channels (as in SetGroup)&lt;br /&gt;&lt;ul&gt;&lt;li&gt; See "show application dial" for more information &lt;/li&gt;&lt;/ul&gt;&lt;br /&gt;The chanisavail() application sets the following variables:&lt;br /&gt;&lt;hr /&gt;${AVAILCHAN}  * the name of the available channel if one was found &lt;br /&gt;${AVAILORIGCHAN}  * the canonical channel name that was used to create the channel&lt;br /&gt;${AVAILSTATUS}  * Status of requested channel&lt;br /&gt;&lt;br /&gt;When using macros in the dialplan, these variables are available&lt;br /&gt;&lt;hr /&gt;${MACRO_EXTEN}  * The calling extensions&lt;br /&gt;${MACRO_CONTEXT} * The calling context&lt;br /&gt;${MACRO_PRIORITY} * The calling priority&lt;br /&gt;${MACRO_OFFSET}  Offset to add to priority at return from macro&lt;br /&gt;&lt;br /&gt;The ChanSpy() application uses the following variables:&lt;br /&gt;&lt;hr /&gt;${SPYGROUP}  * A ':' (colon) separated list of group names.&lt;br /&gt;     (To be set on spied on channel and matched against the g(grp) option)&lt;br /&gt;&lt;br /&gt;If you compile with OSP support, these variables are used:&lt;br /&gt;&lt;hr /&gt;${OSPINHANDLE}  OSP handle of in_bound call&lt;br /&gt;${OSPINTIMELIMIT} Duration limit for in_bound call&lt;br /&gt;${OSPOUTHANDLE}  OSP handle of out_bound call&lt;br /&gt;${OSPTECH}   OSP technology &lt;br /&gt;${OSPDEST}   OSP destination&lt;br /&gt;${OSPCALLING}  OSP calling number&lt;br /&gt;${OSPOUTTOKEN}  OSP token to use for out_bound call&lt;br /&gt;${OSPOUTTIMELIMIT} Duration limit for out_bound call&lt;br /&gt;${OSPRESULTS}  Number of remained destinations&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;&lt;/strong&gt;&lt;strong&gt;&lt;/strong&gt;&lt;strong&gt;&lt;/strong&gt;&lt;strong&gt;&lt;/strong&gt;&lt;strong&gt;&lt;/strong&gt;&lt;strong&gt;&lt;/strong&gt;&lt;strong&gt;&lt;/strong&gt;&lt;strong&gt;&lt;/strong&gt;&lt;strong&gt;&lt;/strong&gt;&lt;br /&gt;CDR Variables&lt;br /&gt;&lt;hr /&gt;&lt;br /&gt;If the channel has a cdr, that cdr record has it's own set of variables which &lt;br /&gt;can be accessed just like channel variables. The following builtin variables&lt;br /&gt;are available and, unless specified, read-only.&lt;br /&gt;&lt;br /&gt;${CDR(clid)}   Caller ID&lt;br /&gt;${CDR(src)}   Source &lt;br /&gt;${CDR(dst)}   Destination&lt;br /&gt;${CDR(dcontext)}  Destination context&lt;br /&gt;${CDR(channel)}   Channel name&lt;br /&gt;${CDR(dstchannel)}  Destination channel&lt;br /&gt;${CDR(lastapp)}   Last app executed&lt;br /&gt;${CDR(lastdata)}  Last app's arguments&lt;br /&gt;${CDR(start)}   Time the call started.&lt;br /&gt;${CDR(answer)}   Time the call was answered.&lt;br /&gt;${CDR(end)}   Time the call ended.&lt;br /&gt;${CDR(duration)}  Duration of the call.&lt;br /&gt;${CDR(billsec)}   Duration of the call once it was answered.&lt;br /&gt;${CDR(disposition)}  ANSWERED, NO ANSWER, BUSY&lt;br /&gt;${CDR(amaflags)}  DOCUMENTATION, BILL, IGNORE etc&lt;br /&gt;${CDR(accountcode)}  The channel's account code (read-write).&lt;br /&gt;${CDR(uniqueid)}  The channel's unique id.&lt;br /&gt;${CDR(userfield)}  The channels uses specified field (read-write).&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;In addition, you can set your own extra variables with a traditional&lt;br /&gt;Set(CDR(var)=val) to anything you want.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;NOTE&lt;/strong&gt; Some CDR values (eg: duration &amp;amp; billsec) can't be accessed until the call has terminated. As of &lt;a class="external" onclick="javascript: pageTracker._trackPageview('/outgoing/wikipages/svn.digium.com/view/asterisk' );" href="http://svn.digium.com/view/asterisk?view=rev&amp;amp;revision=91617"&gt;91617&lt;/a&gt;, those values will be calculated on-demand if requested. Until that makes it into a stable release, you can set endbeforehexten=yes in cdr.conf, and then use the "hangup" context to wrap up your call.&lt;br /&gt;&lt;br /&gt;Certain functional variables may be accessed with ${foo(&lt;args&gt;)}.  A list&lt;br /&gt;of these functional variables may be found by typing "show functions"&lt;br /&gt;at the Asterisk CLI.&lt;div style="display: none;"&gt;&lt;input name="_dyn_update" value="Update variables" type="submit"&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;akdayal@yahoo.com&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1818419888217740295-6002822372282078789?l=ananddayal.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ananddayal.blogspot.com/feeds/6002822372282078789/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1818419888217740295&amp;postID=6002822372282078789' title='21 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1818419888217740295/posts/default/6002822372282078789'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1818419888217740295/posts/default/6002822372282078789'/><link rel='alternate' type='text/html' href='http://ananddayal.blogspot.com/2008/08/asterisk-detailed-variable-list.html' title='Asterisk Detailed Variable List'/><author><name>Anand Kumar Dayal</name><uri>http://www.blogger.com/profile/15821949256334333875</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://bp2.blogger.com/_X_AIQvaR6X4/SJGDCYgSLAI/AAAAAAAADcI/tod2zTuEQCw/S220/PIC-AD-257(2).jpg'/></author><thr:total>21</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1818419888217740295.post-4491894138623828472</id><published>2008-08-05T00:43:00.001-07:00</published><updated>2008-08-05T00:43:41.821-07:00</updated><title type='text'>Asterisk variables</title><content type='html'>&lt;h1 id="UsingVariablesinAsteriskDialplans"&gt;Using Variables in Asterisk Dialplans &lt;/h1&gt;Asterisk can make use of global and channel-specific variables for arguments to commands. Variables are referenced in the dialplan (extensions.conf) using the syntax&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: monospace;"&gt;   ${foo:&lt;em&gt;offset&lt;/em&gt;:&lt;em&gt;length&lt;/em&gt;} &lt;/span&gt;&lt;br /&gt;&lt;br /&gt;where &lt;em&gt;foo&lt;/em&gt; is the name of the variable, &lt;em&gt;offset&lt;/em&gt; is an optional field indicating which characters should be excluded, and &lt;em&gt;length&lt;/em&gt; is an optional field indicating the number of characters from the offset to be returned (see "Substrings" below for details and examples). A variable name may be any alphanumeric string beginning with a letter. User-defined variable names are not case sensitive — ${FOO} and ${Foo} refer to the same variable — but Asterisk-defined variables &lt;em&gt;are&lt;/em&gt; case-sensitive — ${EXTEN} works, but ${exten} doesn't.&lt;br /&gt;&lt;br /&gt;There are three types of variables: global variables, channel variables, and environment variables.&lt;br /&gt;&lt;ul&gt;&lt;li&gt;&lt;strong&gt;Global&lt;/strong&gt; variables can be set either in the [globals] category of &lt;a title="Asterisk config extensions.conf" href="http://www.voip-info.org/wiki/view/Asterisk+config+extensions.conf"&gt;extensions.conf&lt;/a&gt; or by using the &lt;a title="Asterisk cmd SetGlobalVar" href="http://www.voip-info.org/wiki/view/Asterisk+cmd+SetGlobalVar"&gt;SetGlobalVar&lt;/a&gt; command. Once defined, they can be referenced by any channel at any time. &lt;/li&gt;&lt;li&gt;&lt;strong&gt;Channel&lt;/strong&gt; variables are set using the &lt;a title="Asterisk cmd Set" href="http://www.voip-info.org/wiki/view/Asterisk+cmd+Set"&gt;Set&lt;/a&gt; command (previously "setvar"). Each &lt;a title="Asterisk channels" href="http://www.voip-info.org/wiki/view/Asterisk+channels"&gt;channel&lt;/a&gt; gets its own variable space, so there is no chance of collisions between different calls, and the variable is automatically trashed when the channel is hungup. &lt;/li&gt;&lt;li&gt; &lt;strong&gt;Environment&lt;/strong&gt; variables provide a means to access unix environment variables from within Asterisk. There's a list further down this page. &lt;/li&gt;&lt;/ul&gt;If you define a channel variable with the same name as a global variable (and remember: user-defined variable names are not case sensitive), references to that variable name will return the value of the channel variable. For example, let us say that you define a context "FooTest" with a single extension, 100, with the following definition:(:smile:)&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: monospace;"&gt;   [FooTest] &lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: monospace;"&gt;   exten =&gt; 100,1,SetGlobalVar(FOO=5) &lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: monospace;"&gt;   exten =&gt; 100,2,NoOp(${FOO}) &lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: monospace;"&gt;   exten =&gt; 100,3,NoOp(${foo}) &lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: monospace;"&gt;   exten =&gt; 100,4,SetVar(foo=8) &lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: monospace;"&gt;   exten =&gt; 100,5,NoOp(${FOO}) &lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: monospace;"&gt;   exten =&gt; 100,6,NoOp(${foo}) &lt;/span&gt;&lt;br /&gt;&lt;br /&gt;(Note the use of the &lt;a title="Asterisk cmd NoOp" href="http://www.voip-info.org/wiki/view/Asterisk+cmd+NoOp"&gt;NoOp&lt;/a&gt; command to assist in debugging.) If you dial extension 100 in context FooTest, and you have Asterisk running with a verbose console, you will see output similar to the following:&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: monospace;"&gt;   — Executing SetGlobalVar("Zap/1-1", "FOO=5") in new stack &lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: monospace;"&gt;   — Setting global variable 'FOO' to '5' &lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: monospace;"&gt;   — Executing NoOp("Zap/1-1", "5") in new stack &lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: monospace;"&gt;   — Executing NoOp("Zap/1-1", "5") in new stack &lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: monospace;"&gt;   — Executing SetVar("Zap/1-1", "foo=8") in new stack &lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: monospace;"&gt;   — Executing NoOp("Zap/1-1", "8") in new stack &lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: monospace;"&gt;   — Executing NoOp("Zap/1-1", "8") in new stack &lt;/span&gt;&lt;br /&gt;&lt;br /&gt;We discover that after the call to SetGlobalVar, ${FOO} and ${foo} returned the value of the global variable, giving the value 5. After the call to SetVar, the global variable "foo" was obscured by the channel variable "foo"; ${FOO} and ${foo} both gave the value 8. The value of the global variable remains unchanged at 5, however, and any other channels that refer to the global variable ${foo} would still get the value 5.&lt;br /&gt;&lt;br /&gt;&lt;h1 id="InheritanceofChannelVariables"&gt;Inheritance of Channel Variables &lt;/h1&gt;Prepending a single _ character to a variables name in SetVar will cause that variable to be inherited by channels created by the main channel. eg. when using Dial(Local/...); once inherited these variables will not be further inherited. Prepending two _ characters will cause them to be inherited indefinitely.&lt;br /&gt;&lt;br /&gt;Note that for retrieval purposes these variable names do not include the underscores. &lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: monospace;"&gt;   [TestInherit] &lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: monospace;"&gt;   exten =&gt; 100,1,SetVar(__FOO=5) &lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: monospace;"&gt;   exten =&gt; 100,2,Dial(Local/test@CheckInherit) &lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: monospace;"&gt;   exten =&gt; test,1,NoOp(${FOO}) &lt;/span&gt;&lt;br /&gt;&lt;br /&gt;will result in FOO being inherited. Without the underscores, the new local channel would start with a clean slate.&lt;br /&gt;&lt;br /&gt;&lt;h2 id="Example"&gt;Example &lt;/h2&gt;&lt;br /&gt;&lt;span style="font-family: monospace;"&gt;   exten =&gt; 104,1,SetVar(FEE=fee) &lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: monospace;"&gt;   exten =&gt; 104,2,SetVar(_FIE=fie) &lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: monospace;"&gt;   exten =&gt; 104,3,SetVar(__FUM=fum) &lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: monospace;"&gt;   exten =&gt; 104,4,Dial(Local/105) &lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: monospace;"&gt;   exten =&gt; 105,1,NoOp(${FEE}) &lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: monospace;"&gt;   exten =&gt; 105,2,NoOp(${FIE}) &lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: monospace;"&gt;   exten =&gt; 105,3,NoOp(${FUM}) &lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: monospace;"&gt;   exten =&gt; 105,4,Dial(Local/106) &lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: monospace;"&gt;   exten =&gt; 106,1,NoOp(${FEE}) &lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: monospace;"&gt;   exten =&gt; 106,2,NoOp(${FIE}) &lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: monospace;"&gt;   exten =&gt; 106,3,NoOp(${FUM}) &lt;/span&gt;&lt;br /&gt;&lt;br /&gt;results in&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: monospace;"&gt;   — Executing SetVar("SIP/oberon-365e", "FEE=fee") in new stack &lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: monospace;"&gt;   — Executing SetVar("SIP/oberon-365e", "_FIE=fie") in new stack &lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: monospace;"&gt;   — Executing SetVar("SIP/oberon-365e", "__FUM=fum") in new stack &lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: monospace;"&gt;   — Executing Dial("SIP/oberon-365e", "Local/105") in new stack &lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: monospace;"&gt;   — Called 105 &lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: monospace;"&gt;   — Executing NoOp("Local/105@default-7263,2", "") in new stack &lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: monospace;"&gt;   — Executing NoOp("Local/105@default-7263,2", "fie") in new stack &lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: monospace;"&gt;   — Executing NoOp("Local/105@default-7263,2", "fum") in new stack &lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: monospace;"&gt;   — Executing Dial("Local/105@default-7263,2", "Local/106") in new stack &lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: monospace;"&gt;   — Called 106 &lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: monospace;"&gt;   — Executing NoOp("Local/106@default-49be,2", "") in new stack &lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: monospace;"&gt;   — Executing NoOp("Local/106@default-49be,2", "") in new stack &lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: monospace;"&gt;   — Executing NoOp("Local/106@default-49be,2", "fum") in new stack &lt;/span&gt;&lt;br /&gt;&lt;br /&gt;(This did not work correctly prior to the 1.2 release.)&lt;br /&gt;&lt;br /&gt;&lt;h2 id="Using"&gt;Using $ &lt;/h2&gt;If you want to set a global variable containing the another variable name in the [globals] category of &lt;a title="Asterisk config extensions.conf" href="http://www.voip-info.org/wiki/view/Asterisk+config+extensions.conf"&gt;extensions.conf&lt;/a&gt; you have to do something like this:&lt;br /&gt;&lt;br /&gt;[globals] &lt;br /&gt;SS=$&lt;br /&gt;MY_VAR=${SS}{EPOCH}-${SS}{EXTEN}.gsm&lt;br /&gt;&lt;br /&gt;This way the MY_VAR value is ${EPOCH}-${EXTEN}.gsm&lt;br /&gt;&lt;br /&gt;Using it with the EVAL() function is very useful. I.e. if you want to record you can do this: &lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: monospace;"&gt;   exten =&gt; 104,1,SetVar(file=${EVAL(${MY_VAR})}) &lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: monospace;"&gt;   exten =&gt; 104,2,MixMonitor($The attachment id given is not valid.) &lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;h1 id="PredefinedChannelVariables"&gt;Predefined Channel Variables &lt;/h1&gt;There are some channel variables set by Asterisk that you can refer to in your dialplan definitions. Asterisk-defined variables, in contrast to user-defined variables, are case sensitive. &lt;strong&gt;Note&lt;/strong&gt;: Several of these builtin variables have been converted to functions in 1.2, to allow setting their values.&lt;br /&gt;&lt;ul&gt;&lt;li&gt;&lt;strong&gt;${ACCOUNTCODE}&lt;/strong&gt;:  Account code, if specified - see &lt;a title="Asterisk billing" href="http://www.voip-info.org/wiki/view/Asterisk+billing"&gt;Asterisk billing&lt;/a&gt; &lt;span style="color: green;"&gt;(DEPRECATED in 1.2.0 and removed in 1.4. Use ${CDR(accountcode)}&lt;/span&gt; &lt;/li&gt;&lt;li&gt;&lt;strong&gt;${ANSWEREDTIME}&lt;/strong&gt;:  This is the amount of time(in seconds) for actual call. &lt;/li&gt;&lt;li&gt;&lt;strong&gt;${BLINDTRANSFER}&lt;/strong&gt;: The active SIP channel that dialed the number. This will return the SIP Channel that dialed the number when doing blind transfers - see &lt;a title="BLINDTRANSFER" href="http://www.voip-info.org/wiki/view/BLINDTRANSFER"&gt;BLINDTRANSFER&lt;/a&gt; &lt;/li&gt;&lt;li&gt;&lt;strong&gt;${CALLERID(all)}&lt;/strong&gt;: The current Caller ID name and number - See &lt;a title="Setting Callerid" href="http://www.voip-info.org/wiki/view/Setting+Callerid"&gt;Setting Callerid&lt;/a&gt; for usage in Asterisk 1.4 &lt;/li&gt;&lt;li&gt;&lt;strong&gt;${CALLERID(name)}&lt;/strong&gt;: The current Caller ID name - &lt;span style="color: green;"&gt;&lt;strong&gt;${CALLERIDNAME}&lt;/strong&gt; was used in versions of Asterisk prior to 1.2.0, it was DEPRECATED in 1.2.0 and removed in 1.4.&lt;/span&gt; &lt;/li&gt;&lt;li&gt;&lt;strong&gt;${CALLERID(num)}&lt;/strong&gt;: The current Caller ID number - &lt;span style="color: green;"&gt;&lt;strong&gt;${CALLERIDNUM}&lt;/strong&gt; was used in versions of Asterisk prior to 1.2.0, it was DEPRECATED in 1.2.0 and removed in 1.4.&lt;/span&gt; &lt;/li&gt;&lt;/ul&gt;&lt;span style="color: blue;"&gt;(Note: this is not necessarily numeric as the name would indicate and can legitimately contain the space character. Commands acting on this variable (such as 'GotoIf', for example) should be aware of this).&lt;/span&gt;&lt;br /&gt;&lt;ul&gt;&lt;li&gt;&lt;strong&gt;${CALLINGPRES}&lt;/strong&gt;: PRI Call ID Presentation variable for incoming calls (See &lt;a title="Asterisk cmd CallingPres" href="http://www.voip-info.org/wiki/view/Asterisk+cmd+CallingPres"&gt;callingpres&lt;/a&gt; ) &lt;/li&gt;&lt;li&gt;&lt;strong&gt;${CHANNEL}&lt;/strong&gt;: Current channel name  &lt;/li&gt;&lt;li&gt;&lt;strong&gt;${CONTEXT}&lt;/strong&gt;: The name of the current context &lt;/li&gt;&lt;li&gt;&lt;strong&gt;${DATETIME}&lt;/strong&gt;: Current date time in the format: DDMMYYYY-HH:MM:SS &lt;strong&gt;This is deprecated in Asterisk 1.2&lt;/strong&gt;, instead use :${STRFTIME(${EPOCH},,%d%m&lt;span class="dynavar" style="display: inline;" id="dyn_Y-_display"&gt;NaV&lt;/span&gt;H:&lt;span class="dynavar" style="display: inline;" id="dyn_M:_display"&gt;NaV&lt;/span&gt;S)}) &lt;/li&gt;&lt;li&gt;&lt;strong&gt;${DIALEDPEERNAME}&lt;/strong&gt;:  Name of the called party. Broken for now, see &lt;a title="DIALEDPEERNAME" href="http://www.voip-info.org/wiki/view/DIALEDPEERNAME"&gt;DIALEDPEERNAME&lt;/a&gt; &lt;/li&gt;&lt;li&gt;&lt;strong&gt;${DIALEDPEERNUMBER}&lt;/strong&gt;:  Number of the called party. Broken for now, see &lt;a title="DIALEDPEERNUMBER" href="http://www.voip-info.org/wiki/view/DIALEDPEERNUMBER"&gt;DIALEDPEERNUMBER&lt;/a&gt; &lt;/li&gt;&lt;li&gt;&lt;strong&gt;${DIALEDTIME}&lt;/strong&gt;:  Time since the number was dialed (only works when dialed party answers the line?!) &lt;/li&gt;&lt;li&gt;&lt;strong&gt;${DIALSTATUS}&lt;/strong&gt;:  Status of the call. See &lt;a title="DIALSTATUS" href="http://www.voip-info.org/wiki/view/DIALSTATUS"&gt;DIALSTATUS&lt;/a&gt; &lt;span style="color: blue;"&gt;(note: In the current SVN release, DIALSTATUS seems to have been removed. Now you should use the DEVSTATE function. Try in astersisk console "core show function DEVSTATE" for more informations)&lt;/span&gt; &lt;/li&gt;&lt;li&gt;&lt;strong&gt;${DNID}&lt;/strong&gt;:  Dialed Number Identifier. Limitations apply, see &lt;a title="DNID" href="http://www.voip-info.org/wiki/view/DNID"&gt;DNID&lt;/a&gt; &lt;/li&gt;&lt;li&gt;&lt;strong&gt;${EPOCH}&lt;/strong&gt;: The current UNIX-style epoch (number of seconds since 1 Jan 1970) &lt;/li&gt;&lt;li&gt;&lt;strong&gt;${EXTEN}&lt;/strong&gt;: The current extension &lt;/li&gt;&lt;li&gt;&lt;strong&gt;${&lt;a title="Asterisk variable hangupcause" href="http://www.voip-info.org/wiki/view/Asterisk+variable+hangupcause"&gt;HANGUPCAUSE&lt;/a&gt;}&lt;/strong&gt;: The last hangup return code on a Zap channel connected to a PRI interface &lt;/li&gt;&lt;li&gt;&lt;strong&gt;${INVALID_EXTEN}&lt;/strong&gt;: The extension asked for when redirected to the &lt;a title="Asterisk i extension" href="http://www.voip-info.org/wiki/view/Asterisk+i+extension"&gt;i&lt;/a&gt; (invalid) extension &lt;/li&gt;&lt;li&gt;&lt;strong&gt;${LANGUAGE}&lt;/strong&gt;: The current language setting. See &lt;a title="Asterisk multi-language" href="http://www.voip-info.org/wiki/view/Asterisk+multi-language"&gt;Asterisk multi-language&lt;/a&gt; &lt;/li&gt;&lt;li&gt;&lt;strong&gt;${MEETMESECS}&lt;/strong&gt;:  Number of seconds a user participated in a MeetMe conference &lt;/li&gt;&lt;li&gt;&lt;strong&gt;${PRIORITY}&lt;/strong&gt;: The current priority &lt;/li&gt;&lt;li&gt;&lt;strong&gt;${RDNIS}&lt;/strong&gt;: The current redirecting &lt;a title="DNIS" href="http://www.voip-info.org/wiki/view/DNIS"&gt;DNIS&lt;/a&gt;, Caller ID that redirected the call. Limitations apply, see &lt;a title="RDNIS" href="http://www.voip-info.org/wiki/view/RDNIS"&gt;RDNIS&lt;/a&gt; &lt;/li&gt;&lt;li&gt;&lt;strong&gt;${SIPDOMAIN}&lt;/strong&gt;: SIP destination domain of an inbound call (if appropriate) &lt;/li&gt;&lt;li&gt;&lt;strong&gt;${SIP_CODEC}&lt;/strong&gt;: Used to set the SIP codec for a call (&lt;a class="external" onclick="javascript: pageTracker._trackPageview('/outgoing/wikipages/bugs.digium.com/bug_view_page.php' );" href="http://bugs.digium.com/bug_view_page.php?bug_id=0000450"&gt;apparently broken in Ver 1.0.1&lt;/a&gt;, ok in Ver. 1.0.3 &amp;amp; 1.0.4, not sure about 1.0.2) &lt;/li&gt;&lt;li&gt;&lt;strong&gt;${SIPCALLID}&lt;/strong&gt;: The SIP dialog Call-ID: header &lt;/li&gt;&lt;li&gt;&lt;strong&gt;${SIPUSERAGENT}&lt;/strong&gt;: The SIP user agent header &lt;/li&gt;&lt;li&gt;&lt;strong&gt;${TIMESTAMP}&lt;/strong&gt;: Current date time in the format: YYYYMMDD-HHMMSS   &lt;strong&gt;This is deprecated as of Asterisk 1.4&lt;/strong&gt;, instead use :${STRFTIME(${EPOCH},,%Y%m%d-%H%M%S)}) &lt;/li&gt;&lt;li&gt;&lt;strong&gt;${TRANSFERCAPABILITY}&lt;/strong&gt;: Type of Channel &lt;/li&gt;&lt;li&gt;&lt;strong&gt;${TXTCIDNAME}&lt;/strong&gt;:  Result of application TXTCIDName (see below) &lt;/li&gt;&lt;li&gt;&lt;strong&gt;${UNIQUEID}&lt;/strong&gt;:  Current call unique identifier &lt;/li&gt;&lt;li&gt;&lt;strong&gt;${TOUCH_MONITOR}&lt;/strong&gt;: used for "one touch record" (see features.conf, and wW dial flags). If is set on either side of the call then that var contains the app_args for app_monitor otherwise the default of WAV||m is used &lt;/li&gt;&lt;/ul&gt;&lt;br /&gt;&lt;h3 id="Applicationspecificvariables"&gt;Application-specific variables &lt;/h3&gt;Some applications take extra input or provide output using channel variables.&lt;br /&gt;&lt;ul&gt;&lt;li&gt; &lt;a title="Asterisk cmd AgentCallbackLogin" href="http://www.voip-info.org/wiki/view/Asterisk+cmd+AgentCallbackLogin"&gt;AgentCallbackLogin&lt;/a&gt; returns &lt;strong&gt;${AGENTBYCALLERID_${CALLERID}}&lt;/strong&gt;: The ID of the agent successfully logged on. &lt;/li&gt;&lt;li&gt;&lt;a title="Asterisk cmd ChanIsAvail" href="http://www.voip-info.org/wiki/view/Asterisk+cmd+ChanIsAvail"&gt;ChanIsAvail&lt;/a&gt; returns &lt;strong&gt;${AVAILCHAN}&lt;/strong&gt;: The first available channel &lt;/li&gt;&lt;li&gt;&lt;a title="Asterisk cmd Dial" href="http://www.voip-info.org/wiki/view/Asterisk+cmd+Dial"&gt;Dial&lt;/a&gt; takes input from &lt;strong&gt;${VXML_URL}&lt;/strong&gt;: Send XML Url to Cisco 7960 or to i6net VoiceXML browser &lt;/li&gt;&lt;li&gt;&lt;a title="Asterisk cmd Dial" href="http://www.voip-info.org/wiki/view/Asterisk+cmd+Dial"&gt;Dial&lt;/a&gt; takes input from &lt;strong&gt;${ALERT_INFO}&lt;/strong&gt;: Set ring cadence or allow intercom on for various SIP phones &lt;/li&gt;&lt;li&gt;&lt;a title="Asterisk cmd Dial" href="http://www.voip-info.org/wiki/view/Asterisk+cmd+Dial"&gt;Dial&lt;/a&gt; returns &lt;strong&gt;${CAUSECODE}&lt;/strong&gt;: If the dial failed, this is the errormessage &lt;/li&gt;&lt;li&gt;&lt;a title="Asterisk cmd Dial" href="http://www.voip-info.org/wiki/view/Asterisk+cmd+Dial"&gt;Dial&lt;/a&gt; returns &lt;strong&gt;${&lt;a title="Asterisk variable DIALSTATUS" href="http://www.voip-info.org/wiki/view/Asterisk+variable+DIALSTATUS"&gt;DIALSTATUS&lt;/a&gt;}&lt;/strong&gt;: Text code returning status of last dial attempt. &lt;/li&gt;&lt;li&gt;&lt;a title="Asterisk cmd Dial" href="http://www.voip-info.org/wiki/view/Asterisk+cmd+Dial"&gt;Dial&lt;/a&gt; takes input from &lt;strong&gt;${TRANSFER_CONTEXT}&lt;/strong&gt;: If this variable exists, when a #transfer is executed it goes to the selected extension on this context. &lt;/li&gt;&lt;li&gt; &lt;a title="Asterisk cmd EnumLookup" href="http://www.voip-info.org/wiki/view/Asterisk+cmd+EnumLookup"&gt;EnumLookup&lt;/a&gt; returns &lt;strong&gt;${ENUM}&lt;/strong&gt;: The result of the lookup &lt;/li&gt;&lt;li&gt; &lt;a title="Asterisk cmd Hangup" href="http://www.voip-info.org/wiki/view/Asterisk+cmd+Hangup"&gt;Hangup&lt;/a&gt; reads the &lt;strong&gt;${&lt;a title="Asterisk variable PRI_CAUSE" href="http://www.voip-info.org/wiki/view/Asterisk+variable+PRI_CAUSE"&gt;PRI_CAUSE&lt;/a&gt;}&lt;/strong&gt; variable for setting PRI return codes &lt;/li&gt;&lt;li&gt;&lt;a title="Asterisk cmd MeetMe" href="http://www.voip-info.org/wiki/view/Asterisk+cmd+MeetMe"&gt;MeetMe&lt;/a&gt; takes input from &lt;strong&gt;{MEETME_AGI_BACKGROUND}&lt;/strong&gt;: An AGI script to run &lt;/li&gt;&lt;li&gt;&lt;a title="Asterisk cmd MeetMe" href="http://www.voip-info.org/wiki/view/Asterisk+cmd+MeetMe"&gt;MeetMe&lt;/a&gt; returns &lt;strong&gt;${MEETMESECS}&lt;/strong&gt;: The number of seconds the user was in a conference &lt;/li&gt;&lt;li&gt;&lt;a title="Asterisk cmd Playback" href="http://www.voip-info.org/wiki/view/Asterisk+cmd+Playback"&gt;Playback&lt;/a&gt; returns &lt;strong&gt;${PLAYBACKSTATUS}&lt;/strong&gt;: The status of the command (FAILED|SUCCESS) &lt;/li&gt;&lt;li&gt; &lt;a title="Asterisk cmd Queue" href="http://www.voip-info.org/wiki/view/Asterisk+cmd+Queue"&gt;Queue&lt;/a&gt; returns &lt;strong&gt;${QUEUESTATUS}&lt;/strong&gt;: The reason for popping the call out of the queue &lt;/li&gt;&lt;li&gt; &lt;a title="Asterisk cmd TXTCIDName" href="http://www.voip-info.org/wiki/view/Asterisk+cmd+TXTCIDName"&gt;TXTCIDName&lt;/a&gt; returns &lt;strong&gt;${TXTCIDNAME}&lt;/strong&gt;: The result of the DNS lookup &lt;/li&gt;&lt;li&gt; &lt;a title="Asterisk cmd VoiceMail" href="http://www.voip-info.org/wiki/view/Asterisk+cmd+VoiceMail"&gt;VoiceMail&lt;/a&gt; returns &lt;strong&gt;${VMSTATUS}&lt;/strong&gt;: indicates the status of the execution of the VoiceMail application. Possible values are: SUCCESS | USEREXIT | FAILED . &lt;/li&gt;&lt;/ul&gt;&lt;br /&gt;&lt;h3 id="Macrospecificvariables"&gt;Macro-specific variables &lt;/h3&gt;When in a &lt;a title="Asterisk cmd Macro" href="http://www.voip-info.org/wiki/view/Asterisk+cmd+Macro"&gt;macro context&lt;/a&gt;, extra channel variables are available.&lt;br /&gt;&lt;ul&gt;&lt;li&gt;${ARG1}: The first argument passed to the macro &lt;/li&gt;&lt;li&gt;${ARG2}: The second argument passed to the macro (&lt;em&gt;and so on&lt;/em&gt;) &lt;/li&gt;&lt;li&gt;${MACRO_CONTEXT}: The context of the extension that triggered this macro &lt;/li&gt;&lt;li&gt;${MACRO_EXTEN}: The extension that triggered this macro &lt;/li&gt;&lt;li&gt;${MACRO_OFFSET}: Set by a macro to influence the priority where execution will continue after exiting the macro &lt;/li&gt;&lt;li&gt;${MACRO_PRIORITY}: The priority in the extension where this macro was triggered &lt;/li&gt;&lt;/ul&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;h2 id="EnvironmentVariables"&gt;Environment Variables &lt;/h2&gt;You may access unix environment variables using the syntax:&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: monospace;"&gt;   ${ENV(&lt;em&gt;foo&lt;/em&gt;)} &lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;ul&gt;&lt;li&gt;&lt;strong&gt;${ENV(ASTERISK_PROMPT)}&lt;/strong&gt;: the current Asterisk &lt;a title="Asterisk CLI prompt" href="http://www.voip-info.org/wiki/view/Asterisk+CLI+prompt"&gt;CLI prompt&lt;/a&gt;.  &lt;/li&gt;&lt;li&gt; &lt;strong&gt;${ENV(RECORDED_FILE)}&lt;/strong&gt;: the filename of the last file saved by the &lt;a title="Asterisk cmd Record" href="http://www.voip-info.org/wiki/view/Asterisk+cmd+Record"&gt;Record&lt;/a&gt; command (available in CVS &gt; 2004-03-21) &lt;/li&gt;&lt;/ul&gt;&lt;br /&gt;&lt;h1 id="StringHandlingFunctions"&gt;String Handling Functions &lt;/h1&gt;&lt;h2 id="StringLength"&gt;String Length &lt;/h2&gt;&lt;br /&gt;&lt;span style="font-family: monospace;"&gt;   ${LEN(foo)} &lt;/span&gt;&lt;br /&gt;&lt;br /&gt;returns the length of the string &lt;em&gt;foo&lt;/em&gt;. For example,&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: monospace;"&gt;   exten =&gt; 100,1,SetVar(Fruit=pear) &lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: monospace;"&gt;   exten =&gt; 100,2,NoOp(${LEN(Fruit)}) &lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: monospace;"&gt;   exten =&gt; 100,3,NoOp(${LEN(${Fruit})}) &lt;/span&gt;&lt;br /&gt;&lt;br /&gt;The first NoOp would show a value of 5 (the length of the string "fruit"). The second NoOp would show a value of 4 (the length of the string "pear").&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;This is an excellent way to check for a NULL or empty string.&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;&lt;h2 id="Substrings"&gt;Substrings &lt;/h2&gt;&lt;span style="font-family: monospace;"&gt;   ${foo:&lt;em&gt;offset&lt;/em&gt;:&lt;em&gt;length&lt;/em&gt;} &lt;/span&gt;&lt;br /&gt;&lt;br /&gt;returns a substring of the string &lt;em&gt;foo&lt;/em&gt;, beginning at offset &lt;em&gt;offset&lt;/em&gt; and returning the next &lt;em&gt;length&lt;/em&gt; characters. The first character is at offset 0.&lt;br /&gt;&lt;ul&gt;&lt;li&gt;If &lt;em&gt;offset&lt;/em&gt; is negative, it is taken leftwards from the right hand end of the string. &lt;/li&gt;&lt;li&gt;If &lt;em&gt;length&lt;/em&gt; is omitted or is negative, then all the rest of the string beginning at &lt;em&gt;offset&lt;/em&gt; is returned. &lt;/li&gt;&lt;/ul&gt;&lt;br /&gt;Examples:&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: monospace;"&gt;   ${123456789:1}        - returns the string 23456789 &lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: monospace;"&gt;   ${123456789:-4}       - returns the string 6789 &lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: monospace;"&gt;   ${123456789:0:3}      - returns the string 123 &lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: monospace;"&gt;   ${123456789:2:3}      - returns the string 345 &lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: monospace;"&gt;   ${123456789:-4:3}     - returns the string 678 &lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Examples of use:&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: monospace;"&gt;   exten =&gt; _NXX.,1,SetVar(areacode=${EXTEN:0:3})   - get the first 3 digits of ${EXTEN} &lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: monospace;"&gt;   exten =&gt; _516XXXXXXX,1,Dial(${EXTEN:3})          - get all but the first 3 digits of ${EXTEN} &lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: monospace;"&gt;   exten =&gt; 100,1,SetVar(whichVowel=4) &lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: monospace;"&gt;   exten =&gt; 100,2,SetVar(foo=AEIOU:${whichVowel}:1) - sets ${foo} to the single letter 'U' &lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;h2 id="StringConcatenation"&gt;String Concatenation &lt;/h2&gt;To concatenate two strings, simply write them together:&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: monospace;"&gt;   ${foo}${bar} &lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: monospace;"&gt;   555${theNumber} &lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: monospace;"&gt;   ${longDistancePrefix}555${theNumber} &lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;h2 id="Variablemath"&gt; Variable math &lt;/h2&gt;To perform math on variables e.g. increment, multiplication, addition simply write:&lt;br /&gt;&lt;br /&gt;exten =&gt; s,1,SetVar(SOMEVAR=$[${SOMEVAR} + 1])  ; increment&lt;br /&gt;exten =&gt; s,2,SetVar(SOMEVAR=$[2 * ${SOMEVAR}]) ; multiplication etc...&lt;br /&gt;&lt;strong&gt;In times past, a single space was required between items in the $[...] expressions. This is no longer the case! &lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;In late model Asterisks (1.2?), the MATH function is also available...&lt;br /&gt;&lt;br /&gt;exten =&gt; s,1,Set(SOMEVAR=${MATH(${SOMEVAR}+1)})  ; increment&lt;br /&gt;exten =&gt; s,2,Set(SOMEVAR=${MATH(2*${SOMEVAR})}) ; multiplication etc...&lt;div class="blogger-post-footer"&gt;akdayal@yahoo.com&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1818419888217740295-4491894138623828472?l=ananddayal.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ananddayal.blogspot.com/feeds/4491894138623828472/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1818419888217740295&amp;postID=4491894138623828472' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1818419888217740295/posts/default/4491894138623828472'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1818419888217740295/posts/default/4491894138623828472'/><link rel='alternate' type='text/html' href='http://ananddayal.blogspot.com/2008/08/asterisk-variables.html' title='Asterisk variables'/><author><name>Anand Kumar Dayal</name><uri>http://www.blogger.com/profile/15821949256334333875</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://bp2.blogger.com/_X_AIQvaR6X4/SJGDCYgSLAI/AAAAAAAADcI/tod2zTuEQCw/S220/PIC-AD-257(2).jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1818419888217740295.post-3476306711574215552</id><published>2008-08-05T00:34:00.000-07:00</published><updated>2008-08-05T00:43:02.064-07:00</updated><title type='text'>Asterisk functions</title><content type='html'>Asterisk functions are used in &lt;a title="Asterisk" href="http://www.voip-info.org/wiki/view/Asterisk"&gt;Asterisk&lt;/a&gt;'s &lt;a title="Asterisk config extensions.conf" href="http://www.voip-info.org/wiki/view/Asterisk+config+extensions.conf"&gt;dialplan&lt;/a&gt;. Unlike &lt;a title="Asterisk - documentation of application commands" href="http://www.voip-info.org/wiki/view/Asterisk+-+documentation+of+application+commands"&gt;dialplan applications&lt;/a&gt;, they cannot be used directly. Instead they return a value that could be used by the dialplan logic.&lt;br /&gt;&lt;br /&gt;Functions are new in 1.2. Some functions may be read from, others may be written to. Please note that several of the builtin variables (including ENV and LEN) have been converted to functions for 1.2.&lt;br /&gt;&lt;br /&gt;Functions in the below list are &lt;span style="color: red;"&gt;marked in red&lt;/span&gt; if they are only available in version 1.4 and higher. &lt;br /&gt;&lt;br /&gt;Functions in the below list are &lt;span style="color: blue;"&gt;marked in blue&lt;/span&gt; if they are only available in version 1.6 and higher.&lt;br /&gt;&lt;br /&gt;Function names by practice are all capitalzed letters. The names ARE CASE SENSITIVE!&lt;br /&gt;&lt;br /&gt;&lt;h2 id="FunctionList"&gt;Function List &lt;/h2&gt;&lt;ul&gt;&lt;li&gt; &lt;strong&gt;&lt;a title="Asterisk func agent" href="http://www.voip-info.org/wiki/view/Asterisk+func+agent"&gt;AGENT&lt;/a&gt;&lt;/strong&gt;: Gets information about an Agent &lt;/li&gt;&lt;li&gt; &lt;strong&gt;&lt;a title="Asterisk func array" href="http://www.voip-info.org/wiki/view/Asterisk+func+array"&gt;ARRAY&lt;/a&gt;&lt;/strong&gt;: &lt;span style="color: red;"&gt;Allows setting multiple variables at once&lt;/span&gt; &lt;/li&gt;&lt;li&gt; &lt;strong&gt;&lt;a title="Asterisk func base64_decode" href="http://www.voip-info.org/wiki/view/Asterisk+func+base64_decode"&gt;BASE64_DECODE&lt;/a&gt;&lt;/strong&gt;: &lt;span style="color: red;"&gt;Decode a base64 string&lt;/span&gt; &lt;/li&gt;&lt;li&gt; &lt;strong&gt;&lt;a title="Asterisk func base64_encode" href="http://www.voip-info.org/wiki/view/Asterisk+func+base64_encode"&gt;BASE64_ENCODE&lt;/a&gt;&lt;/strong&gt;: &lt;span style="color: red;"&gt;Encode a string into base64&lt;/span&gt; &lt;/li&gt;&lt;li&gt; &lt;strong&gt;&lt;a title="Asterisk func callerid" href="http://www.voip-info.org/wiki/view/Asterisk+func+callerid"&gt;CALLERID&lt;/a&gt;&lt;/strong&gt;: Get or set Caller*ID &lt;/li&gt;&lt;li&gt; &lt;strong&gt;&lt;a title="Asterisk func cdr" href="http://www.voip-info.org/wiki/view/Asterisk+func+cdr"&gt;CDR&lt;/a&gt;&lt;/strong&gt;: Get or set a CDR variable &lt;/li&gt;&lt;li&gt; &lt;strong&gt;&lt;a title="Asterisk func channel" href="http://www.voip-info.org/wiki/view/Asterisk+func+channel"&gt;CHANNEL&lt;/a&gt;&lt;/strong&gt;: Gets/sets various pieces of information about the channel. &lt;/li&gt;&lt;li&gt; &lt;strong&gt;&lt;a title="Asterisk func checksipdomain" href="http://www.voip-info.org/wiki/view/Asterisk+func+checksipdomain"&gt;CHECKSIPDOMAIN&lt;/a&gt;&lt;/strong&gt;: Checks if domain is a local domain &lt;/li&gt;&lt;li&gt; &lt;strong&gt;&lt;a title="Asterisk func check_md5" href="http://www.voip-info.org/wiki/view/Asterisk+func+check_md5"&gt;CHECK_MD5&lt;/a&gt;&lt;/strong&gt;: Checks an MD5 digest.  Deprecated in 1.4, since it can be done with an expression in combination with &lt;a title="Asterisk func md5" href="http://www.voip-info.org/wiki/view/Asterisk+func+md5"&gt;MD5&lt;/a&gt;. &lt;/li&gt;&lt;li&gt; &lt;strong&gt;Asterisk func clearhash&lt;/strong&gt;: New in 1.6 &lt;/li&gt;&lt;li&gt; &lt;strong&gt;&lt;a title="Asterisk func curl" href="http://www.voip-info.org/wiki/view/Asterisk+func+curl"&gt;CURL&lt;/a&gt;&lt;/strong&gt;: Retrieves a URL &lt;/li&gt;&lt;li&gt; &lt;strong&gt;&lt;a title="Asterisk func cut" href="http://www.voip-info.org/wiki/view/Asterisk+func+cut"&gt;CUT&lt;/a&gt;&lt;/strong&gt;: String parsing, based upon a delimiter &lt;/li&gt;&lt;li&gt; &lt;strong&gt;Asterisk func device_State)&lt;/strong&gt;: New in 1.6 &lt;span style="color: blue;"&gt;allows retrieving any device state in the dialplan, as well as creating custom device states that are controllable from the dialplan&lt;/span&gt; &lt;/li&gt;&lt;li&gt; &lt;strong&gt;&lt;a title="Asterisk func db" href="http://www.voip-info.org/wiki/view/Asterisk+func+db"&gt;DB&lt;/a&gt;&lt;/strong&gt;: Get or set a value in the AstDB &lt;/li&gt;&lt;li&gt; &lt;strong&gt;&lt;a title="Asterisk func DB_DELETE" href="http://www.voip-info.org/wiki/view/Asterisk+func+DB_DELETE"&gt;DB_DELETE&lt;/a&gt;&lt;/strong&gt;: Delete a value from the AstDB; replaces the &lt;a title="Asterisk cmd DBdel" href="http://www.voip-info.org/wiki/view/Asterisk+cmd+DBdel"&gt;DBDel&lt;/a&gt; application &lt;/li&gt;&lt;li&gt; &lt;strong&gt;&lt;a title="Asterisk func db_exists" href="http://www.voip-info.org/wiki/view/Asterisk+func+db_exists"&gt;DB_EXISTS&lt;/a&gt;&lt;/strong&gt;: Check to see if a key exists in the Asterisk database &lt;/li&gt;&lt;li&gt; &lt;strong&gt;&lt;a title="Asterisk func dialgroup" href="http://www.voip-info.org/wiki/view/Asterisk+func+dialgroup"&gt;DIALGROUP&lt;/a&gt;&lt;/strong&gt;: New in 1.6: Poor man's calling queue &lt;/li&gt;&lt;li&gt; &lt;strong&gt;Asterisk func dialplan_exists&lt;/strong&gt;: New in 1.6 &lt;span style="color: blue;"&gt;Check for the existence of a dialplan target &lt;/span&gt; &lt;/li&gt;&lt;li&gt; &lt;strong&gt;&lt;a title="Asterisk func dundilookup" href="http://www.voip-info.org/wiki/view/Asterisk+func+dundilookup"&gt;DUNDILOOKUP&lt;/a&gt;&lt;/strong&gt;: Do a DUNDi lookup of a phone number. &lt;/li&gt;&lt;li&gt; &lt;strong&gt;&lt;a title="Asterisk func enumlookup" href="http://www.voip-info.org/wiki/view/Asterisk+func+enumlookup"&gt;ENUMLOOKUP&lt;/a&gt;&lt;/strong&gt;: General or specific querying of NAPTR records or counts of NAPTR types for ENUM or ENUM-like DNS pointers &lt;/li&gt;&lt;li&gt; &lt;strong&gt;&lt;a title="Asterisk func env" href="http://www.voip-info.org/wiki/view/Asterisk+func+env"&gt;ENV&lt;/a&gt;&lt;/strong&gt;: Get or set an environmental variable &lt;/li&gt;&lt;li&gt; &lt;strong&gt;&lt;a title="Asterisk func eval" href="http://www.voip-info.org/wiki/view/Asterisk+func+eval"&gt;EVAL&lt;/a&gt;&lt;/strong&gt;: Evaluate stored variables. &lt;/li&gt;&lt;li&gt; &lt;strong&gt;&lt;a title="Asterisk func exists" href="http://www.voip-info.org/wiki/view/Asterisk+func+exists"&gt;EXISTS&lt;/a&gt;&lt;/strong&gt;: Existence Test: Returns 1 if exists, 0 otherwise &lt;/li&gt;&lt;li&gt; &lt;strong&gt;Asterisk func extension_state&lt;/strong&gt;: New in 1.6 &lt;span style="color: blue;"&gt;Allows retrieving the state of any extension &lt;/span&gt; &lt;/li&gt;&lt;li&gt; &lt;strong&gt;&lt;a title="Asterisk func fieldqty" href="http://www.voip-info.org/wiki/view/Asterisk+func+fieldqty"&gt;FIELDQTY&lt;/a&gt;&lt;/strong&gt;: Get the number of fields, based upon a delimiter &lt;/li&gt;&lt;li&gt; &lt;strong&gt;&lt;a title="Asterisk func filter" href="http://www.voip-info.org/wiki/view/Asterisk+func+filter"&gt;FILTER&lt;/a&gt;&lt;/strong&gt;: &lt;span style="color: red;"&gt;Filter the string to include only the allowed characters&lt;/span&gt; &lt;/li&gt;&lt;li&gt; &lt;strong&gt;&lt;a title="Asterisk func group" href="http://www.voip-info.org/wiki/view/Asterisk+func+group"&gt;GROUP&lt;/a&gt;&lt;/strong&gt;: Can also return the name of the group set on a channel when used in a read environment &lt;/li&gt;&lt;li&gt; &lt;strong&gt;&lt;a title="Asterisk func group_count" href="http://www.voip-info.org/wiki/view/Asterisk+func+group_count"&gt;GROUP_COUNT&lt;/a&gt;&lt;/strong&gt;: Counts the number of channels in the specified group &lt;/li&gt;&lt;li&gt; &lt;strong&gt;&lt;a title="Asterisk func group_list" href="http://www.voip-info.org/wiki/view/Asterisk+func+group_list"&gt;GROUP_LIST&lt;/a&gt;&lt;/strong&gt;: Returns a space separated list of all of the groups set on a channel &lt;/li&gt;&lt;li&gt; &lt;strong&gt;&lt;a title="Asterisk func group_match_count" href="http://www.voip-info.org/wiki/view/Asterisk+func+group_match_count"&gt;GROUP_MATCH_COUNT&lt;/a&gt;&lt;/strong&gt;: Counts the number of channels in the groups matching the specified pattern &lt;/li&gt;&lt;li&gt; &lt;strong&gt;&lt;a title="Asterisk func hash" href="http://www.voip-info.org/wiki/view/Asterisk+func+hash"&gt;HASH&lt;/a&gt;&lt;/strong&gt;: New in 1.6 &lt;/li&gt;&lt;li&gt; &lt;strong&gt;Asterisk func hashkeys&lt;/strong&gt;: New in 1.6 &lt;/li&gt;&lt;li&gt; &lt;strong&gt;Asterisk func hint&lt;/strong&gt;: New in 1.6 &lt;span style="color: blue;"&gt;Allows retrieving hint information&lt;/span&gt; &lt;/li&gt;&lt;li&gt; &lt;strong&gt;&lt;a title="Asterisk func iaxpeer" href="http://www.voip-info.org/wiki/view/Asterisk+func+iaxpeer"&gt;IAXPEER&lt;/a&gt;&lt;/strong&gt;: Gets IAX peer information &lt;/li&gt;&lt;li&gt; &lt;strong&gt;Asterisk func iaxvar&lt;/strong&gt;: Pass variables over IAX channels, somewhat similar to SIPADDHEADER() and SIP_HEADER() &lt;/li&gt;&lt;li&gt; &lt;strong&gt;&lt;a title="Asterisk func if" href="http://www.voip-info.org/wiki/view/Asterisk+func+if"&gt;IF&lt;/a&gt;&lt;/strong&gt;: Conditional: Returns the data following '?' if true else the data following ':' &lt;/li&gt;&lt;li&gt; &lt;strong&gt;&lt;a title="Asterisk func iftime" href="http://www.voip-info.org/wiki/view/Asterisk+func+iftime"&gt;IFTIME&lt;/a&gt;&lt;/strong&gt;: Temporal Conditional: Returns the data following '?' if true else the data following ':' &lt;/li&gt;&lt;li&gt; &lt;strong&gt;&lt;a title="Asterisk func isnull" href="http://www.voip-info.org/wiki/view/Asterisk+func+isnull"&gt;ISNULL&lt;/a&gt;&lt;/strong&gt;: NULL Test: Returns 1 if NULL or 0 otherwise &lt;/li&gt;&lt;li&gt; &lt;strong&gt;&lt;a title="Asterisk func keypadhash" href="http://www.voip-info.org/wiki/view/Asterisk+func+keypadhash"&gt;KEYPADHASH&lt;/a&gt;&lt;/strong&gt;: Hash the letters in the string into the equivalent keypad numbers. &lt;/li&gt;&lt;li&gt; &lt;strong&gt;&lt;a title="Asterisk func language" href="http://www.voip-info.org/wiki/view/Asterisk+func+language"&gt;LANGUAGE&lt;/a&gt;&lt;/strong&gt;: Get or set the channel's language &lt;/li&gt;&lt;li&gt; &lt;strong&gt;&lt;a title="Asterisk func len" href="http://www.voip-info.org/wiki/view/Asterisk+func+len"&gt;LEN&lt;/a&gt;&lt;/strong&gt;: Get the length of an arbitrary string &lt;/li&gt;&lt;li&gt; &lt;strong&gt;&lt;a title="Asterisk func math" href="http://www.voip-info.org/wiki/view/Asterisk+func+math"&gt;MATH&lt;/a&gt;&lt;/strong&gt;: Performs Mathematical Functions &lt;/li&gt;&lt;li&gt; &lt;strong&gt;&lt;a title="Asterisk func md5" href="http://www.voip-info.org/wiki/view/Asterisk+func+md5"&gt;MD5&lt;/a&gt;&lt;/strong&gt;: Computes an MD5 digest &lt;/li&gt;&lt;li&gt; &lt;strong&gt;&lt;a title="Asterisk func musicclass" href="http://www.voip-info.org/wiki/view/Asterisk+func+musicclass"&gt;MUSICCLASS&lt;/a&gt;&lt;/strong&gt;: Get or set the MusicOnHold class &lt;/li&gt;&lt;li&gt; &lt;strong&gt;&lt;a title="Asterisk func func_odbc" href="http://www.voip-info.org/wiki/view/Asterisk+func+func_odbc"&gt;ODBC&lt;/a&gt;&lt;/strong&gt;: Generic database access/queries using ODBC &lt;/li&gt;&lt;li&gt; &lt;strong&gt;&lt;a title="Asterisk func queueagentcount" href="http://www.voip-info.org/wiki/view/Asterisk+func+queueagentcount"&gt;QUEUEAGENTCOUNT&lt;/a&gt;&lt;/strong&gt;: Gets the number of members  currently listening on a queue.  Deprecated in favor of &lt;a title="Asterisk func queue_member_count" href="http://www.voip-info.org/wiki/view/Asterisk+func+queue_member_count"&gt;QUEUE_MEMBER_COUNT&lt;/a&gt;. &lt;/li&gt;&lt;li&gt; &lt;strong&gt;&lt;a title="Asterisk func queue_member_count" href="http://www.voip-info.org/wiki/view/Asterisk+func+queue_member_count"&gt;QUEUE_MEMBER_COUNT&lt;/a&gt;&lt;/strong&gt;: Count number of members answering a queue &lt;/li&gt;&lt;li&gt; &lt;strong&gt;&lt;a title="Asterisk func queue_member_list" href="http://www.voip-info.org/wiki/view/Asterisk+func+queue_member_list"&gt;QUEUE_MEMBER_LIST&lt;/a&gt;&lt;/strong&gt;: Returns a list of interfaces on a queue &lt;/li&gt;&lt;li&gt; &lt;strong&gt;&lt;a title="Asterisk func quote" href="http://www.voip-info.org/wiki/view/Asterisk+func+quote"&gt;QUOTE&lt;/a&gt;&lt;/strong&gt;: Quotes a given string, escaping embedded quotes as necessary &lt;/li&gt;&lt;li&gt; &lt;strong&gt;&lt;a title="Asterisk func rand" href="http://www.voip-info.org/wiki/view/Asterisk+func+rand"&gt;RAND&lt;/a&gt;&lt;/strong&gt;: &lt;span style="color: red;"&gt;Choose a random number in a range&lt;/span&gt; &lt;/li&gt;&lt;li&gt; &lt;strong&gt;&lt;a title="Asterisk func realtime" href="http://www.voip-info.org/wiki/view/Asterisk+func+realtime"&gt;REALTIME&lt;/a&gt;&lt;/strong&gt;: &lt;span style="color: red;"&gt;This function will read or write values from/to a RealTime repository.&lt;/span&gt; &lt;/li&gt;&lt;li&gt; &lt;strong&gt;&lt;a title="Asterisk func regex" href="http://www.voip-info.org/wiki/view/Asterisk+func+regex"&gt;REGEX&lt;/a&gt;&lt;/strong&gt;: Regular Expression: Returns 1 if data matches regular expression. &lt;/li&gt;&lt;li&gt; &lt;strong&gt;&lt;a title="Asterisk func set" href="http://www.voip-info.org/wiki/view/Asterisk+func+set"&gt;SET&lt;/a&gt;&lt;/strong&gt;: SET assigns a value to a channel variable &lt;/li&gt;&lt;li&gt; &lt;strong&gt;&lt;a title="Asterisk func sha1" href="http://www.voip-info.org/wiki/view/Asterisk+func+sha1"&gt;SHA1&lt;/a&gt;&lt;/strong&gt;: Computes a SHA1 digest &lt;/li&gt;&lt;li&gt; &lt;strong&gt;&lt;a title="Asterisk func sipchaninfo" href="http://www.voip-info.org/wiki/view/Asterisk+func+sipchaninfo"&gt;SIPCHANINFO&lt;/a&gt;&lt;/strong&gt;: Gets the specified SIP parameter from the current channel &lt;/li&gt;&lt;li&gt; &lt;strong&gt;&lt;a title="Asterisk func sippeer" href="http://www.voip-info.org/wiki/view/Asterisk+func+sippeer"&gt;SIPPEER&lt;/a&gt;&lt;/strong&gt;: Gets SIP peer information &lt;/li&gt;&lt;li&gt; &lt;strong&gt;Asterisk func SIPAddHeader&lt;/strong&gt;: Typically used to set Alert-Info information, e.g. ring tone .wav files &lt;/li&gt;&lt;li&gt; &lt;strong&gt;&lt;a title="Asterisk func sip_header" href="http://www.voip-info.org/wiki/view/Asterisk+func+sip_header"&gt;SIP_HEADER&lt;/a&gt;&lt;/strong&gt;: Gets or sets the specified SIP header &lt;/li&gt;&lt;li&gt; &lt;strong&gt;&lt;a title="Asterisk func sort" href="http://www.voip-info.org/wiki/view/Asterisk+func+sort"&gt;SORT&lt;/a&gt;&lt;/strong&gt;: Sorts a list of keys and values into a list of keys &lt;/li&gt;&lt;li&gt; &lt;strong&gt;&lt;a title="Asterisk func sql_esc" href="http://www.voip-info.org/wiki/view/Asterisk+func+sql_esc"&gt;SQL_ESC&lt;/a&gt;&lt;/strong&gt;: Escapes a value for inclusion in an SQL call (prevent injection attacks). &lt;/li&gt;&lt;li&gt; &lt;strong&gt;&lt;a title="Asterisk func stat" href="http://www.voip-info.org/wiki/view/Asterisk+func+stat"&gt;STAT&lt;/a&gt;&lt;/strong&gt;: &lt;span style="color: red;"&gt;Does a check on the specified file&lt;/span&gt; &lt;/li&gt;&lt;li&gt; &lt;strong&gt;&lt;a title="Asterisk func strftime" href="http://www.voip-info.org/wiki/view/Asterisk+func+strftime"&gt;STRFTIME&lt;/a&gt;&lt;/strong&gt;: Formats an epoch into an arbitrary datetime string &lt;/li&gt;&lt;li&gt; &lt;strong&gt;&lt;a title="Asterisk func strptime" href="http://www.voip-info.org/wiki/view/Asterisk+func+strptime"&gt;STRPTIME&lt;/a&gt;&lt;/strong&gt;: &lt;span style="color: red;"&gt;Returns the epoch of the arbitrary date/time string structured as described in the format.&lt;/span&gt; &lt;/li&gt;&lt;li&gt; &lt;strong&gt;Asterisk func sysinfo&lt;/strong&gt;: New in 1.6 &lt;span style="color: blue;"&gt;Allows retrieval of system information&lt;/span&gt; &lt;/li&gt;&lt;li&gt; &lt;strong&gt;&lt;a title="Asterisk func timeout" href="http://www.voip-info.org/wiki/view/Asterisk+func+timeout"&gt;TIMEOUT&lt;/a&gt;&lt;/strong&gt;: Gets or sets timeouts on the channel. &lt;/li&gt;&lt;li&gt; &lt;strong&gt;Asterisk func toupper&lt;/strong&gt;: New in 1.6 &lt;span style="color: blue;"&gt;Converts a string to uppercase&lt;/span&gt; &lt;/li&gt;&lt;li&gt; &lt;strong&gt;Asterisk func tolower&lt;/strong&gt;: New in 1.6 &lt;span style="color: blue;"&gt;Converts a string to lowercase&lt;/span&gt; &lt;/li&gt;&lt;li&gt; &lt;strong&gt;&lt;a title="Asterisk func txtcidname" href="http://www.voip-info.org/wiki/view/Asterisk+func+txtcidname"&gt;TXTCIDNAME&lt;/a&gt;&lt;/strong&gt;: TXTCIDNAME looks up a caller name via DNS &lt;/li&gt;&lt;li&gt; &lt;strong&gt;&lt;a title="Asterisk func uridecode" href="http://www.voip-info.org/wiki/view/Asterisk+func+uridecode"&gt;URIDECODE&lt;/a&gt;&lt;/strong&gt;: Decodes an URI-encoded string. &lt;/li&gt;&lt;li&gt; &lt;strong&gt;&lt;a title="Asterisk func uriencode" href="http://www.voip-info.org/wiki/view/Asterisk+func+uriencode"&gt;URIENCODE&lt;/a&gt;&lt;/strong&gt;: Encodes a string to URI-safe encoding. &lt;/li&gt;&lt;li&gt; &lt;strong&gt;&lt;a title="Asterisk func vmcount" href="http://www.voip-info.org/wiki/view/Asterisk+func+vmcount"&gt;VMCOUNT&lt;/a&gt;&lt;/strong&gt;: Counts the voicemail in a specified mailbox &lt;/li&gt;&lt;/ul&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;h2 id="UsingfunctionsinAsteriskdialplans"&gt;Using functions in Asterisk dialplans &lt;/h2&gt;Example usage of the function &lt;a title="Asterisk func cut" href="http://www.voip-info.org/wiki/view/Asterisk+func+cut"&gt;CUT&lt;/a&gt;:&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: monospace;"&gt; exten =&gt; s,1,Set(foo=${CUT(bar,,2)}) &lt;/span&gt;&lt;br /&gt;&lt;br /&gt;The above example sets the variable foo to the function CUT whose first parameter is 'bar', second parameter is empty and third parameter is '2'.&lt;br /&gt;&lt;br /&gt;A function is often used to determain which "part of a variable" to set. For instance, the use of the function &lt;a title="Asterisk func callerid" href="http://www.voip-info.org/wiki/view/Asterisk+func+callerid"&gt;CALLERID&lt;/a&gt;:&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: monospace;"&gt; exten =&gt; s,n,Set(CALLERID(name)=Foo Fighters)  &lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: monospace;"&gt; exten =&gt; s,n,Set(CALLERID(number)=700)  &lt;/span&gt;&lt;br /&gt;&lt;h2 id="FunctionsReferenceThroughtheCLI"&gt;Functions Reference Through the CLI &lt;/h2&gt;The list of availble functions depends on the modules installed and loaded on the current system. To get the list of functions from the &lt;a title="Asterisk CLI" href="http://www.voip-info.org/wiki/view/Asterisk+CLI"&gt;Asterisk CLI&lt;/a&gt; use the command &lt;em&gt;show functions&lt;/em&gt; . This gives a list of all functions.&lt;br /&gt;&lt;br /&gt;To get the syntax of a specific function, use the command &lt;em&gt;show function FUNCNAME&lt;/em&gt;. This gives a longer description of the function. It is often handy to use tab completion that way to identify a function name.&lt;div class="blogger-post-footer"&gt;akdayal@yahoo.com&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1818419888217740295-3476306711574215552?l=ananddayal.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ananddayal.blogspot.com/feeds/3476306711574215552/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1818419888217740295&amp;postID=3476306711574215552' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1818419888217740295/posts/default/3476306711574215552'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1818419888217740295/posts/default/3476306711574215552'/><link rel='alternate' type='text/html' href='http://ananddayal.blogspot.com/2008/08/asterisk-functions.html' title='Asterisk functions'/><author><name>Anand Kumar Dayal</name><uri>http://www.blogger.com/profile/15821949256334333875</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://bp2.blogger.com/_X_AIQvaR6X4/SJGDCYgSLAI/AAAAAAAADcI/tod2zTuEQCw/S220/PIC-AD-257(2).jpg'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1818419888217740295.post-6377812754121958261</id><published>2008-07-29T01:28:00.000-07:00</published><updated>2008-07-29T01:31:35.885-07:00</updated><title type='text'>Fax Module installation with asterisk -</title><content type='html'>for fax module installation with asterisk go as following comand..&lt;br /&gt;&lt;br /&gt;cd /usr/src&lt;br /&gt;wget http://www.soft-switch.org/downloads/spandsp/spandsp-0.0.2pre25/spandsp-0.0.2pre25.tar.gz&lt;br /&gt;tar zxf spandsp-0.0.2pre25.tar.gz&lt;br /&gt;cd spandsp-0.0.2&lt;br /&gt;./configure --prefix=/usr &amp;&amp; make &amp;&amp; make install&lt;br /&gt;yum -y install ghostscript&lt;br /&gt;&lt;br /&gt;cd /usr/src/asterisk/apps&lt;br /&gt;wget http://nerdvittles.com/aah2/app_nv_faxdetect.c&lt;br /&gt;wget http://www.soft-switch.org/downloads/spandsp/spandsp-0.0.2pre25/asterisk-1.2.x/app_rxfax.c&lt;br /&gt;wget http://www.soft-switch.org/downloads/spandsp/spandsp-0.0.2pre25/asterisk-1.2.x/app_txfax.c&lt;br /&gt;wget http://aussievoip.com/makefile.patch&lt;br /&gt;patch &lt; makefile.patch&lt;br /&gt;cd ..&lt;br /&gt;make&lt;br /&gt;make install&lt;br /&gt;&lt;br /&gt;after installation the softs-witch change in extentions.conf &lt;br /&gt;&lt;br /&gt;And enjoy&lt;div class="blogger-post-footer"&gt;akdayal@yahoo.com&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1818419888217740295-6377812754121958261?l=ananddayal.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ananddayal.blogspot.com/feeds/6377812754121958261/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1818419888217740295&amp;postID=6377812754121958261' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1818419888217740295/posts/default/6377812754121958261'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1818419888217740295/posts/default/6377812754121958261'/><link rel='alternate' type='text/html' href='http://ananddayal.blogspot.com/2008/07/fax-module-installation-with-asterisk.html' title='Fax Module installation with asterisk -'/><author><name>Anand Kumar Dayal</name><uri>http://www.blogger.com/profile/15821949256334333875</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://bp2.blogger.com/_X_AIQvaR6X4/SJGDCYgSLAI/AAAAAAAADcI/tod2zTuEQCw/S220/PIC-AD-257(2).jpg'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1818419888217740295.post-1716828840453281091</id><published>2007-11-15T00:24:00.000-08:00</published><updated>2008-04-28T05:39:31.080-07:00</updated><title type='text'>SER Load balancing  (SIP proxy load balancing)</title><content type='html'>SER provide Dispatcher Module for call load balancing. First compile dispatcher module and make changes in ser.cfg .&lt;br /&gt;&lt;br /&gt;Dispatcher module configuration step by step--- &lt;br /&gt;&lt;br /&gt;cd  ser-0.9.6&lt;br /&gt;make modules modules=modules/dispatcher&lt;br /&gt;cp  modules/dispatcher/dispatcher.so /usr/local/lib/ser/modules/&lt;br /&gt;&lt;br /&gt;Create Destination address (sip proxy/ gateways address) list file&lt;br /&gt;&lt;br /&gt;vi /usr/local/etc/ser/dispatcher.list&lt;br /&gt;&lt;br /&gt;Copy &amp; paste following lines &lt;br /&gt;&lt;br /&gt;--------------------------------&lt;br /&gt;# proxies&lt;br /&gt;#Group Protocoltype:proxy/gateway address:port&lt;br /&gt;&lt;br /&gt;1 sip:127.0.0.1:5080&lt;br /&gt;1 sip:127.0.0.1:5082&lt;br /&gt;&lt;br /&gt;# gateways&lt;br /&gt;3 sip:127.0.0.1:7070&lt;br /&gt;3 sip:127.0.0.1:7072&lt;br /&gt;3 sip:127.0.0.1:7074&lt;br /&gt;&lt;br /&gt;--------------------------------&lt;br /&gt;&lt;br /&gt;Add following configuration in ser.cfg&lt;br /&gt;&lt;br /&gt;#load dispatcher module&lt;br /&gt;loadmodule " /usr/local/lib/ser/modules/dispatcher.so"&lt;br /&gt;&lt;br /&gt;#include dispatcher list (sip proxy address)&lt;br /&gt;modparam("dispatcher", "list_file", "/usr/local/etc/ser/dispatcher.list ")&lt;br /&gt;# if you wants to use focally proxy group 1 then &lt;br /&gt;# modparam("dispatcher", "force_dst", 1)&lt;br /&gt;&lt;br /&gt;# make the changes rout section where you was configure host forwarding&lt;br /&gt;&lt;br /&gt;route{&lt;br /&gt; if ( !mf_process_maxfwd_header("10") )&lt;br /&gt; {&lt;br /&gt;   sl_send_reply("483","To Many Hops");&lt;br /&gt;   drop();&lt;br /&gt; };&lt;br /&gt; &lt;br /&gt; ds_select_dst("1", "0");&lt;br /&gt; # ds_select_dst("3", "0");&lt;br /&gt; # 1 means call load balancing on group 1 (proxy) &amp; 3 means load balancing on group 3(gateways).&lt;br /&gt;&lt;br /&gt; forward(uri:host, uri:port);&lt;br /&gt; # t_relay();&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;After configuring ser.cfg restart ser and enjoy.&lt;div class="blogger-post-footer"&gt;akdayal@yahoo.com&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1818419888217740295-1716828840453281091?l=ananddayal.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1818419888217740295/posts/default/1716828840453281091'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1818419888217740295/posts/default/1716828840453281091'/><link rel='alternate' type='text/html' href='http://ananddayal.blogspot.com/2007/11/ser-loadbalanceing.html' title='SER Load balancing  (SIP proxy load balancing)'/><author><name>Anand Kumar Dayal</name><uri>http://www.blogger.com/profile/15821949256334333875</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://bp2.blogger.com/_X_AIQvaR6X4/SJGDCYgSLAI/AAAAAAAADcI/tod2zTuEQCw/S220/PIC-AD-257(2).jpg'/></author></entry><entry><id>tag:blogger.com,1999:blog-1818419888217740295.post-5692684145012375738</id><published>2007-05-25T06:25:00.000-07:00</published><updated>2008-06-06T00:38:49.817-07:00</updated><title type='text'>Asterisk calling card system &amp; voip Billing syetsm IPPBX &amp; softswitch</title><content type='html'>&lt;a href="http://www.openvoips.com"&gt;Openvoip's&lt;/a&gt; is working in open source voip project. GDcalling card system is good for small &amp;amp; enterprise business. GD Communication is asterisk, SER, Radius Based system. for more information &lt;a href="http://www.openvoips.com/callingcard.php"&gt;http://www.openvoips.com&lt;/a&gt;.&lt;div class="blogger-post-footer"&gt;akdayal@yahoo.com&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1818419888217740295-5692684145012375738?l=ananddayal.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ananddayal.blogspot.com/feeds/5692684145012375738/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1818419888217740295&amp;postID=5692684145012375738' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1818419888217740295/posts/default/5692684145012375738'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1818419888217740295/posts/default/5692684145012375738'/><link rel='alternate' type='text/html' href='http://ananddayal.blogspot.com/2007/05/asterisk-calling-card-system-voip.html' title='Asterisk calling card system &amp; voip Billing syetsm IPPBX &amp; softswitch'/><author><name>Anand Kumar Dayal</name><uri>http://www.blogger.com/profile/15821949256334333875</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://bp2.blogger.com/_X_AIQvaR6X4/SJGDCYgSLAI/AAAAAAAADcI/tod2zTuEQCw/S220/PIC-AD-257(2).jpg'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1818419888217740295.post-7530874305354158301</id><published>2007-04-25T02:06:00.000-07:00</published><updated>2007-04-25T02:32:40.753-07:00</updated><title type='text'>Open Source VoIP Apps &amp; Resources</title><content type='html'>here — 74 open source apps tucked into categories that you can use "as is" or change to fit your specific VoIP needs.&lt;p&gt;&lt;/p&gt;The following apps and resources are categorized by SIP, H.323, IAX, and RTP protocols and include clients, libraries, gatekeepers, and any other open source resource available for those specific protocols plus PBX and IVR platforms. You'll also find tools like faxware, voicemail apps, and middleware that applies to one or more of the previously mentioned protocols.&lt;br /&gt;&lt;h4&gt;H.323 Clients (User Agents)&lt;br /&gt;&lt;/h4&gt;&lt;p&gt;VoIP traditionally uses &lt;a href="http://en.wikipedia.org/wiki/H.323"&gt;H.323&lt;/a&gt;, a rather complicated protocol that uses multiple ports and a binary code for data. But apps like FreeSWITCH make H.323 seem like a piece of cake with its all-in-one application. The following H.323 clients are broken down into Multiplatform, Linux, MacOS X, and Windows.&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;strong&gt;Multiplatform&lt;/strong&gt;&lt;br /&gt;&lt;/p&gt;&lt;ol&gt;&lt;li&gt;&lt;strong&gt;&lt;a href="http://www.freeswitch.org/"&gt;FreeSWITCH&lt;/a&gt;&lt;/strong&gt; - FreeSWITCH is a telephony platform designed to facilitate the creation of voice and chat driven products scaling from a soft-phone up to a soft-switch. It can be used as a simple switching engine, a media gateway or a media server to host IVR applications using simple scripts or XML to control the callflow. FreeSWITCH runs on several operating systems including Windows, Max OS X, Linux, BSD, and Solaris on both 32- and 64- bit platforms. &lt;em&gt;Note: &lt;/em&gt;FreeSWITCH is also multiprotocol, as it works with SIP, IAX2 and GoogleTalk to make it easy to interface with other open source PBX systems.&lt;br /&gt;&lt;/li&gt;&lt;br /&gt;&lt;li&gt;&lt;strong&gt;&lt;a href="http://yate.null.ro/pmwiki/"&gt;YATE&lt;/a&gt;&lt;/strong&gt; - Yate (Yet Another Telephony Engine) is a next-generation telephony engine that is the first open source telephony application capable of handling 600 H323 calls; while currently focused on Voice over Internet Protocol (VoIP) and PSTN, its power lies in its ability to be easily extended. Voice, video, data and instant messaging can all be unified under Yate's flexible routing engine, maximizing communications efficiency and minimizing infrastructure costs for businesses. YATE can be used for anything from a VoIP server to an IVR engine. The software is written in C++ and it supports scripting in various programming languages (such as those supported by the currently implemented embedded PHP, Python and Perl interpreters) and even any Unix shell. &lt;em&gt;Note: &lt;/em&gt;YATE is multiprotocol, as it works with SIP and IAX, and H.323 protocol is stable supported just by  Yate. The most used application of Yate is as a SIP-H323 translator because is the only open source stable translator.&lt;br /&gt;&lt;/li&gt;&lt;/ol&gt;&lt;p&gt;&lt;strong&gt;Linux&lt;/strong&gt;&lt;br /&gt;&lt;/p&gt;&lt;ol start="3"&gt;&lt;li&gt;&lt;strong&gt;&lt;a href="http://www.ekiga.org/"&gt;Ekiga&lt;/a&gt;&lt;/strong&gt; - Ekiga (formely known as GnomeMeeting) is an open source VoIP and video conferencing application for &lt;a href="http://www.gnome.org/"&gt;GNOME&lt;/a&gt;. &lt;em&gt;Note: &lt;/em&gt;Ekiga uses both the H.323 and SIP protocols. It supports many audio and video codecs, and is interoperable with other SIP compliant software and also with Microsoft NetMeeting.&lt;br /&gt;&lt;/li&gt;&lt;/ol&gt;&lt;p&gt;&lt;strong&gt;MacOS X&lt;/strong&gt;&lt;br /&gt;&lt;/p&gt;&lt;ol start="4"&gt;&lt;li&gt;&lt;strong&gt;&lt;a href="http://xmeeting.sourceforge.net/pages/index.php"&gt;XMeeting&lt;/a&gt;&lt;/strong&gt; - XMeeting is the first H.323 compatible video conferencing client for Mac OS X.&lt;br /&gt;&lt;/li&gt;&lt;/ol&gt;&lt;p&gt;&lt;strong&gt;Windows&lt;/strong&gt;&lt;br /&gt;&lt;/p&gt;&lt;ol start="5"&gt;&lt;li&gt;&lt;strong&gt;&lt;a href="http://www.openh323.org/"&gt;OpenH323 Project&lt;/a&gt;&lt;/strong&gt; - The OpenH323 project aims to create a full featured, interoperable implementation of the ITU-T H.323 teleconferencing protocol that can be used by personal developers and by commercial users without charge.&lt;br /&gt;&lt;/li&gt;&lt;/ol&gt;&lt;h4&gt;H.323 Gatekeeper&lt;br /&gt;&lt;/h4&gt;&lt;ol start="6"&gt;&lt;li&gt;&lt;strong&gt;&lt;a href="http://www.gnugk.org/"&gt;OpenH323 Gatekeeper&lt;/a&gt;&lt;/strong&gt; - The GNU Gatekeeper (GnuGk) is a full featured cross-platform H.323 gatekeeper, available freely under GPL license.&lt;br /&gt;&lt;/li&gt;&lt;/ol&gt;&lt;h4&gt;&lt;strong&gt;H.232 Radius Platform&lt;/strong&gt;&lt;br /&gt;&lt;/h4&gt;&lt;ol start="7"&gt;&lt;li&gt;&lt;strong&gt;&lt;a href="http://www.bsdradius.org/"&gt;BSDRadius&lt;/a&gt;&lt;/strong&gt; - While there are quite large number of Radius servers (including free) available in   the world, little number of them (if any) are developed with VoIP specific needs   in mind. BSDRadius is a RADIUS - compliant AAA (Authentication, Authorization, Accounting) server with CHAP-password authentication for H.323. Platform-independent,&lt;br /&gt;but has not been tested on Windows.&lt;br /&gt;&lt;/li&gt;&lt;/ol&gt;&lt;h4&gt;SIP Clients (User Agents)&lt;br /&gt;&lt;/h4&gt;&lt;p&gt;SIP (Session Initiation Protocol) is currently described by the &lt;a href="http://www.ietf.org/rfc/rfc2543.txt"&gt;rfc2543&lt;/a&gt;SIP is a popular open standard replacement from IETF (Internet Engineering TasForce) for H.323 signaling standard for managing multimedia session initiation. SIP can be used to initiate voice, video and multimedia sessions, for both interactive applications (e.g. an IP phone call or a videoconference) and not interactive ones (e.g. a Video Streaming). It is the more promising candidate as call setup signaling for the present day and future IP based telephony services, as it has been also proposed for session initiation related uses, such as for messaging,   gaming, etc.SIP needs two ports, one for the command exchange and one for the RTP stream which contains the voice. It's easier to work with firewalls than H.323, but you still need to have a proxy running. The following SIP UAs are divided into two groups for Multiplatform and Linux only:&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;strong&gt;Multi-Platform&lt;/strong&gt;&lt;br /&gt;&lt;/p&gt;&lt;ol start="8"&gt;&lt;li&gt;&lt;strong&gt;&lt;a href="http://www.sflphone.org/"&gt;SFLphone&lt;/a&gt;&lt;/strong&gt; - A nifty little default skin (Metal Gear) for SFLphone holds a multi-protocol (SIP/IAX) multi-GUI desktop VoIP phone for use in Desktop environments. The project is being developed on Linux, but should ("and must") be portable to various flavors of BSD operating systems (and maybe win32) with some involvement.&lt;br /&gt;&lt;/li&gt;&lt;br /&gt;&lt;li&gt;&lt;strong&gt;&lt;a href="http://www.linphone.org/"&gt;Linphone&lt;/a&gt;&lt;/strong&gt; - With linphone you can communicate freely with people over the internet, with voice, video, and text instant messaging. Linphone is stable under Linux, but FreeBSD and OpenBSD are reported to work.&lt;br /&gt;&lt;/li&gt;&lt;br /&gt;&lt;li&gt;&lt;strong&gt;&lt;a href="http://www.minisip.org/"&gt;Minisip&lt;/a&gt;&lt;/strong&gt; - Minisip was developed by Ph.D and Master students at the Royal Institute of Technology (KTH, Stockholm, Sweden). It can be used to make phone calls, instant message and videocalls to your buddies connected to the same SIP network. Runs on multiple Operating Systems (Linux PC, Linux familiar IPAQ PDA, Windows XP and soon Windows Mobile 2003 SE).&lt;br /&gt;&lt;/li&gt;&lt;br /&gt;&lt;li&gt;&lt;strong&gt;&lt;a href="http://www.openwengo.org/"&gt;OpenWengo&lt;/a&gt;&lt;/strong&gt; - The flagship product of the OpenWengo project is a softphone which allows you to make free PC to PC video and voice calls, and to integrate all your IM contacts in one place. Through their partnership with &lt;a href="http://www.wengo.com/"&gt;Wengo&lt;/a&gt;, they also offer very cheap PC to telephone and SMS rates. Available for Linux, MacOSX, and Windows.&lt;br /&gt;&lt;/li&gt;&lt;br /&gt;&lt;li&gt;&lt;strong&gt;&lt;a href="http://www.phonegaim.com/"&gt;PhoneGaim&lt;/a&gt;&lt;/strong&gt; - Make phone calls to your friends and family directly from your &lt;a href="http://www.linspire.com/"&gt;Linspire&lt;/a&gt; computer with the latest software from Linspire. PhoneGaim is built right into Gaim.&lt;br /&gt;&lt;/li&gt;&lt;br /&gt;&lt;li&gt;&lt;strong&gt;&lt;a href="http://www.sipfoundry.org/sipXezPhone/"&gt;sipXtapi&lt;/a&gt;&lt;/strong&gt; - sipXtapi is a comprehensive client library and software development kit (SDK) for SIP-based user agents. It includes SIP signaling support as well as a media framework. A complete and very feature rich softphone can be built easily by adding a graphical user interface on top of sipXtapi. Alternatively, sipXtapi was engineered to be embedded into existing applications adding real-time communications to such applications. sipXtapi is primarily developed under WIN32; however, sipXtapi can be built and used under Linux and MacOs X. WinCE support is in development.&lt;br /&gt;&lt;/li&gt;&lt;br /&gt;&lt;li&gt;&lt;strong&gt;&lt;a href="http://www.openzoep.org/"&gt;OpenZoep&lt;/a&gt;&lt;/strong&gt; - OpenZoep (pronounced "open soup"), developed by &lt;a href="http://www.voipster.com/"&gt;Voipster&lt;/a&gt;, is a client-side telephony and instant messaging (IM) communications engine. It supports computer-to-computer (peer-to-peer) VoIP calls, instant messaging, and outbound PSTN and SIP calls to free and premium SIP providers.&lt;br /&gt;&lt;/li&gt;&lt;/ol&gt;&lt;p&gt;&lt;strong&gt;Linux&lt;/strong&gt;&lt;br /&gt;&lt;/p&gt;&lt;ol start="15"&gt;&lt;li&gt;&lt;strong&gt;&lt;a href="http://cockatoo.mozdev.org/"&gt;Cockatoo&lt;/a&gt;&lt;/strong&gt; - Cockatoo is a project that focuses on implementing SIP/SIMPLE as an extension for Thunderbird (XPCOM component/XUL interface) that enables users to phone contacts from an address book and see their presence state. Functionalities are included into Thunderbird as an XPCOM component.&lt;br /&gt;&lt;/li&gt;&lt;br /&gt;&lt;li&gt;&lt;strong&gt;&lt;a href="http://www.devbase.at/voip/yeaphone.php"&gt;YeaPhone&lt;/a&gt;&lt;/strong&gt; - The goal of the YeaPhone project is to bring VoIP-Software together with the &lt;a href="http://www.yealink.com/en/index.asp"&gt;Yealink USB handset&lt;/a&gt; (USB-P1K) and at the same time make a PC keyboard and monitor unnecessary. This makes YeaPhone ideal for "Embedded Devices" as these do typically need extra devices for user interaction (in this case the handset) while working very energy efficient.&lt;br /&gt;&lt;/li&gt;&lt;br /&gt;&lt;li&gt;&lt;strong&gt;&lt;a href="http://www.twinklephone.com/"&gt;Twinkle&lt;/a&gt;&lt;/strong&gt; - Twinkle is a soft phone for your voice over IP communications using the SIP protocol. You can use it for direct IP phone to IP phone communication or in a network using a SIP proxy to route your calls.&lt;br /&gt;&lt;/li&gt;&lt;/ol&gt;&lt;p&gt;&lt;strong&gt;Windows&lt;/strong&gt;&lt;br /&gt;&lt;/p&gt;&lt;ol start="18"&gt;&lt;li&gt;&lt;strong&gt;&lt;a href="http://www.1videoconference.com/"&gt;1videoConference&lt;/a&gt;&lt;/strong&gt; - 1VideoConference allows its Web, Audio/ Video phone, Skype, Msn and Yahoo users to instantly participate in live web conferences without the need for lengthy downloads or complicated installations. Simply drop a small piece of code onto your website and instantly create an online video conference room. All you need is a web cam and an internet connection and seconds later you can show presentations, share applications or users' desktops, hold live webinars, discuss new strategies face to face with business partners, and more...&lt;br /&gt;&lt;/li&gt;&lt;/ol&gt;&lt;h4&gt;SIP Proxies&lt;br /&gt;&lt;/h4&gt;&lt;ol start="19"&gt;&lt;li&gt;&lt;strong&gt;&lt;a href="http://www.opensourcesip.org:8080/jiveforums/index.jspa"&gt;Open Source SIP&lt;/a&gt;&lt;/strong&gt; - Open Source SIP was created in March 2006 as a project to foster the development of commercially viable SIP applications. The Open Source SIP project is sponsored by Solegy, and draws on over six years of research and development.&lt;br /&gt;&lt;/li&gt;&lt;br /&gt;&lt;li&gt;&lt;strong&gt;&lt;a href="http://www.nongnu.org/partysip/"&gt;Partysip&lt;/a&gt;&lt;/strong&gt; - Partysip is a modular application where some capabilities are added and     removed through GPL plugins. Depending on the list of included plugins, partysip    can be used as a SIP registrar, a SIP redirect server or statefull server, or a SIP service provider (game session, answering machine, etc.).&lt;br /&gt;&lt;/li&gt;&lt;br /&gt;&lt;li&gt;&lt;strong&gt;&lt;a href="http://www.mjsip.org/"&gt;MjSip&lt;/a&gt;&lt;/strong&gt; - MjSip is a complete java-based implementation of a SIP stack that provides API and implementation bound together into one package. The MjSip stack has been used in research activities by Dpt. of Information Engineering at &lt;a href="http://www.unipr.it/"&gt;University of Parma&lt;/a&gt; and by &lt;a href="http://www.eln.uniroma2.it/"&gt;DIE - University of Roma “Tor Vergata”&lt;/a&gt;. MjSip includes all classes and methods for creating SIP-based applications.&lt;br /&gt;&lt;/li&gt;&lt;br /&gt;&lt;li&gt;&lt;strong&gt;&lt;a href="http://openser.org/"&gt;OpenSER&lt;/a&gt;&lt;/strong&gt; - OpenSER is an open source GPL project that aims to develop a robust and scalable SIP server. Spawned from FhG FOKUS SIP Express Router (SER) by two core developers and one main contributor of SER, OpenSER promotes a development strategy open for contributions.&lt;br /&gt;&lt;/li&gt;&lt;br /&gt;&lt;li&gt;&lt;strong&gt;&lt;a href="http://www.iptel.org/ser/"&gt;SIP Express Router&lt;/a&gt;&lt;/strong&gt; - SIP Express Router (ser) is a high-performance, configurable, free SIP server. It can act as registrar, proxy or redirect server. SER features an application-server interface, presence support, SMS gateway, SIMPLE2Jabber gateway, RADIUS/syslog accounting and authorization, server status monitoring, FCP security, etc. Web-based user provisioning, serweb, available.&lt;br /&gt;&lt;/li&gt;&lt;br /&gt;&lt;li&gt;&lt;strong&gt;&lt;a href="http://siproxd.sourceforge.net/"&gt;Siproxd&lt;/a&gt;&lt;/strong&gt; - Siprox is an proxy/masquerading daemon for the SIP protocol that handles registrations of SIP clients on a private IP network and performs rewriting of the SIP message bodies to make SIP connections possible via an masquerading firewall. It allows SIP clients (like kphone, linphone) to work behind an IP masquerading firewall or router.&lt;br /&gt;&lt;/li&gt;&lt;/ol&gt;&lt;h4&gt;SIP Protocol Stacks and Libraries&lt;br /&gt;&lt;/h4&gt;&lt;ol start="25"&gt;&lt;li&gt;&lt;strong&gt;&lt;a href="http://www.opensipstack.org/"&gt;OpenSIPStack&lt;/a&gt;&lt;/strong&gt; - The OpenSIPStack Library is an implementation of the Session Initiation Protocol as described in RFC 3261. The primary goal of the library is to provide application developers with a fully compliant interface to the SIP protocol with scalability and stability in mind. The OpenSIPStack Library has both low level interface and high level interface ideal for use in SIP Proxies, Presence Servers, Softphones and Instant Messaging clients.&lt;br /&gt;&lt;/li&gt;&lt;br /&gt;&lt;li&gt;&lt;strong&gt;&lt;a href="http://www.gnu.org/software/osip/"&gt;The GNU oSIP Library&lt;/a&gt;&lt;/strong&gt; - This library aims to provide multimedia and telecom software developers an easy and powerful interface to initiate and control SIP based sessions in their applications.&lt;br /&gt;&lt;/li&gt;&lt;br /&gt;&lt;li&gt;&lt;strong&gt;&lt;a href="http://savannah.nongnu.org/projects/exosip/"&gt;The eXtended osip Library&lt;/a&gt;&lt;/strong&gt; - eXosip is a library that hides the complexity of using the SIP protocol for mutlimedia session establishment. This protocol is mainly to be used by VoIP telephony applications (endpoints or conference server) but might be also usefull for any application that wish to establish sessions like multiplayer games.&lt;br /&gt;&lt;/li&gt;&lt;br /&gt;&lt;li&gt;&lt;strong&gt;&lt;a href="http://vovida.org/protocols/downloads/sip/"&gt;Vovida SIP Stack&lt;/a&gt;&lt;/strong&gt; - The version is not supported on Win32 platforms, although some community members have shown interest in Windows port.&lt;br /&gt;&lt;/li&gt;&lt;br /&gt;&lt;li&gt;&lt;strong&gt;&lt;a href="http://www.sipfoundry.org/reSIProcate/index.html"&gt;reSIProcate&lt;/a&gt;&lt;/strong&gt; - The reSIProcate project is part of the &lt;a href="http://www.sipfoundry.org/"&gt;SIPfoundry&lt;/a&gt; community. The project aims at building a freely available, completely standards based and complete reference implementation of a SIP stack including an easy to use application layer API. The reSIProcate stack is currently used in several commercial products and is very stable.&lt;br /&gt;&lt;/li&gt;&lt;br /&gt;&lt;li&gt;&lt;strong&gt;&lt;a href="http://twistedmatrix.com/trac/"&gt;Twisted&lt;/a&gt;&lt;/strong&gt; - Twisted Matrix Laboratories is a distributed group of open-source developers working on Twisted, an event-driven networking framework written in Python and licensed under the LGPL. Twisted supports TCP, UDP, SSL/TLS, multicast, Unix sockets, a large number of protocols (including HTTP, NNTP, IMAP, SSH, IRC, FTP, and others), and much more.&lt;br /&gt;&lt;/li&gt;&lt;br /&gt;&lt;li&gt;&lt;strong&gt;&lt;a href="http://www.pjsip.org/"&gt;PJSIP&lt;/a&gt;&lt;/strong&gt; - The PJSIP.ORG website is the home of PJSIP and PJMEDIA, the Open Source, high performance, small footprint SIP and media stack written in C language for building embedded/non-embedded VoIP applications. PJSIP is built on top of PJLIB, and since PJLIB is a very very portable library, basically PJSIP can run on any platforms where PJLIB are ported (including platforms where normally it would be hard to port existing    programs to, such as Symbian and some custom OSes).&lt;br /&gt;&lt;/li&gt;&lt;/ol&gt;&lt;h4&gt;SIP Test Tools&lt;br /&gt;&lt;/h4&gt;&lt;p&gt;The following tools basically test SIP applications and devices, but each one is different in how it tests the protocols and in their focuses and additional applications:&lt;br /&gt;&lt;/p&gt;&lt;ol start="32"&gt;&lt;li&gt;&lt;strong&gt;&lt;a href="http://sourceforge.net/projects/callflow/"&gt;Callflow&lt;/a&gt;&lt;/strong&gt; - Callflow is a collection of awk and shell scripts that will capture a file that can be read by ethereal and that will produce a callflow sequence diagram. The scripts have been primarily tested with SIP call flows, but should work for other network traffic as well. You can view callflow.svg with the Adobe SVG plugin, or you can view index.html with any web browser. The &lt;a href="http://callflow.sourceforge.net/"&gt;Callflow&lt;/a&gt; directive is a clean little script complete with a "to-do" list that you can play with.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;&lt;a href="http://www.metalinkltd.com/downloads.php"&gt;SipBomber 0.8&lt;/a&gt;&lt;/strong&gt; - SipBomber is an invaluable sip-protocol testing tool for Linux originally developed by Metalink in 2003 for internal use. It was later released as a GPL open source product.&lt;br /&gt;&lt;/li&gt;&lt;br /&gt;&lt;li&gt;&lt;strong&gt;&lt;a href="http://sourceforge.net/projects/sipproxy"&gt;SIP Proxy&lt;/a&gt;&lt;/strong&gt; - With SIP Proxy you will have the opportunity to eavesdrop and manipulate SIP traffic. Furthermore, predefined security test cases can be executed to find weak spots in VoIP devices.&lt;br /&gt;&lt;/li&gt;&lt;br /&gt;&lt;li&gt;&lt;strong&gt;&lt;a href="http://sipsak.org/"&gt;sipsak&lt;/a&gt;&lt;/strong&gt; - sipsak is a small command line tool for developers and administrators of Session Initiation Protocol (SIP) applications. It can be used for some simple tests on SIP applications and devices.&lt;br /&gt;&lt;/li&gt;&lt;li&gt;&lt;strong&gt;&lt;a href="http://sipp.sourceforge.net/"&gt;SIPp&lt;/a&gt;&lt;/strong&gt; - SIPp is a test tool / traffic generator for the SIP protocol. It includes a few basic SipStone user agent scenarios (UAC and UAS) and establishes and releases multiple calls with the INVITE and BYE methods. It can also reads custom XML scenario files describing from very simple to complex call flows. It features the dynamic display of statistics about running tests (call rate, round trip delay, and message statistics), periodic CSV statistics dumps, TCP and UDP over multiple socket or multiplexed with retransmission management and dynamically adjustable call rates.&lt;br /&gt;&lt;/li&gt;&lt;br /&gt;&lt;li&gt;&lt;strong&gt;&lt;a href="http://www.ee.oulu.fi/research/ouspg/protos/testing/c07/sip/"&gt;PROTOS Test-Suite: c07-sip&lt;/a&gt;&lt;/strong&gt; - The purpose of this test-suite is to evaluate implementation level security and robustness of SIP implementations. The focus was set on a specific protocol data unit (PDU), namely INVITE message (a subset of SIP).&lt;br /&gt;&lt;/li&gt;&lt;br /&gt;&lt;li&gt;&lt;strong&gt;&lt;a href="http://www.vovida.org/applications/downloads/loadbalancer/"&gt;Vovida.org Load Balancer&lt;/a&gt;&lt;/strong&gt; - The Load Balancer is a very simple proxy that is useful in SIP-based VoIP installations where there are multiple ingress proxy servers. The Load Balancer permits pooling these servers, thereby eliminating the need to balance user demands for connectivity through a complicated provisioning algorithm. The Load Balancer adds itself to the Via header of requests to enable responses to return before being sent to orginating endpoint. This only works with SIP messages sent over UDP (User Datagram Protocol).  &lt;/li&gt;&lt;/ol&gt;&lt;br /&gt;&lt;h4&gt;IAX Clients (User Agents)&lt;br /&gt;&lt;/h4&gt;&lt;p&gt;The open source project Asterisk (see below in PBX platforms) implements a  software based PBX (Private Branch Exchange), or a private telephone switch  that provides switching (including a full set of switching features) for an   office or campus. As an internal protocol to trunk two or more PBX servers, the IAX (Inter Asterisk Exchange) protocol was created. IAX is a lightweight   app based on UDP and bundles call signalling and voice into one data stream. This streaming makes it perfectly suited for connection-based simple firewalls.&lt;br /&gt;&lt;/p&gt;&lt;ol start="39"&gt;&lt;li&gt;&lt;strong&gt;&lt;a href="http://iaxclient.sourceforge.net/iaxcomm/"&gt;IAXComm&lt;/a&gt;&lt;/strong&gt; - iaxComm is a cross-platform application for the Asterisk PBX. It was developed on aWindows XP system.&lt;br /&gt;&lt;/li&gt;&lt;br /&gt;&lt;li&gt;&lt;strong&gt;&lt;a href="http://www.kiax.org/"&gt;Kiax&lt;/a&gt;&lt;/strong&gt; - Kiax is an IAX client application which allows PC users to make ordinary VoIP calls to Asterisk servers. It aims to provide a simple and user-friendly graphical interface and desktop integration for calling, contact list, call register management and easy configuration.&lt;br /&gt;&lt;/li&gt;&lt;br /&gt;&lt;li&gt;&lt;strong&gt;&lt;a href="http://www.holgerschurig.de/qtiax.html"&gt;QtIAX&lt;/a&gt;&lt;/strong&gt; - QtIAX is based on iaxclient (see below), but files were stripped for a bare bones environment.&lt;br /&gt;&lt;/li&gt;&lt;br /&gt;&lt;li&gt;&lt;strong&gt;&lt;a href="http://moziax.mozdev.org/"&gt;MozIAX&lt;/a&gt;&lt;/strong&gt; - MozIAX is a Firefox VoIP extension, a cross platform software IAX2 phone (softphone) to be used with Asterisk.&lt;br /&gt;&lt;/li&gt;&lt;li&gt;&lt;strong&gt;&lt;a href="http://www.yakasoftware.com/"&gt;YakaSoftware&lt;/a&gt;&lt;/strong&gt; - YakaSoftware is the open source code behind the YakaPhone, a simple, Skinnable IAX/IAX2 Softphone from YakaSoftware.&lt;br /&gt;&lt;/li&gt;&lt;/ol&gt;&lt;h4&gt;IAX/PBX Library&lt;br /&gt;&lt;/h4&gt;&lt;ol start="44"&gt;&lt;li&gt;&lt;strong&gt;&lt;a href="http://iaxclient.sourceforge.net/"&gt;IAXClient&lt;/a&gt;&lt;/strong&gt; - IAXClient is an Open Source library to implement the IAX protocol used by The Asterisk Software PBX. Although asterisk supports other VOIP protocols (including SIP, and with patches, H.323), IAX's simple, lightweight nature gives it several advantages, particularly in that it can operate easily through NAT and packet firewalls, and it is easily extensible and simple to understand.&lt;br /&gt;&lt;/li&gt;&lt;/ol&gt;&lt;h4&gt;RTP Proxies&lt;br /&gt;&lt;/h4&gt;&lt;p&gt;RTP, or Real-time transport protocol, is the Internet-standard protocol for the transport of real-time data, including audio and video. RTP is used in virtually all voice-over-IP architectures, for videoconferencing, media-on-demand, and other applications. A thin protocol, it supports content identification, timing reconstruction, and detection of lost packets.&lt;br /&gt;&lt;/p&gt;&lt;ol start="45"&gt;&lt;li&gt;&lt;strong&gt;&lt;a href="http://www.voip-info.org/wiki/view/Maxim+Sobolev%27s+RTPproxy"&gt;Maxim Sobolev's RTPproxy&lt;/a&gt;&lt;/strong&gt; - RTPproxy is a proxy for RTP streams that can help SER (SIP Express Router) handle NAT (Network Address Translation, defined in &lt;a href="http://www.ietf.org/rfc/rfc1631.txt"&gt;RFC 1631&lt;/a&gt;) situations, as well as proxy IP telephony between IPv4 and IPv6 networks. The code has been extensively tested on FreeBSD, Linux, MacOS and Solaris. It should be relatively easy to port it to any system which has a POSIX layer.&lt;br /&gt;&lt;/li&gt;&lt;/ol&gt;&lt;h4&gt;RTP Protocol Stacks&lt;br /&gt;&lt;/h4&gt;&lt;ol start="46"&gt;&lt;li&gt;&lt;strong&gt;&lt;a href="http://research.edm.uhasselt.be/%7Ejori/page/index.php?n=CS.Jrtplib"&gt;JRTPLIB&lt;/a&gt;&lt;/strong&gt; - JRTPLIB is an object-oriented RTP library written in C++. The library offers support for the Real-time Transport Protocol (RTP), defined in RFC 3550. It makes it very easy to send and receive RTP packets and the RTCP (RTP Control Protocol) functions are handled entirely internally. The latest version of the library is 3.7.0 (January 2007).&lt;br /&gt;&lt;/li&gt;&lt;br /&gt;&lt;li&gt;&lt;strong&gt;&lt;a href="http://www.linphone.org/index.php/v2/code_review/ortp"&gt;oRTP&lt;/a&gt;&lt;/strong&gt; - oRTP is a Real-time Transport Protocol (RFC3550) stack under LGPL. Written in C, works under Linux (and probably any Unix) and Windows.&lt;br /&gt;&lt;/li&gt;&lt;br /&gt;&lt;li&gt;&lt;strong&gt;&lt;a href="http://www.gnu.org/software/ccrtp/"&gt;GNU ccRTP&lt;/a&gt;&lt;/strong&gt; - ccRTP is a C++ library based on GNU Common C++ which provides a high performance, flexible and extensible standards-compliant RTP stack with full RTCP support. The design and implementation of ccRTP make it suitable for high capacity servers and gateways as well as personal client applications.&lt;br /&gt;&lt;/li&gt;&lt;br /&gt;&lt;li&gt;&lt;strong&gt;&lt;a href="http://www.vovida.org/protocols/downloads/rtp/"&gt;Vovida RTP Stack&lt;/a&gt;&lt;/strong&gt; - Vovida RTP is augmented by a control protocal (RTCP) to monitor data delivery and network statistics. Together they resolve of many of the problems a UDP network enviroment may experience, such as lost packets, jitter, and out of sequence packets.&lt;br /&gt;&lt;/li&gt;&lt;br /&gt;&lt;li&gt;&lt;strong&gt;&lt;a href="http://www-out.bell-labs.com/project/RTPlib/"&gt;RTPlib&lt;/a&gt;&lt;/strong&gt; - This library, offered by Bell Labs, is based on the most recent version of the specification, incorporating some of the newest features, including RTCP scalability algorithms.&lt;br /&gt;&lt;/li&gt;&lt;/ol&gt;&lt;h4&gt;PBX Platforms&lt;br /&gt;&lt;/h4&gt;&lt;ol start="51"&gt;&lt;li&gt;&lt;strong&gt;&lt;a name="asterisk"&gt;&lt;/a&gt;&lt;a href="http://www.asterisk.org/"&gt;Asterisk&lt;/a&gt;&lt;/strong&gt; - Asterisk is a popular and extensible open source telephone that offers flexibility, functionality and features not available in advanced, high-end (high-cost) proprietary business systems. Asterisk is a complete IP PBX (private branch exchange) for businesses that runs on Linux, BSD, Windows and OS X and provides all of the features you would expect from a PBX and more. It has support for three-way calling, caller ID services, ADSI, IAX, SIP, H.323 (as both client and gateway), MGCP (call manager only) and SCCP/Skinny.&lt;br /&gt;&lt;/li&gt;&lt;br /&gt;&lt;li&gt;&lt;strong&gt;&lt;a href="http://www.openpbx.org/"&gt;OpenPBX.org 1.2 RC3&lt;/a&gt;&lt;/strong&gt; - This release includes the highly anticipated and robust new conference bridge application called NConference. OpenPBX.org RC2 is now generally available as a tarball that includes the ability to run on several BSDs as well as MacOS X. Both are forks of Asterisk with T.38 termination.&lt;br /&gt;&lt;/li&gt;&lt;br /&gt;&lt;li&gt;&lt;strong&gt;&lt;a href="http://wiki.openpbx.org/tiki-index.php"&gt;Open Source Software PBX&lt;/a&gt;&lt;/strong&gt; - Open Source PBX developed using Perl. OpenPBX.org will be stable, featureful, easy to use, and easy to deploy on a range of operating  systems.&lt;br /&gt;&lt;/li&gt;&lt;br /&gt;&lt;li&gt;&lt;strong&gt;&lt;a href="http://www.eversberg.eu/"&gt;PBX4Linux&lt;/a&gt;&lt;/strong&gt; - PBX4Linux is an ISDN PBX which interconnects ISDN telephones, ISDN lines, and a H.323 gateway. This is a pure software solution except for the ISDN cards and telephones, as it connects to a Linux box. The great benefit is the NT-mode that allows to connect telephones to an ISDN card.&lt;br /&gt;&lt;/li&gt;&lt;br /&gt;&lt;li&gt;&lt;strong&gt;&lt;a href="http://www.pingtel.com/page.php?id=20"&gt;SIPxchange&lt;/a&gt;&lt;/strong&gt; - An enterprise-grade SIP PBX, SIP call manager and router, and SIP Softphone based on 100% SIP and 100% open source software. Produced by Pingtel, SIPxchange product suite runs on commodity server hardware using the Linux operating system, supports a large variety of IP phones and gateways, and seamlessly interoperates with legacy components.&lt;br /&gt;&lt;/li&gt;&lt;br /&gt;&lt;li&gt;&lt;strong&gt;&lt;a href="http://www.sipfoundry.org/"&gt;sipX&lt;/a&gt;&lt;/strong&gt; - sipX is a modular server based solution that runs on standard Linux complete with voice mail and auto-attendant. Alternatively, sipX can be used as a high performance Enterprise toll-bypass SIP router. It combines all common calling features, XML-based SIP call routing, voice mail and auto-attendant, Web-based configuration, as well as integrated management and configuration of the PBX and attached phones and gateways. sipX does not require any additional hardware as it interoperates with any SIP compliant gateway, phone or application.&lt;br /&gt;&lt;/li&gt;&lt;/ol&gt;&lt;h4&gt;IVR Platforms&lt;br /&gt;&lt;/h4&gt;&lt;ol start="57"&gt;&lt;li&gt;&lt;strong&gt;&lt;a href="http://wiki.gnutelephony.org/index.php/GNU_Bayonne"&gt;GNU Bayonne&lt;/a&gt;&lt;/strong&gt; - GNU Bayonne 2 was developed starting in 2005, with a special focus on SIP. GNU Bayonne is an integral part of GNU Telephony that offers free, scalable, media independent software environment for development and deployment of telephony solutions for use with current and next generation telephone networks.&lt;br /&gt;&lt;/li&gt;&lt;br /&gt;&lt;li&gt;&lt;strong&gt;&lt;a href="http://www.voicetronix.com//open-source.htm#ctserver"&gt;CT Server&lt;/a&gt;&lt;/strong&gt; - A client/server library for rapid Computer Telephony (CT) application development in Perl. It uses Voicetronix hardware, and runs under Linux. Supports OpenSwitch cards for building PC PBXes.&lt;br /&gt;&lt;/li&gt;&lt;/ol&gt;&lt;h4&gt;Voicemail Apps&lt;br /&gt;&lt;/h4&gt;&lt;ol start="59"&gt;&lt;li&gt;&lt;strong&gt;&lt;a href="http://sourceforge.net/projects/lintad"&gt;lintad&lt;/a&gt;&lt;/strong&gt; - Linux Telephone Answering Device (lintad) is a fax and voicemail application. Lintad uses a softmodem as a soundcard attached to the phoneline to play greetings and record messages. Messages and faxes are made available to browersers via  Apache and PHP.&lt;br /&gt;&lt;/li&gt;&lt;li&gt;&lt;strong&gt;&lt;a href="http://sourceforge.net/projects/linuxvm"&gt;Linux Voicemail/OpenUMS&lt;/a&gt;&lt;/strong&gt; - The purpose of this project is to create an open source voicemail/unified messaging system that runs on Linux that has the ability to integrate with business telephone systems.&lt;br /&gt;&lt;/li&gt;&lt;li&gt;&lt;strong&gt;&lt;a href="http://sourceforge.net/projects/vocp"&gt;VOCP System&lt;/a&gt;&lt;/strong&gt; - VOCP is a complete messaging solution for voice modems, with voicemail, fax, email pager, DTMF command shell and Text-to-Speech support, 3 GUIs and  a web interface. Send and receive faxes and voicemail, listen to emails and    execute programs on the host.&lt;br /&gt;&lt;/li&gt;&lt;li&gt;&lt;strong&gt;&lt;a href="http://sourceforge.net/projects/openvxi"&gt;OpenVXI&lt;/a&gt;&lt;/strong&gt; - The Open VXI VoiceXML interpreter is a portable open source library that interprets the VoiceXML dialog markup language. It is designed to serve as a reference for parties interested in understanding how VoiceXML markup might be executed.&lt;br /&gt;&lt;/li&gt;&lt;/ol&gt;&lt;h4&gt;Speech Software&lt;/h4&gt;&lt;br /&gt;&lt;ol start="63"&gt;&lt;li&gt;&lt;strong&gt;&lt;a href="http://www.cstr.ed.ac.uk/projects/festival/"&gt; The Festival Speech Synthesis System&lt;/a&gt;&lt;/strong&gt; - Festival offers a general framework for building speech synthesis systems as well as including examples of various modules. As a whole it offers full text to speech through a number APIs: from shell level, though a Scheme command interpreter, as a C++ library, from Java, and an Emacs interface. Festival is multi-lingual (currently English (British and American), and Spanish) though English is the most advanced. The system is written in C++ and uses the Edinburgh Speech Tools Library for low level architecture and has a Scheme (SIOD) based command interpreter for control. Documentation is given in the FSF texinfo format which can generate, a printed manual, info files and HTML.&lt;br /&gt;&lt;/li&gt;&lt;br /&gt;&lt;li&gt;&lt;strong&gt;&lt;a href="http://hap.speech.cs.cmu.edu/salt/"&gt;OpenSALT&lt;/a&gt;&lt;/strong&gt; - SALT (Speech Application Language Tags) is a lighweight markup language that integrates speech services into standard markup languages such as HTML. SALT supports the authoring of multi-modal dialogs as well as voice-only dialogs and is suitable for the development of applications across desktop and telephony platforms. SALT is defined through the efforts of the SALT Forum, of which Carnegie Mellon is a contributor. The OpenSALT project makes available a SALT 1.0 compliant open-source browser based on the open source Mozilla web browser and make use of open source Sphinx recognition and Festival synthesis software. Their first Windows release is available for download. A Linux version will follow when a fully featured Windows version is complete. They will subsequently focus on developing a version suitable for mobile devices and a version for telephony-based systems.&lt;br /&gt;&lt;/li&gt;&lt;br /&gt;&lt;li&gt;&lt;strong&gt;&lt;a href="http://cmusphinx.sourceforge.net/html/cmusphinx.php"&gt;CMU Sphinx Projects&lt;/a&gt;&lt;/strong&gt; - The packages that the CMU Sphinx Group is releasing are a set of reasonably mature, world-class speech components that provide a basic level of technology to anyone interested in creating speech-using applications without the once-prohibitive initial investment cost in research and development; the same components are open to peer review by all researchers in the field, and are used for linguistic research as well.&lt;br /&gt;&lt;/li&gt;&lt;/ol&gt;&lt;h4&gt;Fax Servers&lt;br /&gt;&lt;/h4&gt;&lt;ol start="66"&gt;&lt;li&gt;&lt;strong&gt;&lt;a href="http://www.hylafax.org/content/Main_Page"&gt;HylaFAX&lt;/a&gt;&lt;/strong&gt; - HylaFAX is an enterprise-class system for sending and receiving facsimiles as well as for sending alpha-numeric pages. The software is designed around a client-server architecture. Fax modems may reside on a single machine on a network and clients can submit an outbound job from any other machine on the network. Client software is designed to be lightweight and easy to port.&lt;br /&gt;&lt;/li&gt;&lt;br /&gt;&lt;li&gt;&lt;strong&gt;&lt;a href="http://www.inter7.com/index.php?page=astfax"&gt;AstFax&lt;/a&gt;&lt;/strong&gt; - AstFax provides an outgoing email to fax gateway for the Asterisk PBX package. Incoming fax to email can also be configured so your Asterisk server can act as both an outgoing and incoming fax server.&lt;br /&gt;&lt;/li&gt;&lt;/ol&gt;&lt;h4&gt;Development Stacks&lt;br /&gt;&lt;/h4&gt;&lt;ol start="68"&gt;&lt;li&gt;&lt;strong&gt;&lt;a href="http://www.openss7.org/"&gt;OpenSS7&lt;/a&gt;&lt;/strong&gt; - OpenSS7 provides a robust and GPL'ed SS7, SIGTRAN, ISDN and VoIP stack for Linux and other UN*X operating systems.&lt;br /&gt;&lt;/li&gt;&lt;br /&gt;&lt;li&gt;&lt;strong&gt;&lt;a href="http://www.obj-sys.com/open/index.shtml"&gt;ooh323c&lt;/a&gt;&lt;/strong&gt; - Objective Systems Open H.323 for C (ooh323c) is a simple H.323 protocol stack developed in C. The ASN.1 PER messaging code was developed using the ASN1C compiler using a modified version of our core run-time libraries. Additional open source components as well as code developed in-house were added to produce a functioning stack. The goal is to produce a reusable framework that contains the signaling logic to allow channels to be created and terminated for different H.323 applications. ooH323c is now included as an add-on to the Asterisk open source PBX.&lt;br /&gt;&lt;/li&gt;&lt;br /&gt;&lt;li&gt;&lt;strong&gt;&lt;a href="http://www.icebrains-soft.com/skype_library_0"&gt;++Skype Library&lt;/a&gt;&lt;/strong&gt; - ++Skype library is a new, modern way to develop platform independent Skype add-on software. The ++Skype is a C++ library of thoroughly designed classes that can help you to build platform-independent add-on software. Be sure to read the documentation, as this software requires several tools and libraries not included in this article.&lt;br /&gt;&lt;/li&gt;&lt;br /&gt;&lt;li&gt;&lt;strong&gt;&lt;a href="http://www.traffixsystems.com/site/content/t1.asp?Sid=49&amp;Pid=241"&gt;OpenBloX™&lt;/a&gt;&lt;/strong&gt; - The OpenBloX™ framework is an Open Source set of directories and files, implementing in a whole or part of the 3GPP and 3GPP2 Diameter specifications. The package contain at minimum the Diameter base protocol as described by IETF RFC 3588 and any extensions provided to support upper layers as specified by the 3GPP specifications, such as Rx, Gx, Ro, Cx, Sh and other 3GPP defined interfaces.&lt;br /&gt;&lt;/li&gt;&lt;/ol&gt;&lt;h4&gt;Middleware&lt;br /&gt;&lt;/h4&gt;&lt;ol start="72"&gt;&lt;li&gt;&lt;strong&gt;&lt;a href="http://www.mobicents.org-a.googlepages.com/index.html"&gt;MobiCent&lt;/a&gt;&lt;/strong&gt; - Mobicents is the first and only open source VoIP Platform certified for JSLEE 1.0 compliance. Mobicents brings to telecom applications a robust component model and execution environment. It compliments J2EE to enable convergence of voice, video and data in next generation intelligent applications.&lt;br /&gt;&lt;/li&gt;&lt;br /&gt;&lt;li&gt;&lt;strong&gt;&lt;a href="http://www.openernie.org/wiki/index.php?title=Main_Page"&gt;Ernie&lt;/a&gt;&lt;/strong&gt; - Software application that integrates Web 2.0 design principals with next generation communications technologies, including VoIP, presence and web languages such as Python. &lt;a href="http://www.lampware.org/news.php"&gt;LAMP&lt;/a&gt; developers are Ernie's primary users.&lt;br /&gt;&lt;/li&gt;&lt;br /&gt;&lt;li&gt;&lt;strong&gt;&lt;a href="http://www.ag-projects.com/index.php?option=com_content&amp;amp;task=view&amp;amp;id=31&amp;amp;Itemid=1"&gt;SIP Thor&lt;/a&gt;&lt;/strong&gt; - SIP Thor is based on P2PSIP technology that enables scalability with no single point of failure. SIP Thor is based on P2PSIP, a set of technologies that combines exiting IETF standards like SIP, DNS and ENUM with Peer-To-Peer techniques like distributed hash tables (DHT).&lt;/li&gt;&lt;/ol&gt;&lt;div class="blogger-post-footer"&gt;akdayal@yahoo.com&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1818419888217740295-7530874305354158301?l=ananddayal.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ananddayal.blogspot.com/feeds/7530874305354158301/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1818419888217740295&amp;postID=7530874305354158301' title='7 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1818419888217740295/posts/default/7530874305354158301'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1818419888217740295/posts/default/7530874305354158301'/><link rel='alternate' type='text/html' href='http://ananddayal.blogspot.com/2007/04/open-source-voip-apps-resources.html' title='Open Source VoIP Apps &amp; Resources'/><author><name>Anand Kumar Dayal</name><uri>http://www.blogger.com/profile/15821949256334333875</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://bp2.blogger.com/_X_AIQvaR6X4/SJGDCYgSLAI/AAAAAAAADcI/tod2zTuEQCw/S220/PIC-AD-257(2).jpg'/></author><thr:total>7</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1818419888217740295.post-6047436898039644904</id><published>2007-04-03T05:23:00.000-07:00</published><updated>2007-04-03T05:37:44.371-07:00</updated><title type='text'>Asterisk callme back</title><content type='html'>Fro CallMe Back Just call your asterisk box with your mobile, let it ring and hang up. Asterisk will call you back at once and provide you with a normal dial tone. after that can Make call.......&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;simply copy and past on  extensions.conf  file.......&lt;br /&gt;&lt;br /&gt;[capiin]&lt;br /&gt;exten =&gt; 1234/016066666,1,Wait,1&lt;br /&gt;exten =&gt; 1234/016066666,2,AGI,callback.agi&lt;br /&gt;exten =&gt; 1234/016066666,3,Hangup&lt;br /&gt;[capidialtone]&lt;br /&gt;exten =&gt; s,1,Dial,CAPI/@1234:b&lt;br /&gt;exten =&gt; s,2,Hangup&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;And make agi file...&lt;br /&gt;&lt;br /&gt;&lt; ? p h p  &lt;br /&gt;ob_implicit_flush(true);&lt;br /&gt; set_time_limit(0);&lt;br /&gt; $err=fopen("php://stderr","w");&lt;br /&gt; $in = fopen("php://stdin","r");&lt;br /&gt; while (!feof($in)) { $temp = str_replace("\n","",fgets($in,4096));&lt;br /&gt;$s = split(":",$temp); &lt;br /&gt;$agi[str_replace("agi_","",$s[0])] = trim($s[1]);&lt;br /&gt; if (($temp == "") || ($temp == "\n")) { break; &lt;br /&gt;}&lt;br /&gt; } &lt;br /&gt;$cf = fopen("/home/var/spool/asterisk/outgoing/cb".$agi["callerid"],"w+");  fputs($cf,"Channel: CAPI/".$agi["extension"].":".$agi["callerid"]."\n");&lt;br /&gt;fputs($cf,"Context: capidialtone\n");&lt;br /&gt;fputs($cf,"Extension: s\n");&lt;br /&gt; fputs($cf,"SetVar: CALLERIDNUM=".$agi["extension"]."\n");&lt;br /&gt;fputs($cf,"MaxRetries: 2\n");&lt;br /&gt; fputs($cf,"RetryTime: 10\n");&lt;br /&gt;fclose($cf);  fclose($in);&lt;br /&gt;fclose($err); &lt;br /&gt;? &gt;&lt;br /&gt;&lt;br /&gt;In this example 1234 is the incoming/outgoing MSN and 016066666 the callerid of a mobile phone.&lt;div class="blogger-post-footer"&gt;akdayal@yahoo.com&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1818419888217740295-6047436898039644904?l=ananddayal.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ananddayal.blogspot.com/feeds/6047436898039644904/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1818419888217740295&amp;postID=6047436898039644904' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1818419888217740295/posts/default/6047436898039644904'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1818419888217740295/posts/default/6047436898039644904'/><link rel='alternate' type='text/html' href='http://ananddayal.blogspot.com/2007/04/fro-callme-back-just-call-your-asterisk.html' title='Asterisk callme back'/><author><name>Anand Kumar Dayal</name><uri>http://www.blogger.com/profile/15821949256334333875</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://bp2.blogger.com/_X_AIQvaR6X4/SJGDCYgSLAI/AAAAAAAADcI/tod2zTuEQCw/S220/PIC-AD-257(2).jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1818419888217740295.post-6424978849736105078</id><published>2007-03-29T01:48:00.000-07:00</published><updated>2007-03-29T01:49:22.897-07:00</updated><title type='text'>Soekris Net4801 how-to install or configure</title><content type='html'>Soekris Net4801 how-to install&lt;br /&gt;&lt;br /&gt;    * 1 Soekris Net4801 lspci data&lt;br /&gt;    * 2 Bootstrapping Gentoo on a Soekris Net4801 system&lt;br /&gt;          o 2.1 Introduction&lt;br /&gt;          o 2.2 General information&lt;br /&gt;          o 2.3 The first step&lt;br /&gt;          o 2.4 Readying the flash card&lt;br /&gt;          o 2.5 Building the system&lt;br /&gt;          o 2.6 Entering the flash environment&lt;br /&gt;          o 2.7 Building and optimizing your kernel&lt;br /&gt;          o 2.8 Mounting partitions during boot time&lt;br /&gt;          o 2.9 Serial console setup&lt;br /&gt;          o 2.10 Networking setup&lt;br /&gt;          o 2.11 Misc settings and has-to-do's&lt;br /&gt;          o 2.12 Installing and optimizing Grub&lt;br /&gt;          o 2.13 Exiting the environment&lt;br /&gt;          o 2.14 Troubleshooting&lt;br /&gt;                + 2.14.1 Serial console software&lt;br /&gt;                + 2.14.2 Grub issues&lt;br /&gt;          o 2.15 Optimizations&lt;br /&gt;                + 2.15.1 Optimizing the portage tree&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Soekris Net4801 lspci data&lt;br /&gt;&lt;br /&gt;00:00.0 Host bridge: Cyrix Corporation PCI Master&lt;br /&gt;00:06.0 Ethernet controller: National Semiconductor Corporation DP83815 (MacPhyter) Ethernet Controller&lt;br /&gt;00:07.0 Ethernet controller: National Semiconductor Corporation DP83815 (MacPhyter) Ethernet Controller&lt;br /&gt;00:08.0 Ethernet controller: National Semiconductor Corporation DP83815 (MacPhyter) Ethernet Controller&lt;br /&gt;00:12.0 ISA bridge: National Semiconductor Corporation SC1100 Bridge&lt;br /&gt;00:12.1 Bridge: National Semiconductor Corporation SC1100 SMI&lt;br /&gt;00:12.2 IDE interface: National Semiconductor Corporation SCx200 IDE (rev 01)&lt;br /&gt;00:12.5 Bridge: National Semiconductor Corporation SC1100 XBus&lt;br /&gt;00:13.0 USB Controller: Compaq Computer Corporation ZFMicro Chipset USB (rev 08)&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Bootstrapping Gentoo on a Soekris Net4801 system&lt;br /&gt;&lt;br /&gt;Introduction&lt;br /&gt;&lt;br /&gt;This how-to describes how to install a complete Gentoo Linux system on a Soekris Net4801 system. Let's begin by looking at the capabilities of the system itself, and after that, i will explain how to make Gentoo run on it using a 2 GB flash card and the on-board IDE flash card interface.&lt;br /&gt;&lt;br /&gt;General information&lt;br /&gt;&lt;br /&gt;The machine consists of an AMD Geode 266 mhz cpu, 2 serial ports(one of them is pin-based) and a compatch flash based IDE interface. There are several features on the board besides these, but at this point we'll stick with what we need to get the system up and running with Gentoo. The general idea here, is to built a system on a flash card using an ordinary PC, which can then be booted on the Soekris box upon built completion. This procedure pretty much follows a standard Gentoo installation as described in the handbook, but I'll take you through the steps to avoid confusion.&lt;br /&gt;&lt;br /&gt;The first step&lt;br /&gt;&lt;br /&gt;Start out by booting a system with a functioning network connection using either the Gentoo Minimal CD, or any other system you have at your disposal. It's totally up to you what system you want to use, as long as it is Linux and has a working internet network connection. Fire up your favorite console and grant yourself root priviledges. Insert the Compact Flash card into a flash reader and connect it to your machine. When you're ready, follow the instructions below.&lt;br /&gt;&lt;br /&gt;Readying the flash card&lt;br /&gt;&lt;br /&gt;First we need to identify the flash card. Type:&lt;br /&gt;&lt;br /&gt;# fdisk -l&lt;br /&gt;&lt;br /&gt;When you've figured out what device node your flash card uses, we need to create the necessary partitions on the card. In this how-to we assume that the card is located at sdb. Type:&lt;br /&gt;&lt;br /&gt;# fdisk /dev/sdb&lt;br /&gt;&lt;br /&gt;Start out by erasing all current partitions on the card. "p" lists all partitions, and "d" allows you to delete them one by one.&lt;br /&gt;Warning: You have to assure yourself that you are in fact working on the flash card. If you are not, you might end up deleting your entire system! If you accidentally erase something you shouldn't have, quit the program using ctrl+c. Then the changes will be undone.&lt;br /&gt;&lt;br /&gt;Create a swap partition(sdb1), and a root partition(sdb2). "n" creates a new partition, and "t" changes its type. 82 is swap. 128 MB should be fine for the swap partition, and the root partition should have at least 1.5 MB. Remember to set the bootflag on your root partition using "a". Finally, save your spanking new partition layout using "w".&lt;br /&gt;&lt;br /&gt;Now we need to create the filesystems in the new partitions. Remember to use your own device node. This example again uses sdb. Type:&lt;br /&gt;&lt;br /&gt;# mkswap /dev/sdb1&lt;br /&gt;# mke2fs -j /dev/sdb2&lt;br /&gt;&lt;br /&gt;The flash card is now ready for the installation.&lt;br /&gt;&lt;br /&gt;Building the system&lt;br /&gt;&lt;br /&gt;First, activate the swap partition:&lt;br /&gt;&lt;br /&gt;# swapon /dev/sdb1&lt;br /&gt;&lt;br /&gt;Now the root partition needs to be mounted. Type:&lt;br /&gt;&lt;br /&gt;# mkdir /mnt/gentoo&lt;br /&gt;# mount /dev/sdb2 /mnt/gentoo&lt;br /&gt;&lt;br /&gt;Verify the date:&lt;br /&gt;&lt;br /&gt;# date&lt;br /&gt;&lt;br /&gt;If it's incorrectly set, change it using(this example is february 5th 2007 15:39):&lt;br /&gt;&lt;br /&gt;# date 020515392007&lt;br /&gt;&lt;br /&gt;Now we need to download and apply the basic system onto the flash card. It is very important that you use a stage3 i586 release, since the Soekris cpu doesn't support i686. Type:&lt;br /&gt;&lt;br /&gt;# cd /mnt/gentoo&lt;br /&gt;# wget http://mirror.uni-c.dk/pub/gentoo/releases/x86/2006.1/stages/stage3-i586-2006.1.tar.bz2&lt;br /&gt;# tar xvjpf stage3-*.tar.bz2&lt;br /&gt;&lt;br /&gt;You may, of course, use some other mirror for this file if you like, and also keep in mind top grab the latest release. At the time of this writing 2006.1 is the newest release. More mirrors can be found at http://www.gentoo.org/main/en/mirrors.xml&lt;br /&gt;&lt;br /&gt;Now grab a portage snapshot, and unpack it on the flash card. Again, you may use any mirror you like. Type:&lt;br /&gt;&lt;br /&gt;# wget http://mirror.uni-c.dk/pub/gentoo/snapshots/portage-latest.tar.bz2&lt;br /&gt;# tar xvjf /mnt/gentoo/portage-latest.tar.bz2 -C /mnt/gentoo/usr&lt;br /&gt;&lt;br /&gt;Add the following lines to the file /mnt/gentoo/etc/make.conf:&lt;br /&gt;File: /etc/make.conf&lt;br /&gt;&lt;br /&gt;MAKEOPTS="-j2"&lt;br /&gt;&lt;br /&gt;Also, add the needed mirrors and rsync servers using(this only works if you use a Gentoo system, or the Gentoo minimal CD. Otherwise you'll have to find the mirrors manually at http://www.gentoo.org/main/en/mirrors.xml):&lt;br /&gt;&lt;br /&gt;# mirrorselect -i -o &gt;&gt; /mnt/gentoo/etc/make.conf&lt;br /&gt;# mirrorselect -i -r -o &gt;&gt; /mnt/gentoo/etc/make.conf&lt;br /&gt;&lt;br /&gt;Choose the ones appropriate for your location.&lt;br /&gt;&lt;br /&gt;Copy your network information into the new system. Type:&lt;br /&gt;&lt;br /&gt;# cp -L /etc/resolv.conf /mnt/gentoo/etc/resolv.conf&lt;br /&gt;&lt;br /&gt;Now it's time to chroot into the new environment. Type:&lt;br /&gt;&lt;br /&gt;# mount -t proc none /mnt/gentoo/proc&lt;br /&gt;# mount -o bind /dev /mnt/gentoo/dev&lt;br /&gt;# chroot /mnt/gentoo /bin/bash&lt;br /&gt;# env-update&lt;br /&gt;# source /etc/profile&lt;br /&gt;# export PS1="(chroot) $PS1"&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Entering the flash environment&lt;br /&gt;&lt;br /&gt;You are now working inside your flash card. Cool, eh? I think it is. Anyways, start out by syncing your Portage tree:&lt;br /&gt;&lt;br /&gt;# emerge --sync&lt;br /&gt;&lt;br /&gt;If it tells you that a newer version of Portage is available, emerge it using:&lt;br /&gt;&lt;br /&gt;# emerge portage&lt;br /&gt;&lt;br /&gt;You have to define your timezone. In this example I'm using Europe, Copenhagen. You, of course, have to adjust this to fit with your own timezone. Tab completion is your friend:&lt;br /&gt;&lt;br /&gt;# cp /usr/share/zoneinfo/Europe/Copenhagen /etc/localtime&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Building and optimizing your kernel&lt;br /&gt;&lt;br /&gt;Now we need to install the kernel source. Type:&lt;br /&gt;&lt;br /&gt;# USE="-doc symlink" emerge -va gentoo-sources&lt;br /&gt;&lt;br /&gt;At this point we need to built a kernel for the Soekris system. Start the configuration like this:&lt;br /&gt;&lt;br /&gt;# cd /usr/src/linux&lt;br /&gt;# make menuconfig&lt;br /&gt;&lt;br /&gt;The following settings are essential:&lt;br /&gt;&lt;br /&gt;--&gt; Processor type and features&lt;br /&gt;    --&gt; [ ]Symmetric multi-processing support&lt;br /&gt;    --&gt; Processor family&lt;br /&gt;        --&gt;(x) GeodeGX1&lt;br /&gt;&lt;br /&gt;--&gt; Device Drivers&lt;br /&gt;    --&gt; ATA/ATAPI/MFM/RLL support&lt;br /&gt;        --&gt; &lt;x&gt; National SCx200 chipset support&lt;br /&gt;&lt;br /&gt;    --&gt; Serial ATA (prod) and Parallel ATA (experimental) drivers&lt;br /&gt;        --&gt; &lt;x&gt; SC1200 PATA support&lt;br /&gt;    --&gt; Network device support&lt;br /&gt;        --&gt; [x] Network device support&lt;br /&gt;            --&gt; Ethernet (10 or 100Mbit)&lt;br /&gt;                --&gt; [x] National Semiconductor DP8381x series PCI Ethernet support&lt;br /&gt;    --&gt; Sound&lt;br /&gt;        --&gt; &lt; &gt; Sound card support&lt;br /&gt;&lt;br /&gt;You may turn off lots of other unneeded stuff, but the above should give you a bootable kernel, so we'll leave it at that for the time being. After all, this is a guide to get Gentoo running on the Soekris, not a kernel setup guide.&lt;br /&gt;&lt;br /&gt;End the configuration and answer YES when asked if you want to save the configuration. Now, compile the kernel:&lt;br /&gt;&lt;br /&gt;# make &amp;&amp;amp; make modules_install&lt;br /&gt;&lt;br /&gt;Copy your brand new kernel into /boot:&lt;br /&gt;&lt;br /&gt;# cp arch/i386/boot/bzImage /boot/kernel-2.6.19-gentoo-r5&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Mounting partitions during boot time&lt;br /&gt;&lt;br /&gt;Now we have to make sure that our partitions gets mounted correctly during boot time. This is done through /etc/fstab. We have a swap partition and a root partition and our fstab therefore have to look like this:&lt;br /&gt;File: /etc/fstab&lt;br /&gt;&lt;br /&gt;/dev/hda2               /               ext3            noatime         0 1&lt;br /&gt;/dev/hda1               none            swap            sw              0 0&lt;br /&gt;proc                    /proc           proc            defaults        0 0&lt;br /&gt;shm                     /dev/shm        tmpfs           nodev,nosuid,noexec     0 0&lt;br /&gt;&lt;br /&gt;Be aware that you might need to change hda to hdb in the first two lines. It depends on how your Soekris box detects your flash card. Normally though, the card will be named hda, so the above settings should be ok. If you experience boot problems when you're ready to boot the machine after following this how-to, you should try changing hda to hdb to see if it solves the problem.&lt;br /&gt;&lt;br /&gt;Serial console setup&lt;br /&gt;&lt;br /&gt;We now have to make sure that we can log onto the Soekris system using a null modem serial cable. To do this we need to make a change in our /etc/inittab file. Type:&lt;br /&gt;&lt;br /&gt;# nano -w /etc/inittab&lt;br /&gt;&lt;br /&gt;Find the section ressembling the following lines, and change it to look like this:&lt;br /&gt;File: /etc/inittab&lt;br /&gt;&lt;br /&gt;...&lt;br /&gt;# SERIAL CONSOLES&lt;br /&gt;s1:12345:respawn:/sbin/agetty 19200 ttyS0 vt100&lt;br /&gt;...&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Networking setup&lt;br /&gt;&lt;br /&gt;Now set your desired hostname:&lt;br /&gt;&lt;br /&gt;# nano -w /etc/conf.d/hostname&lt;br /&gt;&lt;br /&gt;Set up the machine's IP address in /etc/conf.d/net. Below is an example of a class C network using static IP and a gateway. If you want to use dhcp the file must be blank:&lt;br /&gt;File: /etc/conf.d/net&lt;br /&gt;&lt;br /&gt;config_eth0=( "x.x.x.x netmask 255.255.255.0" )&lt;br /&gt;routes_eth0=( "default gw x.x.x.x" )&lt;br /&gt;&lt;br /&gt;Add your NIC(network card) to the default runlevel:&lt;br /&gt;&lt;br /&gt;# rc-update add net.eth0 default&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Misc settings and has-to-do's&lt;br /&gt;&lt;br /&gt;Change the root password to whatever you want to use:&lt;br /&gt;&lt;br /&gt;# passwd&lt;br /&gt;&lt;br /&gt;If you want to localize your keyboard settings, change "us" to your desired language in /etc/conf.d/keymaps:&lt;br /&gt;&lt;br /&gt;# nano -w /etc/conf.d/keymaps&lt;br /&gt;&lt;br /&gt;Remember to change the machine's time to local time if you're hardware clock isn't running UTC(change "UTC" to "local"):&lt;br /&gt;&lt;br /&gt;# nano -w /etc/conf.d/clock&lt;br /&gt;&lt;br /&gt;Now, install syslog-ng and vixie-cron and add them to the default runlevel:&lt;br /&gt;&lt;br /&gt;# emerge syslog-ng&lt;br /&gt;# emerge vixie-cron&lt;br /&gt;# rc-update add syslog-ng default&lt;br /&gt;# rc-update add vixie-cron default&lt;br /&gt;&lt;br /&gt;If you are using dhcp, remember to install a dhcp client:e dhcp(jeg mener servicen hedder dhcpcd, men jeg er ikke helt sikker.):&lt;br /&gt;&lt;br /&gt;# emerge -va dhcpcd&lt;br /&gt;&lt;br /&gt;Also, install openssh, which enables you to connect to the Soekris box using the network interface:&lt;br /&gt;&lt;br /&gt;# emerge -va openssh&lt;br /&gt;# rc-update add sshd default&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Installing and optimizing Grub&lt;br /&gt;&lt;br /&gt;Now, install the Grub boot loader:&lt;br /&gt;&lt;br /&gt;# emerge -va grub&lt;br /&gt;&lt;br /&gt;What we need to do now, is to optimize the /boot/grub/grub.conf file to work with our Soekris box. This enables us to get a read-out from the null model cable. First, remove any existing grub.conf file(there probably aren't any, but just to make sure):&lt;br /&gt;&lt;br /&gt;# rm /boot/grub/grub.conf&lt;br /&gt;&lt;br /&gt;Now, create a new one:&lt;br /&gt;&lt;br /&gt;# nano -w /boot/grub/grub.conf&lt;br /&gt;&lt;br /&gt;The first section has to look like this. You can change the timeout valure if you like, but 5 seconds seems quite suitable:&lt;br /&gt;File: /boot/grub/grub.conf&lt;br /&gt;&lt;br /&gt;default 0&lt;br /&gt;timeout 5&lt;br /&gt;serial --unit=0 --speed=19200 --word=8 --parity=no --stop=1&lt;br /&gt;terminal serial&lt;br /&gt;&lt;br /&gt;Now, add your Gentoo kernel and the belonging options. Insert the following section and adjust it to fit your own kernel image:&lt;br /&gt;File: /boot/grub/grub.conf&lt;br /&gt;&lt;br /&gt;title=Gentoo Linux 2.6.19-r5&lt;br /&gt;root (hd0,1)&lt;br /&gt;kernel /boot/kernel-2.6.19-gentoo-r5 root=/dev/hda2 console=ttyS0,19200n8&lt;br /&gt;&lt;br /&gt;We now need to install Grub onto the master boot record of the flash card. It is very important that you use the correct hd values here. Grub counts from 0 instead of 1 as Linux device nodes do. If sda is your primary harddrive it would be called hd0 using Grub terms and the first partition on that drive would be named hd0,0 and so on and so forth. If you only have one harddrive connected, your flash card is probably called hd1 and your root partition on the flash card is probably called hd1,1, but remember to use tab completion just to make sure. First start the Grub command line tool:&lt;br /&gt;&lt;br /&gt;# grub&lt;br /&gt;&lt;br /&gt;Now, define the root partition on the flash card. If your flash card is called sdb, is disc number 2 in your system, and has its root partition as partition 2, type as follows:&lt;br /&gt;&lt;br /&gt;&gt; root (hd1,1)&lt;br /&gt;&lt;br /&gt;Now install Grub into the flash MBR using the command. Again, we assume that the flash card is drive number 2 in your system:&lt;br /&gt;&lt;br /&gt;&gt; setup (hd1)&lt;br /&gt;&gt; quit&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Exiting the environment&lt;br /&gt;&lt;br /&gt;The system is now finished, and you may exit the chroot and unmount all flash partitions:&lt;br /&gt;&lt;br /&gt;# exit&lt;br /&gt;# umount /mnt/gentoo/proc&lt;br /&gt;# umount /mnt/gentoo/dev&lt;br /&gt;# umount /mnt/gentoo&lt;br /&gt;&lt;br /&gt;If everything went well, the system is now ready for booting in the Soekris Net4801 box itself. If you encounter any problems, I've added a few notes below, which might help you solve some of those issues.&lt;br /&gt;&lt;br /&gt;Troubleshooting&lt;br /&gt;&lt;br /&gt;Serial console software&lt;br /&gt;&lt;br /&gt;You can use the software gtkterm(emerge gtkterm) through X to communicate with the Soekris Net4801 using a null model cable. Connect the cable to your PC and set the speed to the Soekris default value of 19200, bits=8, stopbits=1, flowcontrol=none, parity=none. This will allow you to follow the boot process and maintain the system. An SSH connection is recommended for this during normal circumstances, but since it doesn't allow you to get read-out during boot, the null model connections is very handy if you have to diagnose boot problems.&lt;br /&gt;&lt;br /&gt;Grub issues&lt;br /&gt;&lt;br /&gt;If Grub doesn't load as expected, you might have installed Grub on a wrong disc. Re-insert the flash card into a card reader, and reenter the environment to check if you made any errors.&lt;br /&gt;&lt;br /&gt;If Grub can't find your root directory during boot time, you might need to change hda to hdb in /etc/fstab.&lt;br /&gt;&lt;br /&gt;Optimizations&lt;br /&gt;&lt;br /&gt;Optimizing the portage tree&lt;br /&gt;&lt;br /&gt;To optimize the portage tree for an embedded system, we can exclude a lot of the software we won't ever need. It is safe to assume that the system won't ever run X or KDE/Gnome, so there is no reason for those components to take up space in the tree. This optimization is also conveyed with syncronization in mind. Syncronizing the full portage tree on a slow system like the Soekris Net4801 is a major annoyance, since it takes forever to complete. The exclusion of packages can be done using the following method:&lt;br /&gt;&lt;br /&gt;Create a file that contains your excludes(/etc/portage/rsync_excludes). The following excludes are appropriate. A lot more can be excluded if you want to, but these are deemed suitable for exclusion. Insert the following into /etc/portage/rsync_excludes:&lt;br /&gt;File: /etc/portage/rsync_excludes&lt;br /&gt;&lt;br /&gt;- app-accessibility/&lt;br /&gt;- metadata/cache/app-accessibility/&lt;br /&gt;- app-emulation/&lt;br /&gt;- metadata/cache/app-emulation/&lt;br /&gt;- app-laptop/&lt;br /&gt;- metadata/cache/app-laptop/&lt;br /&gt;- app-office/&lt;br /&gt;- metadata/cache/app-office/&lt;br /&gt;- app-pda/&lt;br /&gt;- metadata/cache/app-pda/&lt;br /&gt;- dev-games/&lt;br /&gt;- metadata/cache/dev-games/&lt;br /&gt;- games-*/&lt;br /&gt;- metadata/cache/games-*/&lt;br /&gt;- gnome-*/&lt;br /&gt;- metadata/cache/gnome-*/&lt;br /&gt;- kde-*/&lt;br /&gt;- metadata/cache/kde-*/&lt;br /&gt;- rox-*/&lt;br /&gt;- metadata/cache/rox-*/&lt;br /&gt;- media-gfx/&lt;br /&gt;- metadata/cache/media-gfx/&lt;br /&gt;- media-tv/&lt;br /&gt;- metadata/cache/media-tv/&lt;br /&gt;- media-video/&lt;br /&gt;- metadata/cache/media-video/&lt;br /&gt;- sci-*/&lt;br /&gt;- metadata/cache/sci-*/&lt;br /&gt;- x11-*/&lt;br /&gt;- metadata/cache/x11-*/&lt;br /&gt;- xfce-*/&lt;br /&gt;- metadata/cache/xfce-*/&lt;br /&gt;&lt;br /&gt;Add these excludes permantently to your /etc/make.conf file:&lt;br /&gt;File: /etc/make.conf&lt;br /&gt;&lt;br /&gt; ...&lt;br /&gt; PORTAGE_RSYNC_EXTRA_OPTS="--exclude-from=/etc/portage/rsync_excludes"&lt;br /&gt; ...&lt;br /&gt;&lt;br /&gt;Finally, remove the excludes from the portage tree::&lt;br /&gt;&lt;br /&gt;# cd /usr/portage&lt;br /&gt;# rm -r `gawk '{ printf("%s ",$2) }' /etc/portage/rsync_excludes`&lt;br /&gt;&lt;br /&gt;The optimization is now complete, and you can run a "emerge --sync" to test it.&lt;div class="blogger-post-footer"&gt;akdayal@yahoo.com&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1818419888217740295-6424978849736105078?l=ananddayal.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ananddayal.blogspot.com/feeds/6424978849736105078/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1818419888217740295&amp;postID=6424978849736105078' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1818419888217740295/posts/default/6424978849736105078'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1818419888217740295/posts/default/6424978849736105078'/><link rel='alternate' type='text/html' href='http://ananddayal.blogspot.com/2007/03/soekris-net4801-how-to-install-or.html' title='Soekris Net4801 how-to install or configure'/><author><name>Anand Kumar Dayal</name><uri>http://www.blogger.com/profile/15821949256334333875</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://bp2.blogger.com/_X_AIQvaR6X4/SJGDCYgSLAI/AAAAAAAADcI/tod2zTuEQCw/S220/PIC-AD-257(2).jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1818419888217740295.post-6230565010817729163</id><published>2007-03-26T23:39:00.000-07:00</published><updated>2007-03-27T03:20:35.160-07:00</updated><title type='text'>Voice Mail configuration AGI</title><content type='html'>here voice mail agi in perl &amp; configuration infornation..&lt;br /&gt;&lt;a href="http://www.voip-info.org/wiki/view/Magic+VoiceMail"&gt;http://www.voip-info.org/wiki/view/Magic+VoiceMail&lt;/a&gt;&lt;br /&gt; and TDM400P configuration&lt;br /&gt;http://www.voip-info.org/wiki/view/TDM400P&lt;div class="blogger-post-footer"&gt;akdayal@yahoo.com&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1818419888217740295-6230565010817729163?l=ananddayal.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ananddayal.blogspot.com/feeds/6230565010817729163/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1818419888217740295&amp;postID=6230565010817729163' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1818419888217740295/posts/default/6230565010817729163'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1818419888217740295/posts/default/6230565010817729163'/><link rel='alternate' type='text/html' href='http://ananddayal.blogspot.com/2007/03/voice-mail-configuration-agi.html' title='Voice Mail configuration AGI'/><author><name>Anand Kumar Dayal</name><uri>http://www.blogger.com/profile/15821949256334333875</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://bp2.blogger.com/_X_AIQvaR6X4/SJGDCYgSLAI/AAAAAAAADcI/tod2zTuEQCw/S220/PIC-AD-257(2).jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1818419888217740295.post-8803837218093970303</id><published>2007-02-23T12:38:00.000-08:00</published><updated>2007-02-28T17:05:33.860-08:00</updated><title type='text'>These are step by step very simple instructions to help most people to build</title><content type='html'>&lt;p class="MsoNormal"&gt;&lt;span style="font-size:130%;"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;h1 style="margin: 0in 0in 0.0001pt;"&gt;&lt;a name="TOP"&gt;&lt;/a&gt;&lt;span style="font-size:16;"&gt;Tutorial on SIP and SIP SER server Installation of SER.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/h1&gt;  &lt;p class="MsoNormal"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;  &lt;h3 style="margin: 0in 0in 0.0001pt;"&gt;I would like to present three installation options:&lt;/h3&gt;  &lt;p style="margin: 0in 0in 0.0001pt 0.5in; text-indent: -0.25in;"&gt;&lt;!--[if !supportLists]--&gt;&lt;span style="font-family:Symbol;"&gt;&lt;span style=""&gt;·&lt;span style=""&gt;        &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;!--[endif]--&gt;Follow the steps below using Red Hat Fedora Core 1 and rpm files. This is possibly getting a little old now (2006)&lt;/p&gt;  &lt;p style="margin: 0in 0in 0.0001pt 0.5in; text-indent: -0.25in;"&gt;&lt;!--[if !supportLists]--&gt;&lt;span style="font-family:Symbol;"&gt;&lt;span style=""&gt;·&lt;span style=""&gt;        &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;!--[endif]--&gt;FreeBSD comes with SER as an installable option, just tick the box.&lt;/p&gt;  &lt;p style="margin: 0in 0in 0.0001pt 0.5in; text-indent: -0.25in;"&gt;&lt;!--[if !supportLists]--&gt;&lt;span style="font-family:Symbol;"&gt;&lt;span style=""&gt;·&lt;span style=""&gt;        &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;!--[endif]--&gt;I have done some testing using Fedora Core 4 using the same steps as below&lt;br /&gt;and compiled SER from www.openser.org and it seams to be the same as the&lt;br /&gt;following. &lt;/p&gt;  &lt;h3 style="margin: 0in 0in 0.0001pt;"&gt;These are step by step very simple instructions to help most people to build&lt;br /&gt;a SER Server starting with a PC.&lt;/h3&gt;  &lt;p class="MsoNormal"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;&lt;a name="redhat"&gt;&lt;/a&gt;Linux Kernal using RedHat's Open Source "Fedora&lt;br /&gt;&lt;h2 style="margin: 0in 0in 0.0001pt;"&gt;Core 1"&lt;/h2&gt;  &lt;p class="MsoNormal"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;  &lt;p style="margin: 0in 0in 0.0001pt;"&gt;The following instructions are based on building a Unix server using typical PC Intel i386 based hardware.&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;  &lt;p style="margin: 0in 0in 0.0001pt;"&gt;IMPORTANT NOTE: Fedora Core 1 does not support Intel PCs using Serial ATA &lt;span style=""&gt; &lt;/span&gt;Harddisks, and recent testing shows that SER does not run on Fedora Core 2.&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-left: 0.5in;"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;  &lt;ol style="margin-top: 0in;" start="1" type="1"&gt;&lt;li class="MsoNormal" style=""&gt;Follow      the instructions at http://fedora.redhat.com/download/ &lt;/li&gt;&lt;ol style="margin-top: 0in;" start="1" type="1"&gt;&lt;li class="MsoNormal" style=""&gt;Download       the three ISO images for Fedora Core 1 (not 2), also called&lt;br /&gt;    "yarrow" from Red Hat.&lt;br /&gt;    http://download.fedora.redhat.com/pub/fedora/linux/core/1/&lt;/li&gt;&lt;li class="MsoNormal" style=""&gt;Create       three CDROMs using the three ISO images.&lt;/li&gt;&lt;/ol&gt;&lt;li class="MsoNormal" style=""&gt;&lt;b&gt;&lt;span style="color: rgb(204, 102, 0);"&gt;Insert Fedora Core 1 CD 1 and boot from CD&lt;/span&gt;&lt;/b&gt;      &lt;/li&gt;&lt;ol style="margin-top: 0in;" start="1" type="1"&gt;&lt;li class="MsoNormal" style=""&gt;Press       Enter at boot screen to start setup&lt;/li&gt;&lt;li class="MsoNormal" style=""&gt;When       prompted to do the Media Test you can select Skip if you are confident       your media is OK&lt;/li&gt;&lt;li class="MsoNormal" style=""&gt;On the       Fedora Core welcome screen, select Next&lt;/li&gt;&lt;li class="MsoNormal" style=""&gt;Select       English (English) as your language and press Next &lt;/li&gt;&lt;li class="MsoNormal" style=""&gt;Select       your keyboard type and press Next&lt;/li&gt;&lt;li class="MsoNormal" style=""&gt;Select       your mouse type and press Next&lt;/li&gt;&lt;li class="MsoNormal" style=""&gt;If       you have an existing Redhat Linux installation on the computer&lt;br /&gt;    the Fedora installer will find this installation and ask you if you&lt;br /&gt;    want to Upgrade the existing installation or perform a refresh       installation&lt;br /&gt;    of Fedora Core. If this is the case, select Install Fedora Core and&lt;br /&gt;    press Next&lt;/li&gt;&lt;/ol&gt;&lt;li class="MsoNormal" style=""&gt;We      want to &lt;b&gt;&lt;span style="color: rgb(204, 102, 0);"&gt;do a Server installation&lt;/span&gt;&lt;/b&gt;&lt;span style="color: rgb(204, 102, 0);"&gt; &lt;/span&gt;of Fedora Core so select Server and press      Next &lt;/li&gt;&lt;/ol&gt;  &lt;p class="MsoNormal" style="margin-left: 0.5in;"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;  &lt;ol style="margin-top: 0in;" start="4" type="1"&gt;&lt;li class="MsoNormal" style=""&gt;Select      &lt;b&gt;&lt;span style="color: rgb(204, 102, 0);"&gt;Manual partition with Disk Druid &lt;/span&gt;&lt;/b&gt;and      press Next&lt;/li&gt;&lt;ol style="margin-top: 0in;" start="1" type="1"&gt;&lt;li class="MsoNormal" style=""&gt;Delete       any existing disk partitions so that your whole disk is Free Space&lt;/li&gt;&lt;li class="MsoNormal" style=""&gt;For       simplicity we will make&lt;span style="color: rgb(204, 102, 0);"&gt; &lt;b&gt;3 partitions, one       swap partition, one boot partition and one big root partition&lt;/b&gt;&lt;/span&gt;&lt;/li&gt;&lt;li class="MsoNormal" style=""&gt;Create       a &lt;b&gt;&lt;span style="color: rgb(204, 102, 0);"&gt;"Swap" partition to be 2 or 4       times the size of your available memory&lt;/span&gt;&lt;/b&gt; &lt;/li&gt;&lt;ol style="margin-top: 0in;" start="1" type="1"&gt;&lt;li class="MsoNormal" style=""&gt;Click        New&lt;/li&gt;&lt;li class="MsoNormal" style=""&gt;Select        swap as the File System Type&lt;/li&gt;&lt;li class="MsoNormal" style=""&gt;In        the Size (MB) text field enter the size of your swap partition.&lt;br /&gt;As a guide, set the swap partition to be 2 or 4 times the size of your available memory. As an example, my computer has 256Meg RAM, so I will set a 1Gig swap&lt;/li&gt;&lt;li class="MsoNormal" style=""&gt;Under        Additional Size Options select Fixed Size&lt;/li&gt;&lt;li class="MsoNormal" style=""&gt;Ensure        Force to be a primary partition is not selected and press OK&lt;/li&gt;&lt;/ol&gt;&lt;li class="MsoNormal" style=""&gt;Create       a&lt;b&gt;&lt;span style="color:yellow;"&gt; &lt;/span&gt;&lt;span style="color: rgb(204, 102, 0);"&gt;"/boot"       partition with a File System Type of etx3 with 100Mbytes&lt;/span&gt;&lt;/b&gt; &lt;/li&gt;&lt;ol style="margin-top: 0in;" start="1" type="1"&gt;&lt;li class="MsoNormal" style=""&gt;Click        New&lt;/li&gt;&lt;li class="MsoNormal" style=""&gt;In        the Mount Point text field enter /boot to be an ext3 type of 100Meg. &lt;/li&gt;&lt;li class="MsoNormal" style=""&gt;Select        ext3 as the File System Type&lt;/li&gt;&lt;li class="MsoNormal" style=""&gt;In the Size (MB) text field enter the size of your boot partition. This partition should be at least 50Meg, and a good size is usually&lt;br /&gt;     100Meg.&lt;/li&gt;&lt;li class="MsoNormal" style=""&gt;Under        Additional Size Options select Fixed Size&lt;/li&gt;&lt;li class="MsoNormal" style=""&gt;Select        Force to be a primary partition and press OK&lt;/li&gt;&lt;/ol&gt;&lt;li class="MsoNormal" style=""&gt;Create       a&lt;b&gt;&lt;span style="color:blue;"&gt; &lt;/span&gt;&lt;span style="color: rgb(204, 102, 0);"&gt;"/"    &lt;br /&gt;    root partition with the remained of the disk &lt;/span&gt;&lt;/b&gt;&lt;span style="color:black;"&gt;(Optional would be to create a /var partition for the       logs to go)&lt;/span&gt; &lt;/li&gt;&lt;ol style="margin-top: 0in;" start="1" type="1"&gt;&lt;li class="MsoNormal" style=""&gt;Click        New&lt;/li&gt;&lt;li class="MsoNormal" style=""&gt;In        the Mount Point text field enter /&lt;/li&gt;&lt;li class="MsoNormal" style=""&gt;Select        ext3 as the File System Type&lt;/li&gt;&lt;li class="MsoNormal" style=""&gt;Under        Additional Size Options select Fill to maximum allowable size to use the        remainder of the disk&lt;/li&gt;&lt;li class="MsoNormal" style=""&gt;Ensure        Force to be a primary partition is not selected and press OK&lt;/li&gt;&lt;li class="MsoNormal" style=""&gt;Now        you have setup your partitions press Next&lt;/li&gt;&lt;/ol&gt;&lt;/ol&gt;&lt;li class="MsoNormal" style=""&gt;Select      GRUB as the boot loader and press Next&lt;/li&gt;&lt;li class="MsoNormal" style=""&gt;Next you will need to setup the network device of your machine. The information you enter here will vary depending on your environment &lt;/li&gt;&lt;ol style="margin-top: 0in;" start="1" type="1"&gt;&lt;li class="MsoNormal" style=""&gt;Select       eth0 device and press Edit&lt;/li&gt;&lt;li class="MsoNormal" style=""&gt;Deselect       Configure using DHCP - you want to configure a fixed ip address&lt;/li&gt;&lt;li class="MsoNormal" style=""&gt;Select       Activate on boot&lt;/li&gt;&lt;li class="MsoNormal" style=""&gt;Enter       your IP address&lt;/li&gt;&lt;li class="MsoNormal" style=""&gt;Enter       your Netmask&lt;/li&gt;&lt;li class="MsoNormal" style=""&gt;Press       OK&lt;/li&gt;&lt;li class="MsoNormal" style=""&gt;Set       the hostname manually&lt;/li&gt;&lt;li class="MsoNormal" style=""&gt;Enter       Gateway IP address.&lt;/li&gt;&lt;li class="MsoNormal" style=""&gt;Enter       Primary DNS IP address - &lt;span style="color:red;"&gt;For the Tutorial you may       need to change it to simulate the SRV records, probably 169.222.239.2&lt;/span&gt;&lt;/li&gt;&lt;li class="MsoNormal" style=""&gt;Enter       Secondary DNS IP address if available&lt;/li&gt;&lt;li class="MsoNormal" style=""&gt;Enter       Tertiary DNS IP address if available&lt;/li&gt;&lt;li class="MsoNormal" style=""&gt;Press       Next&lt;/li&gt;&lt;/ol&gt;&lt;li class="MsoNormal" style=""&gt;Select      No firewall and press Next &lt;/li&gt;&lt;ol style="margin-top: 0in;" start="1" type="1"&gt;&lt;li class="MsoNormal" style=""&gt;Press       Proceed on the warning screen about a firewall, you can setup a proper       firewall later on&lt;/li&gt;&lt;/ol&gt;&lt;li class="MsoNormal" style=""&gt;Select      the Default language for your system and press Next&lt;/li&gt;&lt;li class="MsoNormal" style=""&gt;Select      your timezone and press Next&lt;/li&gt;&lt;li class="MsoNormal" style=""&gt;Enter      your desired Root Password and Confirm and press Next&lt;/li&gt;&lt;li class="MsoNormal" style=""&gt;This document assumes that this server will be dedicated to be your SIP server and so we will remove some packages that are not needed by your SIP server. For the purposes of the APAN SIP tutorial we will install Xwindows so you have a graphical interface with a browser to access the serweb tool. (Xwindows is not normally needed for your SIP server) &lt;/li&gt;&lt;li class="MsoNormal" style=""&gt;Under      Desktops select&lt;b&gt;&lt;span style="color: rgb(204, 102, 0);"&gt; &lt;/span&gt;&lt;span style="color:blue;"&gt;X Window System&lt;/span&gt;&lt;/b&gt; and click Details (far right      side of X Window System &lt;/li&gt;&lt;/ol&gt;  &lt;ol style="margin-top: 0in;" start="12" type="1"&gt;&lt;ul style="margin-top: 0in;" type="circle"&gt;&lt;li class="MsoNormal" style=""&gt;Ensure       only the following packages are installed (for a small installation&lt;br /&gt;    although you can add more):&lt;br /&gt;    &lt;b&gt;&lt;span style="color: rgb(204, 102, 0);"&gt;XFree86-twm&lt;br /&gt;    Xfree86-xdm&lt;br /&gt;    firstboot&lt;br /&gt;    gdm&lt;br /&gt;    rhgb&lt;br /&gt;    xterm&lt;/span&gt;&lt;/b&gt;&lt;/li&gt;&lt;/ul&gt;&lt;li class="MsoNormal" style=""&gt;To install a decent Window Manager, under Desktops select your Window Manager of choise, either GNOME or KDE and install your required packages.&lt;br /&gt;   For the purposes of the APAN SIP tutorial we will install we will install      KDE.&lt;/li&gt;&lt;li class="MsoNormal" style=""&gt;Under      Desktops select&lt;span style="color:blue;"&gt; &lt;b&gt;KDE Desktop Environment&lt;/b&gt; &lt;/span&gt;and      click Details &lt;/li&gt;&lt;ul style="margin-top: 0in;" type="circle"&gt;&lt;li class="MsoNormal" style=""&gt;Ensure       only the following packages are installed (for a small installation&lt;br /&gt;    although you can add more):&lt;br /&gt;    &lt;b&gt;&lt;span style="color: rgb(204, 102, 0);"&gt;kdeadmin&lt;br /&gt;    kdenetwork&lt;br /&gt;    kdeutils&lt;/span&gt;&lt;/b&gt;&lt;/li&gt;&lt;/ul&gt;&lt;li class="MsoNormal" style=""&gt;Under      Applications select &lt;b&gt;&lt;span style="color:blue;"&gt;Editors&lt;/span&gt;&lt;/b&gt; and      click Details &lt;/li&gt;&lt;ul style="margin-top: 0in;" type="circle"&gt;&lt;li class="MsoNormal" style=""&gt;Ensure       only the following packages are installed (for a small installation&lt;br /&gt;    although you can add more):&lt;br /&gt;    &lt;b&gt;&lt;span style="color: rgb(204, 102, 0);"&gt;vim-enhanced&lt;br /&gt; &lt;br /&gt;    emacs&lt;/span&gt;&lt;/b&gt;&lt;/li&gt;&lt;/ul&gt;&lt;li class="MsoNormal" style=""&gt;Under      Applications select &lt;b&gt;&lt;span style="color:blue;"&gt;Graphic Internet&lt;/span&gt; &lt;/b&gt;and      click Details &lt;/li&gt;&lt;ul style="margin-top: 0in;" type="circle"&gt;&lt;li class="MsoNormal" style=""&gt;Ensure       only the following packages are installled (for a small installation       although you can add more):&lt;br /&gt;    &lt;b&gt;&lt;span style="color: rgb(204, 102, 0);"&gt;mozilla&lt;/span&gt;&lt;/b&gt;&lt;/li&gt;&lt;/ul&gt;&lt;/ol&gt;  &lt;p class="MsoNormal" style="margin-left: 0.5in;"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;  &lt;ol style="margin-top: 0in;" start="17" type="1"&gt;&lt;li class="MsoNormal" style=""&gt;Under      Applications deselect Text-based Internet&lt;/li&gt;&lt;li class="MsoNormal" style=""&gt;Under      Servers click Details for &lt;b&gt;&lt;span style="color:blue;"&gt;Server Configuration      Tools&lt;/span&gt;&lt;/b&gt; &lt;/li&gt;&lt;ul style="margin-top: 0in;" type="circle"&gt;&lt;li class="MsoNormal" style=""&gt;Ensure       only the following packages are installed (for a small installation&lt;br /&gt;    although you can add more):&lt;br /&gt;    &lt;b&gt;&lt;span style="color: rgb(204, 102, 0);"&gt;Xfree86-xauth&lt;br /&gt;     &lt;!--[if !supportLineBreakNewLine]--&gt;&lt;br /&gt;     &lt;!--[endif]--&gt;&lt;/span&gt;&lt;/b&gt;&lt;/li&gt;&lt;/ul&gt;&lt;li class="MsoNormal" style=""&gt;Under &lt;b&gt;&lt;span style="color:blue;"&gt;Web Servers&lt;/span&gt;&lt;/b&gt; click Details for&lt;br /&gt;   &lt;b&gt;&lt;span style="color:white;"&gt;Web S&lt;/span&gt;&lt;/b&gt;&lt;/li&gt;&lt;ul style="margin-top: 0in;" type="circle"&gt;&lt;li class="MsoNormal" style=""&gt;Ensure       only the following packages are installed (for a small installation       although you can add more):&lt;br /&gt;    &lt;b&gt;&lt;span style="color: rgb(204, 102, 0);"&gt;httpd-manual&lt;br /&gt;    php&lt;br /&gt;    php-mysql&lt;/span&gt;&lt;/b&gt;&lt;/li&gt;&lt;/ul&gt;&lt;li class="MsoNormal" style=""&gt;Under      Servers deselect Windows File Server&lt;/li&gt;&lt;li class="MsoNormal" style=""&gt;Under      Servers select &lt;b&gt;&lt;span style="color:blue;"&gt;SQL Database Server&lt;/span&gt;&lt;/b&gt;      and click Details &lt;/li&gt;&lt;ul style="margin-top: 0in;" type="circle"&gt;&lt;li class="MsoNormal" style=""&gt;Ensure       only the following packages are installed (for a small installation&lt;br /&gt;    although you can add more):&lt;br /&gt;    &lt;b&gt;&lt;span style="color: rgb(204, 102, 0);"&gt;mysql-server&lt;/span&gt;&lt;/b&gt;&lt;/li&gt;&lt;/ul&gt;&lt;/ol&gt;  &lt;p class="MsoNormal" style="margin-left: 0.5in;"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;  &lt;ol style="margin-top: 0in;" start="22" type="1"&gt;&lt;li class="MsoNormal" style=""&gt;Under      Development select &lt;b&gt;&lt;span style="color:blue;"&gt;Development Tools&lt;/span&gt;&lt;/b&gt;      and click Details &lt;/li&gt;&lt;ul style="margin-top: 0in;" type="circle"&gt;&lt;li class="MsoNormal" style=""&gt;Ensure       only the following packages are installed (for a small installation       although you can add more):&lt;br /&gt;    &lt;b&gt;&lt;span style="color: rgb(204, 102, 0);"&gt;rpm-build&lt;/span&gt;&lt;/b&gt;&lt;/li&gt;&lt;/ul&gt;&lt;li class="MsoNormal" style=""&gt;Under      Development select &lt;b&gt;&lt;span style="color:blue;"&gt;Network Servers&lt;/span&gt;&lt;/b&gt;      and click Details &lt;/li&gt;&lt;ul style="margin-top: 0in;" type="circle"&gt;&lt;li class="MsoNormal" style=""&gt;Ensure       only the following packages are installed (for a small installation&lt;br /&gt;    although you can add more):&lt;br /&gt;    &lt;b&gt;&lt;span style="color: rgb(204, 102, 0);"&gt;freeradius&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;    &lt;b&gt;&lt;span style="color: rgb(204, 102, 0);"&gt;tftp-server&lt;/span&gt;&lt;/b&gt; &lt;/li&gt;&lt;/ul&gt;&lt;li class="MsoNormal" style=""&gt;Under      System deselect &lt;span style="color:blue;"&gt;Administration Tools&lt;/span&gt;&lt;/li&gt;&lt;li class="MsoNormal" style=""&gt;Under      System select &lt;b&gt;&lt;span style="color:blue;"&gt;System Tools&lt;/span&gt;&lt;/b&gt; and      click Details &lt;/li&gt;&lt;ul style="margin-top: 0in;" type="circle"&gt;&lt;li class="MsoNormal" style=""&gt;Ensure       only the following packages are installed (for a small installation       although you can add more):&lt;br /&gt;    &lt;b&gt;&lt;span style="color: rgb(204, 102, 0);"&gt;ethereal&lt;br /&gt;    nmap&lt;br /&gt;    screen&lt;/span&gt;&lt;/b&gt;&lt;/li&gt;&lt;/ul&gt;&lt;li class="MsoNormal" style=""&gt;Under      System deselect Printing Support&lt;/li&gt;&lt;li class="MsoNormal" style=""&gt;We are      now ready to continue with the installation. &lt;/li&gt;&lt;ul style="margin-top: 0in;" type="circle"&gt;&lt;li class="MsoNormal" style=""&gt;Click       Next&lt;/li&gt;&lt;/ul&gt;&lt;li class="MsoNormal" style=""&gt;The      installation will now check for dependencies, but there shouldn't be any      for our installation as above &lt;/li&gt;&lt;ul style="margin-top: 0in;" type="circle"&gt;&lt;li class="MsoNormal" style=""&gt;Click       Next again&lt;/li&gt;&lt;/ul&gt;&lt;li class="MsoNormal" style=""&gt;The      required media will be listed in a popup dialog box, click Continue&lt;/li&gt;&lt;li class="MsoNormal" style=""&gt;The installation will now proceed by formatting the required filesystems, transferring the install image to the hard drive, and then installing the&lt;br /&gt;   selected packages.&lt;/li&gt;&lt;li class="MsoNormal" style=""&gt;You      will be prompted to insert the required media at different times      throughout&lt;br /&gt;   the installation. When prompted, insert the required media and press OK.&lt;/li&gt;&lt;li class="MsoNormal" style=""&gt;When      prompted to reboot, remove the installation media and press Reboot&lt;/li&gt;&lt;li class="MsoNormal" style=""&gt;You      have now installed a system that will run as a SER SIP Server for the APAN      SIP Tutorial &lt;/li&gt;&lt;/ol&gt;  &lt;p style="margin: 0in 0in 0.0001pt;"&gt;#&lt;br /&gt;# ENABLE ALL THE FOLLOWING SERVICES TO START AUTOMATICLY ON RELOAD OF SERVER&lt;br /&gt;Use the programme "ntsysv"&lt;br /&gt;# enable these:&lt;br /&gt;# http&lt;br /&gt;# mysql&lt;br /&gt;# radiusd&lt;br /&gt;# tftp&lt;/p&gt;  &lt;h2 style="margin: 0in 0in 0.0001pt;"&gt;&lt;a name="SER"&gt;&lt;/a&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/h2&gt;  &lt;h2 style="margin: 0in 0in 0.0001pt;"&gt;Step by Step Installation of SER on &lt;i&gt;&lt;span style="color: rgb(0, 102, 0);"&gt;RedHad Fedora Core 1&lt;/span&gt;&lt;/i&gt;&lt;/h2&gt;  &lt;p class="MsoNormal"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;  &lt;p style="margin: 0in 0in 0.0001pt;"&gt;The following has been tested on a &lt;a href="http://www2.blogger.com/2004/sip/Servers/serverbuild.html"&gt;RedHat Fedora Core 1 install as per instructions&lt;/a&gt; and is based on SER version 0.8.12&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;  &lt;p style="margin: 0in 0in 0.0001pt;"&gt;&lt;b&gt;Key to the colours used:&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color:fuchsia;"&gt;Pink indicates a command or a filename&lt;/span&gt;&lt;br /&gt;&lt;span style="color:red;"&gt;Red indicates something specific to your SER Server,&lt;br /&gt;do not just put in the example&lt;/span&gt; &lt;/p&gt;  &lt;ul style="margin-top: 0in;" type="disc"&gt;&lt;li class="MsoNormal" style=""&gt;Get      the software, install, and run from &lt;a href="http://www.iptel.org/"&gt;SER&lt;/a&gt;      or &lt;a href="http://www2.blogger.com/2004/apan-questnet/sipworkshop/src/ser/fedora-core-1/ser-0.8.12-0.i386.rpm"&gt;from   &lt;br /&gt;   this server&lt;/a&gt; Install&lt;/li&gt;&lt;/ul&gt;  &lt;pre style="margin-left: 1in;"&gt;&lt;b&gt;&lt;span style=";font-size:13;color:fuchsia;"  &gt;rpm -i ser-0.8.12-0.i386.rpm&lt;/span&gt;&lt;/b&gt; &lt;/pre&gt;  &lt;p style="margin: 0in 0in 0.0001pt 1in;"&gt;Start&lt;/p&gt;  &lt;pre style="margin-left: 1in;"&gt;&lt;b&gt;&lt;span style=";font-size:13;color:fuchsia;"  &gt;/etc/rc.d/init.d/ser start&lt;/span&gt;&lt;/b&gt;&lt;/pre&gt;  &lt;p style="margin: 0in 0in 0.0001pt 0.5in;"&gt;Do some environmental changes&lt;/p&gt;  &lt;p style="margin: 0in 0in 0.0001pt 1in;"&gt;&lt;b&gt;&lt;span style=";font-size:13;color:fuchsia;"  &gt;export SIP_DOMAIN="&lt;/span&gt;&lt;/b&gt;&lt;b&gt;&lt;span style=";font-size:13;color:red;"  &gt;aarnet.edu.au&lt;/span&gt;&lt;/b&gt;&lt;b&gt;&lt;span style=";font-size:13;color:fuchsia;"  &gt;"&lt;/span&gt;&lt;/b&gt; &lt;/p&gt;  &lt;ul style="margin-top: 0in;" type="disc"&gt;&lt;ul style="margin-top: 0in;" type="circle"&gt;&lt;li class="MsoNormal" style=""&gt;Edit&lt;b&gt;&lt;span style="color:fuchsia;"&gt; /etc/profile&lt;/span&gt;&lt;/b&gt; and add the following line       (same as above) onto the end of the file:&lt;/li&gt;&lt;/ul&gt;&lt;/ul&gt;  &lt;p style="margin: 0in 0in 0.0001pt 1in;"&gt;&lt;b&gt;&lt;span style="color:fuchsia;"&gt;export SIP_DOMAIN="&lt;/span&gt;&lt;span style="color:red;"&gt;aarnet.edu.au&lt;/span&gt;&lt;span style="color:fuchsia;"&gt;"&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;Note I used an IP address here to make it work.&lt;/p&gt;  &lt;ul style="margin-top: 0in;" type="disc"&gt;&lt;li class="MsoNormal" style=""&gt;Get      the SER mysql module, configure the install, install it, configure&lt;br /&gt;   SER and restart SER&lt;/li&gt;&lt;/ul&gt;  &lt;p style="margin: 0in 0in 0.0001pt 1in;"&gt;from &lt;a href="http://www.iptel.org/"&gt;SER&lt;/a&gt; or &lt;a href="http://www2.blogger.com/2004/apan-questnet/sipworkshop/src/ser/fedora-core-1/ser-mysql-0.8.12-0.i386.rpm"&gt;from this server&lt;/a&gt; &lt;/p&gt;  &lt;ul style="margin-top: 0in;" type="disc"&gt;&lt;ul style="margin-top: 0in;" type="circle"&gt;&lt;li class="MsoNormal" style=""&gt;Install       mysql&lt;br /&gt;    &lt;b&gt;&lt;span style=";font-size:13;color:fuchsia;"  &gt;rpm -i       ser-mysql-0.8.12-0.i386.rpm&lt;/span&gt;&lt;/b&gt; &lt;/li&gt;&lt;li class="MsoNormal" style=""&gt;Start&lt;br /&gt;    &lt;b&gt;&lt;span style=";font-size:13;color:fuchsia;"  &gt;/etc/rc.d/init.d/mysqld       start&lt;/span&gt;&lt;/b&gt;&lt;/li&gt;&lt;li class="MsoNormal" style=""&gt;If       you wanted to you could make some changes, not recommended for first build,       in the following file: &lt;/li&gt;&lt;ul style="margin-top: 0in;" type="square"&gt;&lt;li class="MsoNormal" style=""&gt;Edit        &lt;b&gt;&lt;span style="color:fuchsia;"&gt;/usr/sbin/ser_mysql.sh&lt;/span&gt;&lt;/b&gt;, the        following may want to be changed, I just leave them as is&lt;br /&gt;     DBHOST=localhost&lt;br /&gt;     USERNAME=ser&lt;br /&gt;     DEFAULT_PW=heslo&lt;br /&gt;     ROUSER=serro&lt;br /&gt;     RO_PW=47serro11&lt;br /&gt;     SQL_USER="root"&lt;br /&gt;     DEFAULT_PW=heslo&lt;br /&gt;     # DEFAULT_PW is the password used by serctl to add users etc! &lt;span style="color:red;"&gt;&lt;br /&gt;     Note: &lt;/span&gt;&lt;span style="color:black;"&gt;If you change the DEFAULT_PW        password then you must add something to ser.cfg add&lt;br /&gt;      &lt;!--[if !supportLineBreakNewLine]--&gt;&lt;br /&gt;      &lt;!--[endif]--&gt;&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;/ul&gt;&lt;/ul&gt;  &lt;p class="MsoNormal" style="margin-left: 1.25in;"&gt;&lt;span style="color:black;"&gt;modparam("usrloc|other_modules_using_db", "db_url",&lt;br /&gt;"mysql://ser:otherpassword@localhost/ser")&lt;/span&gt;&lt;span style="color:red;"&gt;&lt;br /&gt;&lt;!--[if !supportLineBreakNewLine]--&gt;&lt;br /&gt;&lt;!--[endif]--&gt;&lt;/span&gt;&lt;/p&gt;  &lt;ul style="margin-top: 0in;" type="disc"&gt;&lt;ul style="margin-top: 0in;" type="circle"&gt;&lt;li class="MsoNormal" style=""&gt;Run       the SER script to create the SER database in mysql. IMPORTANT NOTE &lt;span style=""&gt; &lt;/span&gt;: You need to change your path statement       in your shell environmentals &lt;span style=""&gt; &lt;/span&gt;to       find the HA1 programme, personally I just ssh on as root and it runs &lt;span style=""&gt; &lt;/span&gt;fine.&lt;br /&gt;    &lt;b&gt;&lt;span style=";font-size:13;color:fuchsia;"  &gt;/usr/sbin/ser_mysql.sh       create&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;    Notes: &lt;span style=""&gt; &lt;/span&gt;MySql password for root: &lt;b&gt;&lt;span style="color:fuchsia;"&gt;BLANK&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;    Domain (Realm) is the domain name for the SIP users: aarnet.edu.au Second       password: &lt;b&gt;&lt;span style="color:fuchsia;"&gt;BLANK&lt;/span&gt;&lt;/b&gt;&lt;/li&gt;&lt;li class="MsoNormal" style=""&gt;Enter       mysql and check that the tables have been created, follow these commands:&lt;br /&gt;    &lt;b&gt;&lt;span style=";font-size:13;color:fuchsia;"  &gt;mysql&lt;/span&gt;&lt;/b&gt;&lt;span style="font-size:13;"&gt;&lt;br /&gt;    &lt;b&gt;&lt;span style="color:fuchsia;"&gt;connect ser;&lt;br /&gt;    show tables;&lt;br /&gt;    select * from subscriber;&lt;br /&gt;    exit &lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;/li&gt;&lt;li class="MsoNormal" style=""&gt;Copy       the original SER configuration file and edit ser.cfg. &lt;/li&gt;&lt;ul style="margin-top: 0in;" type="square"&gt;&lt;li class="MsoNormal" style=""&gt;&lt;b&gt;&lt;span style="color:fuchsia;"&gt;cp /etc/ser/ser.cfg /etc/ser/ser.cfg-original&lt;/span&gt;&lt;/b&gt;&lt;/li&gt;&lt;li class="MsoNormal" style=""&gt;Now        edit the &lt;b&gt;&lt;span style="color:fuchsia;"&gt;/etc/ser/ser.cfg        /etc/ser/ser.cfg&lt;/span&gt;&lt;/b&gt; &lt;span style=""&gt; &lt;/span&gt;to        make it do what you want it to. Here is a good guide: &lt;span style=""&gt; &lt;/span&gt;http://mit.edu/sip/sip.edu/ser.shtml.&lt;/li&gt;&lt;/ul&gt;&lt;li class="MsoNormal" style=""&gt;Restart       SER so that the changes take effect&lt;br /&gt;    &lt;b&gt;&lt;span style="color:fuchsia;"&gt;/etc/rc.d/init.d/ser restart&lt;/span&gt;&lt;/b&gt;&lt;/li&gt;&lt;/ul&gt;&lt;li class="MsoNormal" style=""&gt;Create two users using serctl. IMPORTANT NOTE : YOU MUST BE LOGGED IN AS ROOT (NOT JUST sudo) or fix up the path statement in your shell. Format of the command is: serctl add &amp;lt;username&amp;gt; &amp;lt;password&amp;gt; &amp;lt;email&amp;gt; and you need to use the DEFAULT_PW=heslo as the password set in /usr/sbin/ser_mysql.sh&lt;br /&gt;   &lt;b&gt;&lt;span style="color:fuchsia;"&gt;/usr/sbin/serctl add &lt;/span&gt;&lt;span style="color:red;"&gt;srk &lt;span style=""&gt; &lt;/span&gt;password      Stephen.Kingham@aarnet.edu.au&lt;/span&gt;&lt;span style="color:fuchsia;"&gt;&lt;br /&gt;   /usr/sbin/serctl add &lt;/span&gt;&lt;span style="color:red;"&gt;caf password      Clayton.Forbes@aarnet.edu.au&lt;br /&gt;    &lt;!--[if !supportLineBreakNewLine]--&gt;&lt;br /&gt;    &lt;!--[endif]--&gt;&lt;/span&gt;&lt;/b&gt;&lt;/li&gt;&lt;/ul&gt;  &lt;p class="MsoNormal" style="margin-left: 0.25in;"&gt;&lt;span style="color:black;"&gt;change&lt;/span&gt;&lt;span style="color:red;"&gt; password&lt;/span&gt;&lt;span style="color:black;"&gt; to the&lt;/span&gt;&lt;span style="color:red;"&gt; &lt;i&gt;password&lt;/i&gt;&lt;/span&gt;&lt;span style="color:black;"&gt; that will be used by the user, do not use password as a password!&lt;/span&gt;&lt;/p&gt;  &lt;ul style="margin-top: 0in;" type="disc"&gt;&lt;li class="MsoNormal" style=""&gt;Test      the connection using two SIP UAs. &lt;/li&gt;&lt;ul style="margin-top: 0in;" type="circle"&gt;&lt;li class="MsoNormal" style=""&gt;See       the examples of &lt;a href="http://www2.blogger.com/2004/sip/index.html#UAs"&gt;how       to configure UAs&lt;/a&gt;.&lt;/li&gt;&lt;li class="MsoNormal" style=""&gt;Use       the this command to see who is logged in:&lt;br /&gt;    &lt;b&gt;&lt;span style="color:fuchsia;"&gt;serctl ul show&lt;/span&gt;&lt;/b&gt; &lt;/li&gt;&lt;/ul&gt;&lt;li class="MsoNormal" style=""&gt;Configure      mysql so that it only listens to local requests and increase the maximum      number of sessions: &lt;/li&gt;&lt;ul style="margin-top: 0in;" type="circle"&gt;&lt;li class="MsoNormal" style=""&gt;edit       /etc/my.cnf&lt;br /&gt;    Change the start of the file so that it has these extra lines:&lt;br /&gt;    [mysqld]&lt;br /&gt;    datadir=/var/lib/mysql&lt;br /&gt;    socket=/var/lib/mysql/mysql.sock&lt;br /&gt;    &lt;span style="color:fuchsia;"&gt;set-variable = max_connections=500&lt;br /&gt;    bind-address=127.0.0.1&lt;/span&gt;&lt;/li&gt;&lt;li class="MsoNormal" style=""&gt;Restart       mysql&lt;br /&gt;    &lt;b&gt;&lt;span style="color:fuchsia;"&gt;/etc/rc.d/init.d/mysql restart&lt;/span&gt;&lt;/b&gt;&lt;/li&gt;&lt;/ul&gt;&lt;li class="MsoNormal" style=""&gt;Create      a special user for SER to run as, rather than running it as root. &lt;/li&gt;&lt;ul style="margin-top: 0in;" type="circle"&gt;&lt;li class="MsoNormal" style=""&gt;Use       the following command to create the new user in Unix:&lt;br /&gt;    &lt;span style="color:fuchsia;"&gt;/usr/sbin/useradd -c "SER" -u 494       -s&lt;br /&gt;    /sbin/nologin -r -d /usr/lib/ser ser&lt;/span&gt;&lt;/li&gt;&lt;li class="MsoNormal" style=""&gt;Now       tell SER to run as the user ser by adding these lines into &lt;span style="color:fuchsia;"&gt;/etc/ser/ser.cfg&lt;/span&gt;:&lt;br /&gt;    &lt;span style="color:fuchsia;"&gt;uid=ser&lt;br /&gt;    gid=ser &lt;/span&gt;&lt;/li&gt;&lt;li class="MsoNormal" style=""&gt;Delete       the old fifo file otherwise the new user "ser" may not be able       to use it&lt;br /&gt;    &lt;span style="color:fuchsia;"&gt;rm /tmp/ser_fifo&lt;/span&gt;&lt;br /&gt;     &lt;!--[if !supportLineBreakNewLine]--&gt;&lt;br /&gt;     &lt;!--[endif]--&gt;&lt;/li&gt;&lt;/ul&gt;&lt;/ul&gt;  &lt;p class="MsoNormal"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;  &lt;h2 style="margin: 0in 0in 0.0001pt;"&gt;&lt;a name="WEBSER"&gt;Step by Step Installation of WEBSER on &lt;i&gt;&lt;span style="color: rgb(0, 102, 0);"&gt;RedHad Fedora Core 1&lt;/span&gt;&lt;/i&gt;&lt;/a&gt;&lt;/h2&gt;  &lt;p class="MsoNormal"&gt;&lt;span style=""&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p style="margin: 0in 0in 0.0001pt;"&gt;&lt;span style=""&gt;When the original distribution is installed the directory locations do not match up with the typical apache file locations. These notes document all the changes needed. SUGGESTION: For the Tutorial we should develop a new install TAR so delegates do not spend 30 minutes editing all the files.&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-left: 0.5in;"&gt;&lt;span style=""&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;ul style="margin-top: 0in;" type="disc"&gt;&lt;li class="MsoNormal" style=""&gt;&lt;span style=""&gt;Get the TAR, un-tar and place the files in the      right directory &lt;/span&gt;&lt;/li&gt;&lt;ul style="margin-top: 0in;" type="circle"&gt;&lt;li class="MsoNormal" style=""&gt;&lt;span style=""&gt;from &lt;/span&gt;&lt;a href="http://www.iptel.org/"&gt;&lt;span style=""&gt;SER&lt;/span&gt;&lt;span style=""&gt;&lt;/span&gt;&lt;/a&gt;&lt;span style=""&gt; or &lt;/span&gt;&lt;a href="http://www2.blogger.com/2004/apan-questnet/sipworkshop/src/ser/serweb_2004-01-04.tar.gz"&gt;&lt;span style=""&gt;from this server&lt;/span&gt;&lt;span style=""&gt;&lt;/span&gt;&lt;/a&gt;&lt;span style=""&gt;&lt;/span&gt;&lt;/li&gt;&lt;li class="MsoNormal" style=""&gt;&lt;span style=""&gt;untar&lt;br /&gt;    &lt;b&gt;&lt;span style="color:fuchsia;"&gt;tar -xvzf serweb_2004-01-04.tar.gz&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;/li&gt;&lt;li class="MsoNormal" style=""&gt;&lt;span style=""&gt;change directory to where the files were       untared to&lt;br /&gt;    cd serweb_2004-01-04&lt;/span&gt;&lt;/li&gt;&lt;li class="MsoNormal" style=""&gt;&lt;span style=""&gt;Create the directory and move the files there&lt;br /&gt;    mkdir /var/www/phplib&lt;br /&gt;    chown root /var/www/phplib&lt;br /&gt;    chgrp root /var/www/phplib&lt;br /&gt;    chmod 755 /var/www/phplib&lt;br /&gt;    cp ./phplib/* /var/www/phplib/ -R &lt;/span&gt;&lt;/li&gt;&lt;li class="MsoNormal" style=""&gt;&lt;span style=""&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;br /&gt;&lt;/li&gt;&lt;/ul&gt;&lt;/ul&gt;  &lt;p style="margin: 0in 0in 0.0001pt 1in;"&gt;&lt;span style=""&gt;# Move the html files to the DocumentRoot directory&lt;br /&gt;&lt;b&gt;&lt;span style="color:fuchsia;"&gt;mkdir /var/www/html/serweb/&lt;br /&gt;chown apache /var/www/html/serweb/&lt;br /&gt;chgrp root /var/www/html/serweb/&lt;br /&gt;chmod 755 /var/www/html/serweb/&lt;br /&gt;cp ./html/* /var/www/html/serweb -R&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;/p&gt;  &lt;ul style="margin-top: 0in;" type="disc"&gt;&lt;li class="MsoNormal" style=""&gt;&lt;span style=""&gt;edit these lines in &lt;b&gt;&lt;span style="color:fuchsia;"&gt;/etc/php.ini&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;   and change &lt;span style="color:fuchsia;"&gt;short_open_tag = Off" to      "On"&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;  &lt;p style="margin: 0in 0in 0.0001pt 0.5in;"&gt;&lt;span style=""&gt;and change &lt;span style="color:fuchsia;"&gt;register_globals = Off" to "On"&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p style="margin: 0in 0in 0.0001pt 0.5in; text-indent: -0.25in;"&gt;&lt;span style=""&gt;&lt;!--[if !supportLists]--&gt;&lt;span style="font-family:Symbol;"&gt;&lt;span style=""&gt;·&lt;span style=""&gt;        &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;!--[endif]--&gt;Create these files as part of the serweb module.&lt;/span&gt;&lt;/p&gt;  &lt;p style="margin: 0in 0in 0.0001pt 0.5in;"&gt;&lt;span style=""&gt;&lt;span style="color:fuchsia;"&gt;vi /var/www/html/serweb/prolog.html&lt;/span&gt;&lt;br /&gt;&lt;span style="color:red;"&gt;AARNet SER SIP Server&lt;/span&gt;&lt;br /&gt;&lt;span style="color:fuchsia;"&gt;vi /var/www/html/serweb/separator.html&lt;/span&gt;&lt;br /&gt;&lt;span style="color:fuchsia;"&gt;vi /var/www/html/serweb/epilog.html&lt;/span&gt;&lt;br /&gt;&lt;span style="color:red;"&gt;End of page text&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;  &lt;ul style="margin-top: 0in;" type="disc"&gt;&lt;li class="MsoNormal" style=""&gt;&lt;span style=""&gt;ALL the files that follw are with respect to      /var/www/html/serweb&lt;br /&gt;   &lt;span style="color:fuchsia;"&gt;cd /var/www/html/serweb&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;&lt;li class="MsoNormal" style=""&gt;&lt;span style=""&gt;edit these lines in &lt;span style="color:fuchsia;"&gt;./config.php&lt;/span&gt;&lt;br /&gt;   In general replace all 192.168.2.16 with &lt;span style="color:red;"&gt;192.94.63.28&lt;/span&gt;&lt;br /&gt;   #If you have changed the mysql username, dbname or password you need to      change these:&lt;br /&gt;   db_name="ser"; //database name&lt;br /&gt;   db_user="ser"; //database conection user&lt;br /&gt;   db_pass="heslo"; //database conection password&lt;br /&gt;   # NOTE: The above relate to the mysql database, see      /usr/sbin/ser_mysql.sh.&lt;br /&gt;   $this-&amp;gt;root_path="/serweb/";&lt;br /&gt;   #The above must match where the serweb html directory is put&lt;br /&gt;   this user_pages_path = this root_path."user&lt;b&gt;_interface&lt;/b&gt;/";&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;   $this-&gt;prolog="/serweb/prolog.html";&lt;br /&gt;   $this-&gt;separator="/serweb/separator.html";&lt;br /&gt;   $this-&gt;epilog="/serweb/epilog.html";&lt;br /&gt;   # /* email address for questions concerning registration */&lt;br /&gt;   $this-&gt;root_uri.&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;  &lt;p class="MsoNormal" style="margin-left: 0.5in;"&gt;&lt;span style=""&gt;$this-&gt;root_path."user&lt;b&gt;_interface&lt;/b&gt;/my_account.php?#session#\n\n".&lt;br /&gt;$this-&gt;root_uri.&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-left: 0.5in;"&gt;&lt;span style=""&gt;$this-&gt;root_path."user_&lt;b&gt;interface&lt;/b&gt;/reg/confirmation.php?nr=#confirm#\n\n".&lt;br /&gt;# There is heaps more to customise in this file which we will leave to the user. These include more email references&lt;br /&gt;# and text used in emails to users who register. Here are some example which do not need to be changed for this tutorial:&lt;br /&gt;$this-&gt;mail_header_from="&lt;span style="color:red;"&gt;Stephen.Kingham@aarnet.edu.au&lt;/span&gt;";&lt;br /&gt;$this-&gt;web_contact="sip:&lt;span style="color:red;"&gt;Stephen.Kingham@aarnet.edu.au&lt;/span&gt;";&lt;br /&gt;$this-&gt;title="&lt;span style="color:red;"&gt;The AARNet IP Telephony Site&lt;/span&gt;";&lt;br /&gt;$this-&gt;infomail = "&lt;span style="color:red;"&gt;Stephen.Kingham@aarnet.edu.au&lt;/span&gt;";&lt;br /&gt;$this-&gt;regmail = "&lt;span style="color:red;"&gt;Stephen.Kingham@aarnet.edu.au&lt;/span&gt;";&lt;br /&gt;&lt;!--[if !supportLineBreakNewLine]--&gt;&lt;br /&gt;&lt;!--[endif]--&gt;&lt;/span&gt;&lt;/p&gt;  &lt;ul style="margin-top: 0in;" type="disc"&gt;&lt;li class="MsoNormal" style=""&gt;&lt;span style=""&gt;Edit&lt;span style="color:black;"&gt; &lt;/span&gt;&lt;span style="color:fuchsia;"&gt;/var/www/phplib/db_mysql.inc&lt;/span&gt;&lt;br /&gt;   # You need to add the following to /* public: connection parameters */&lt;br /&gt;   var $Host = "&lt;span style="color:red;"&gt;192.94.63.28&lt;/span&gt;";&lt;br /&gt;   var $Database = "ser";&lt;br /&gt;   var $User = "ser";&lt;br /&gt;   var $Password = "heslo"; &lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;  &lt;p style="margin: 0in 0in 0.0001pt;"&gt;&lt;span style=""&gt;The follwoing changes can be applied two ways:&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;span style=""&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;table class="MsoNormalTable" style="width: 100%;" border="0" cellpadding="0" width="100%"&gt;  &lt;tbody&gt;&lt;tr style=""&gt;   &lt;td style="padding: 0.75pt;" valign="top"&gt;   &lt;p class="MsoNormal"&gt;&lt;span style=""&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;   &lt;p class="MsoNormal"&gt;&lt;span style=""&gt;1. Get and extract this   tar file&lt;br /&gt; &lt;!--[if !supportLineBreakNewLine]--&gt;&lt;br /&gt; &lt;!--[endif]--&gt;&lt;/span&gt;&lt;/p&gt;   &lt;/td&gt;   &lt;span style=""&gt;&lt;/span&gt;   &lt;td style="padding: 0.75pt;"&gt;   &lt;p class="MsoNormal"&gt;&lt;span style=""&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;   &lt;p style="margin: 0in 0in 0.0001pt;"&gt;&lt;span style=""&gt;get   the file &lt;/span&gt;&lt;a href="http://www2.blogger.com/2004/apan-questnet/sipworkshop/src/ser/fixupserwebphp.tar"&gt;&lt;span style=""&gt;fixupserwebphp.tar&lt;/span&gt;&lt;span style=""&gt;&lt;/span&gt;&lt;/a&gt;&lt;span style=""&gt; from this server put it   in the directory /usr/local/src/ser issue these commands&lt;/span&gt;&lt;/p&gt;   &lt;p style="margin: 0in 0in 0.0001pt;"&gt;&lt;span style=""&gt;&lt;span style="color:fuchsia;"&gt;cd /var/www/html/serweb &lt;/span&gt;&lt;/span&gt;&lt;/p&gt;   &lt;p class="MsoNormal"&gt;&lt;span style=""&gt;&lt;span style="color:fuchsia;"&gt;tar   -xvf fixupserwebphp.tar&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;   &lt;/td&gt;   &lt;span style=""&gt;&lt;/span&gt;  &lt;/tr&gt;  &lt;tr style=""&gt;   &lt;td style="padding: 0.75pt;"&gt;   &lt;p class="MsoNormal"&gt;&lt;span style=""&gt;&lt;b&gt;OR&lt;/b&gt;&lt;br /&gt; &lt;!--[if !supportLineBreakNewLine]--&gt;&lt;br /&gt; &lt;!--[endif]--&gt;&lt;/span&gt;&lt;/p&gt;   &lt;/td&gt;   &lt;span style=""&gt;&lt;/span&gt;   &lt;td style="padding: 0.75pt;"&gt;&lt;span style=""&gt;&lt;/span&gt;   &lt;p class="MsoNormal"&gt;&lt;span style=""&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;br /&gt;&lt;/td&gt;   &lt;span style=""&gt;&lt;/span&gt;  &lt;/tr&gt;  &lt;tr style=""&gt;   &lt;td style="padding: 0.75pt;" valign="top"&gt;   &lt;p class="MsoNormal"&gt;&lt;span style=""&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;   &lt;p class="MsoNormal"&gt;&lt;span style=""&gt;2. Manualy make all   these changes&lt;br /&gt; &lt;!--[if !supportLineBreakNewLine]--&gt;&lt;br /&gt; &lt;!--[endif]--&gt;&lt;/span&gt;&lt;/p&gt;   &lt;/td&gt;   &lt;span style=""&gt;&lt;/span&gt;   &lt;td style="padding: 0.75pt;" valign="top"&gt;   &lt;p class="MsoNormal"&gt;&lt;span style=""&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;   &lt;p style="margin: 0in 0in 0.0001pt;"&gt;&lt;span style=""&gt;Generaly   you have to add "../" to all these files so that they point correctly   to where the phplib is.&lt;/span&gt;&lt;/p&gt;   &lt;ul style="margin-top: 0in;" type="disc"&gt;&lt;li class="MsoNormal" style=""&gt;&lt;span style=""&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;br /&gt;&lt;/li&gt;&lt;/ul&gt;   &lt;p style="margin: 0in 0in 0.0001pt 0.5in;"&gt;&lt;span style=""&gt;Edit &lt;span style="color:fuchsia;"&gt;./admin/prepend.php&lt;/span&gt;&lt;br /&gt;# change $_PHPLIB["libdir"] = "&lt;b&gt;../&lt;/b&gt;../../phplib/";&lt;/span&gt;&lt;/p&gt;   &lt;ul style="margin-top: 0in;" type="disc"&gt;&lt;li class="MsoNormal" style=""&gt;&lt;span style=""&gt;Edit &lt;span style="color:fuchsia;"&gt;./user_interface/prepend.php&lt;/span&gt;&lt;br /&gt;     # change $_PHPLIB["libdir"] = "&lt;b&gt;../&lt;/b&gt;../../phplib/";&lt;/span&gt;&lt;/li&gt;&lt;li class="MsoNormal" style=""&gt;&lt;span style=""&gt;Edit &lt;span style="color:fuchsia;"&gt;./user_interface/reg/prepend.php&lt;/span&gt;&lt;br /&gt;     # change $_PHPLIB["libdir"] = "&lt;b&gt;../&lt;/b&gt;../../../phplib/";&lt;/span&gt;&lt;/li&gt;&lt;li class="MsoNormal" style=""&gt;&lt;span style=""&gt;Edit &lt;span style="color:fuchsia;"&gt;./admin/acl.php&lt;/span&gt;&lt;br /&gt;     # change require "&lt;b&gt;../&lt;/b&gt;../../phplib/oohforms.inc";&lt;/span&gt;&lt;/li&gt;&lt;li class="MsoNormal" style=""&gt;&lt;span style=""&gt;Edit &lt;span style="color:fuchsia;"&gt;./admin/index.php&lt;/span&gt;&lt;br /&gt;     # require "&lt;b&gt;../&lt;/b&gt;../../../phplib/oohforms.inc";&lt;/span&gt;&lt;/li&gt;&lt;li class="MsoNormal" style=""&gt;&lt;span style=""&gt;Edit &lt;span style="color:fuchsia;"&gt;./admin/users.php&lt;/span&gt;&lt;br /&gt;     # require "&lt;b&gt;../&lt;/b&gt;../../../phplib/oohforms.inc";&lt;/span&gt;&lt;/li&gt;&lt;li class="MsoNormal" style=""&gt;&lt;span style=""&gt;Edit &lt;span style="color:fuchsia;"&gt;./user_interface/accounting.php&lt;/span&gt;&lt;br /&gt;     # require "&lt;b&gt;../&lt;/b&gt;../../../phplib/oohforms.inc";&lt;/span&gt;&lt;/li&gt;&lt;li class="MsoNormal" style=""&gt;&lt;span style=""&gt;Edit &lt;span style="color:fuchsia;"&gt;./user_interface/find_user.php&lt;/span&gt;&lt;br /&gt;     # require "&lt;b&gt;../&lt;/b&gt;../../../phplib/oohforms.inc";&lt;/span&gt;&lt;/li&gt;&lt;li class="MsoNormal" style=""&gt;&lt;span style=""&gt;Edit &lt;span style="color:fuchsia;"&gt;./user_interface/index.php&lt;/span&gt;&lt;br /&gt;     # require "&lt;b&gt;../&lt;/b&gt;../../phplib/oohforms.inc";&lt;/span&gt;&lt;/li&gt;&lt;li class="MsoNormal" style=""&gt;&lt;span style=""&gt;Edit &lt;span style="color:fuchsia;"&gt;./user_interface/missed_calls.php&lt;/span&gt;&lt;br /&gt;     # require "&lt;b&gt;../&lt;/b&gt;../../phplib/oohforms.inc";&lt;/span&gt;&lt;/li&gt;&lt;li class="MsoNormal" style=""&gt;&lt;span style=""&gt;Edit &lt;span style="color:fuchsia;"&gt;./user_interface/my_account.php&lt;/span&gt;&lt;br /&gt;     # require "&lt;b&gt;../&lt;/b&gt;../../phplib/oohforms.inc";&lt;/span&gt;&lt;/li&gt;&lt;li class="MsoNormal" style=""&gt;&lt;span style=""&gt;Edit &lt;span style="color:fuchsia;"&gt;./user_interface/phonebook.php&lt;/span&gt;&lt;br /&gt;     # require "&lt;b&gt;../&lt;/b&gt;../../phplib/oohforms.inc";&lt;/span&gt;&lt;/li&gt;&lt;li class="MsoNormal" style=""&gt;&lt;span style=""&gt;Edit &lt;span style="color:fuchsia;"&gt;./user_interface/send_im.php&lt;/span&gt;&lt;br /&gt;     # require "&lt;b&gt;../&lt;/b&gt;../../phplib/oohforms.inc";&lt;/span&gt;&lt;/li&gt;&lt;li class="MsoNormal" style=""&gt;&lt;span style=""&gt;Edit &lt;span style="color:fuchsia;"&gt;./user_interface/notification_subscription.php&lt;/span&gt;&lt;br /&gt;     # require "&lt;b&gt;../&lt;/b&gt;../../phplib/oohforms.inc";&lt;/span&gt;&lt;/li&gt;&lt;li class="MsoNormal" style=""&gt;&lt;span style=""&gt;Edit &lt;span style="color:fuchsia;"&gt;./user_interface/reg/finish.php&lt;/span&gt;&lt;br /&gt;     # require "&lt;b&gt;../&lt;/b&gt;../../../phplib/oohforms.inc";&lt;/span&gt;&lt;/li&gt;&lt;li class="MsoNormal" style=""&gt;&lt;span style=""&gt;Edit &lt;span style="color:fuchsia;"&gt;./user_interface/reg/get_pass.php&lt;/span&gt;&lt;br /&gt;     # require "&lt;b&gt;../&lt;/b&gt;../../../phplib/oohforms.inc";&lt;/span&gt;&lt;/li&gt;&lt;li class="MsoNormal" style=""&gt;&lt;span style=""&gt;Edit &lt;span style="color:fuchsia;"&gt;./user_interface/reg/index.php&lt;/span&gt;&lt;br /&gt;     # require "&lt;b&gt;../&lt;/b&gt;../../../phplib/oohforms.inc";&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;   &lt;span style=""&gt;&lt;/span&gt;   &lt;p class="MsoNormal"&gt;&lt;span style=""&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;   &lt;/td&gt;   &lt;span style=""&gt;&lt;/span&gt;  &lt;/tr&gt; &lt;/tbody&gt;&lt;/table&gt;  &lt;p class="MsoNormal"&gt;&lt;span style=""&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p style="margin: 0in 0in 0.0001pt;"&gt;&lt;span style=""&gt; LAST STEP: START APACHE&lt;br /&gt;/etc/rc.d/init.d/httpd start&lt;br /&gt;&lt;!--[if !supportLineBreakNewLine]--&gt;&lt;br /&gt;&lt;!--[endif]--&gt;&lt;/span&gt;&lt;/p&gt;  &lt;span style=""&gt;&lt;/span&gt;  &lt;h2 style="margin: 0in 0in 0.0001pt;"&gt;Initial configuration of SER&lt;/h2&gt;  &lt;p style="margin: 0in 0in 0.0001pt;"&gt;Some key SER configuration commands&lt;/p&gt;  &lt;ul style="margin-top: 0in;" type="disc"&gt;&lt;li class="MsoNormal" style=""&gt;Create      users:You must be root.&lt;br /&gt;   &lt;b&gt;&lt;span style="color:fuchsia;"&gt;sudo su -&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;   Format of the command is: serctl add username password email&lt;br /&gt;   and you need to use the DEFAULT_PW=heslo as the password set in /usr/sbin/ser_mysql.sh&lt;br /&gt;   &lt;b&gt;&lt;span style="color:fuchsia;"&gt;/usr/sbin/serctl add &lt;/span&gt;&lt;span style="color:red;"&gt;srk password Stephen.Kingham@aarnet.edu.au&lt;/span&gt;&lt;span style="color:fuchsia;"&gt;&lt;br /&gt;   /usr/sbin/serctl add &lt;/span&gt;&lt;span style="color:red;"&gt;caf password      Clayton.Forbes@aarnet.edu.au&lt;br /&gt;   &lt;/span&gt;&lt;/b&gt;&lt;span style="color:black;"&gt;change&lt;/span&gt;&lt;span style="color:red;"&gt;      password&lt;/span&gt;&lt;span style="color:black;"&gt; to the&lt;/span&gt;&lt;span style="color:red;"&gt; &lt;i&gt;password&lt;/i&gt;&lt;/span&gt;&lt;span style="color:black;"&gt; &lt;span style=""&gt; &lt;/span&gt;that will be used by the user, do not use      password as a password!&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;  &lt;ul style="margin-top: 0in;" type="disc"&gt;&lt;li class="MsoNormal" style=""&gt;Give      the User several aliases, such as a telephone number:&lt;br /&gt;   &lt;b&gt;&lt;span style="color:fuchsia;"&gt;/usr/sbin/serctl &lt;/span&gt;&lt;/b&gt;&lt;/li&gt;&lt;/ul&gt;  &lt;ul style="margin-top: 0in;" type="disc"&gt;&lt;li class="MsoNormal" style=""&gt;Set up      some permanent forking, so calls to the user also go through to &lt;span style=""&gt; &lt;/span&gt;telephone numbers:&lt;br /&gt;   &lt;b&gt;&lt;span style="color:fuchsia;"&gt;/usr/sbin/serctl &lt;/span&gt;&lt;/b&gt;&lt;/li&gt;&lt;/ul&gt;  &lt;ul style="margin-top: 0in;" type="disc"&gt;&lt;li class="MsoNormal" style=""&gt;Test      the connection using two SIP UAs. &lt;/li&gt;&lt;ul style="margin-top: 0in;" type="circle"&gt;&lt;li class="MsoNormal" style=""&gt;See       the examples of &lt;a href="http://www2.blogger.com/index.html#UAs"&gt;how to       configure UAs&lt;/a&gt;.&lt;/li&gt;&lt;li class="MsoNormal" style=""&gt;Use       the this command to see who is logged in:&lt;br /&gt;    &lt;b&gt;&lt;span style="color:fuchsia;"&gt;serctl ul show&lt;/span&gt;&lt;/b&gt; &lt;/li&gt;&lt;/ul&gt;&lt;li class="MsoNormal" style=""&gt;What places users can call are set by a flag for the user in mysql, the "acl" table. Use the serctl command to enable various flags for each user. You can create the flags by configuring the serctl programme it's self, ie vi /usr/sbin/serctl.&lt;br /&gt;   &lt;b&gt;&lt;span style="color:fuchsia;"&gt;/usr/sbin/serctl acl grant &lt;/span&gt;&lt;span style="color:red;"&gt;srk&lt;br /&gt;   free-pstn&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;   &lt;b&gt;&lt;span style="color:fuchsia;"&gt;/usr/sbin/serctl acl grant &lt;/span&gt;&lt;span style="color:red;"&gt;srk&lt;br /&gt;   ld&lt;br /&gt;   &lt;/span&gt;&lt;span style="color:fuchsia;"&gt;/usr/sbin/serctl acl grant &lt;/span&gt;&lt;span style="color:red;"&gt;srk&lt;br /&gt;   ld &lt;/span&gt;&lt;/b&gt;&lt;br /&gt;   What the various flags do is done within the routing in ser.cfg.&lt;/li&gt;&lt;/ul&gt;&lt;div class="blogger-post-footer"&gt;akdayal@yahoo.com&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1818419888217740295-8803837218093970303?l=ananddayal.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ananddayal.blogspot.com/feeds/8803837218093970303/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1818419888217740295&amp;postID=8803837218093970303' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1818419888217740295/posts/default/8803837218093970303'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1818419888217740295/posts/default/8803837218093970303'/><link rel='alternate' type='text/html' href='http://ananddayal.blogspot.com/2007/02/these-are-step-by-step-very-simple.html' title='These are step by step very simple instructions to help most people to build'/><author><name>Anand Kumar Dayal</name><uri>http://www.blogger.com/profile/15821949256334333875</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://bp2.blogger.com/_X_AIQvaR6X4/SJGDCYgSLAI/AAAAAAAADcI/tod2zTuEQCw/S220/PIC-AD-257(2).jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1818419888217740295.post-3057990064467318404</id><published>2007-02-22T02:27:00.000-08:00</published><updated>2007-02-22T12:04:04.349-08:00</updated><title type='text'>CDRTool installation (MYSQL)</title><content type='html'>Obtain the software from http://cdrtool.ag-projects.com. The software is&lt;br /&gt;available as a tar archive or as a debian package. &lt;br /&gt;&lt;br /&gt;Installing from the tar archive:&lt;br /&gt;&lt;br /&gt;Change directory to your web root (/var/www on Debian systems)&lt;br /&gt;&lt;br /&gt;tar zxvf cdrtool*.tgz &lt;br /&gt;&lt;br /&gt;Installing from the debian package:&lt;br /&gt;&lt;br /&gt;dpkg -i cdrtool*.deb&lt;br /&gt;&lt;br /&gt;The files will be installed under /var/www/CDRTool directory.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Create CDRTool database&lt;br /&gt;-----------------------&lt;br /&gt;&lt;br /&gt;You need MySQL root access with GRANT priviledges from the machine where&lt;br /&gt;CDRTool runs, otherwise copy the files required by setup/setup_mysql.sh to&lt;br /&gt;the MySQL machine and run the script locally.&lt;br /&gt;&lt;br /&gt;Change the MySQL password of the cdrtool user from file&lt;br /&gt;setup/create_users.mysql&lt;br /&gt;&lt;br /&gt;Then run the database setup script:&lt;br /&gt;&lt;br /&gt;/var/www/CDRtool/setup/mysql/setup_mysql.sh &lt;password&gt; &lt;dbserver&gt;&lt;br /&gt;&lt;br /&gt;The script performs the following: &lt;br /&gt;&lt;br /&gt;1. It adds to the MySQL server a user for cdrtool software&lt;br /&gt;2. It creates a new MySQL database "cdrtool" &lt;br /&gt;3. It creates a default web user admin/admin, you may use &lt;br /&gt;   this initial account to login in the web interface&lt;br /&gt;4. It populates the cdrtool database with initial values&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;PHP setup and Apache setup&lt;br /&gt;--------------------------&lt;br /&gt;&lt;br /&gt;Install PHP and dependencies. If you have chosen to install the debian package, the dependencies will be resolved during installation. &lt;br /&gt;&lt;br /&gt;Example for Debian systems and php4:&lt;br /&gt;&lt;br /&gt;Enable php-mysql module in /etc/php/*/php.ini:&lt;br /&gt;&lt;br /&gt;extension=mysql.so&lt;br /&gt;&lt;br /&gt;Enable php in apache web server. Configuration example for apache on Debian systems:&lt;br /&gt;&lt;br /&gt;/etc/apache/httpd.conf &lt;br /&gt;&lt;br /&gt;DirectoryIndex index.phtml index.php index.html index.htm index.shtml index.cgi&lt;br /&gt;AddType application/x-httpd-php .php&lt;br /&gt;AddType application/x-httpd-php .phtml&lt;br /&gt;&lt;br /&gt;Make sure php module is insbale in apache configuration. For apache this is done in /etc/apache/modules.conf: &lt;br /&gt;&lt;br /&gt;LoadModule php4_module /usr/lib/apache/1.3/libphp4.so&lt;br /&gt;&lt;br /&gt;Change AllowOverride None  to  AllowOverride All &lt;br /&gt;&lt;br /&gt;For apache2 us a2enmode php command.&lt;br /&gt;&lt;br /&gt;Create a virtual host for cdrtool. Example for apache2:&lt;br /&gt;&lt;br /&gt;cp setup/apache2/sites-available/cdrtool.example.com /etc/apache2/sites-enabled &lt;br /&gt;cp setup/apache2/conf.d/cdrtool /etc/apache2/conf.d/&lt;br /&gt;&lt;br /&gt;&lt;VirtualHost cdrtool.example.com:80&gt;&lt;br /&gt;&lt;br /&gt;   ServerName          cdrtool.example.com&lt;br /&gt;   DocumentRoot        /var/www/&lt;br /&gt;   CustomLog           /var/log/apache2/cdrtool-access.log combined&lt;br /&gt;   ErrorLog            /var/log/apache2/cdrtool-errors.log&lt;br /&gt;   SetEnvIf User-Agent ".*MSIE.*"      nokeepalive ssl-unclean-shutdown&lt;br /&gt;&lt;br /&gt;   # To enable SSL:&lt;br /&gt;   # a2enmode ssl&lt;br /&gt;   # add Listen 443 to ports.conf file&lt;br /&gt;   # generate site certificates&lt;br /&gt;&lt;br /&gt;   # SSLEngine           On&lt;br /&gt;   # SSLCertificateFile    /etc/apache2/ssl/snakeoil-rsa.crt&lt;br /&gt;   # SSLCertificateKeyFile /etc/apache2/ssl/snakeoil-rsa.key&lt;br /&gt;&lt;br /&gt;&lt;/VirtualHost&gt;&lt;br /&gt;&lt;br /&gt;Enable the virtual site using:&lt;br /&gt;&lt;br /&gt;a2ensite cdrtool.example.com&lt;br /&gt;&lt;br /&gt;You may enable ssl using "a2enmod ssl" command. If you use ssl you must also generate a site certificate using the instructions provided by apache2 software.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Create a configuration file&lt;br /&gt;---------------------------&lt;br /&gt;&lt;br /&gt;cd /var/www/CDRTool&lt;br /&gt;cp setup/global.inc.new.installation global.inc &lt;br /&gt;&lt;br /&gt;Edit global.inc and setup your variables to match your system.&lt;br /&gt;&lt;br /&gt;For each different datasource you must instantiate a new class extending one of the existing classes (ser, asterisk or cisco).&lt;br /&gt;&lt;br /&gt;global.inc.in contains a more elaborate example for setting up datasources&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Enable rating engine&lt;br /&gt;--------------------&lt;br /&gt;&lt;br /&gt;The rating engine is used for prepaid applications and as price calculator for postpaid traffic. It provides access to the rating tables and stays in memory (running as a daemon) to avoid reading the rating tables at every rating request. The rating tables can be reloaded without restarting the rating engine.&lt;br /&gt;&lt;br /&gt;See the information in the head of the scripts/ratingEngine.php daemon for how to enable prepaid or other rating functionality. For prepaid, an external B2BUA is required, CDRTool provides only the rating and update balance functions.&lt;br /&gt;&lt;br /&gt;Set the IP and port where the rating engine listens to and the OpenSER datasource in global.inc:&lt;br /&gt;&lt;br /&gt;$RatingEngine=array("socketIP"   =&gt;  IP.address.of.the.private.interface.of.cdrtool.example.com",&lt;br /&gt;                     "socketPort" =&gt; "9024",&lt;br /&gt;                     "CDRS_class" =&gt; "ser_radius");&lt;br /&gt;&lt;br /&gt;The MSQL schema for prepaid accounts: setup/mysql/create_prepaid.mysql The network engine has no security features, it must run over a protected network.&lt;br /&gt;&lt;br /&gt;Edit /etc/default/cdrtool and set RUN_ratingEngine=yes&lt;br /&gt;&lt;br /&gt;Then restart the rating engine:&lt;br /&gt;&lt;br /&gt;/etc/init.d/cdrtool restart&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;High availability&lt;br /&gt;-----------------  &lt;br /&gt;&lt;br /&gt;Setup heartbeat and MySQL replication.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;CRON setup&lt;br /&gt;----------&lt;br /&gt;&lt;br /&gt;Some operations must be scheduled to run periodically by cron. Such operations are the scripts that block fraudulous accounts in OpenSER, normalize the call detail records, purge the old SIP traces.&lt;br /&gt;&lt;br /&gt;The sample cron file is in /var/www/CDRTool/setup/crontabs/ &lt;br /&gt;&lt;br /&gt;This is done automatically if you install the debian package.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;RADIUS setup&lt;br /&gt;------------&lt;br /&gt;&lt;br /&gt;CDRTool works with FreeRadius server from http://www.freeradius.org&lt;br /&gt;&lt;br /&gt;apt-get install freeradius freeradius-mysql Create the database for radius tables on MySQL server&lt;br /&gt;&lt;br /&gt;mysqladmin -u root create radius&lt;br /&gt;&lt;br /&gt;Create RADIUS tables&lt;br /&gt;&lt;br /&gt;The paths might differ depending on freeradius installation&lt;br /&gt;&lt;br /&gt;cp /usr/share/doc/freeradius/examples/db_mysql.sql.gz .&lt;br /&gt;gunzip db_mysql.sql.gz &lt;br /&gt;mysql -u root radius &lt; /usr/share/doc/freeradius/examples/db_mysql.sql&lt;br /&gt;&lt;br /&gt;Patch radacct table for storage of CISCO VSA and rating. Apply a patch to the default radacct table. This will add fields necessary to store Vendor Specific Atributes from Cisco or OpenSER.&lt;br /&gt;&lt;br /&gt;It is not possible to mix call details records from CISCO and OpenSER in the same radius table. You need to create multiple radius server profiles and save the CDRs into dedicated tables for each datasource.&lt;br /&gt;&lt;br /&gt;Modify the default radacct table for OpenSER by running:&lt;br /&gt;&lt;br /&gt;/var/www/CDRTool/setup/radius/OpenSER/radacct-patch.sh&lt;br /&gt;&lt;br /&gt;and for CISCO by running:&lt;br /&gt;&lt;br /&gt;/var/www/CDRTool/setup/radius/CISCO/radacct-patch.sh &lt;br /&gt;&lt;br /&gt;Configure Freeradius to write data into the radacct table:&lt;br /&gt;&lt;br /&gt;cp /var/www/CDRTool/setup/radius/OpenSER/sql.conf /etc/freeradius/sql.conf  &lt;br /&gt;&lt;br /&gt;For large volume of CDRs it is usefull automatically rotate the tables in which the data is written. &lt;br /&gt;&lt;br /&gt;/var/www/CDRTool/setup/radius/OpenSER/radius_accounting.*, contain mysql procedures that automatically create monthly tables in the format radacctYYYYMM. To use mysql procedures, your must use MySQL server version 5 or greater and Freeradius server mysql module must be compiled to support CLIENT_MULTI_RESULTS mysql connection flag. This must be done in &lt;br /&gt;src/modules/rlm_sql/drivers/rlm_sql_mysql/sql_mysql.c:&lt;br /&gt;&lt;br /&gt;if (!(mysql_sock-&gt;sock = mysql_real_connect(&amp;(mysql_sock-&gt;conn),&lt;br /&gt;                                            config-&gt;sql_server,&lt;br /&gt;                                            config-&gt;sql_login,&lt;br /&gt;                                            config-&gt;sql_password,&lt;br /&gt;                                            config-&gt;sql_db,&lt;br /&gt;                                            atoi(config-&gt;sql_port),&lt;br /&gt;                                            NULL, &lt;br /&gt;                                            CLIENT_FOUND_ROWS|CLIENT_MULTI_RESULTS ))) {&lt;br /&gt;&lt;br /&gt;Also, if you use MediaProxy for accounting in combination with OpenSER you must use the MediaProxy version that supports the same mysql procedures.&lt;br /&gt; &lt;br /&gt;Edit the database connection details in sql.conf and restart Freeradius server.&lt;br /&gt;&lt;br /&gt;Add RADIUS clients in clients.conf. Each device sending RADIUS accounting requests must be added to /etc/radddb/clients.conf. Examples:&lt;br /&gt;&lt;br /&gt;client 10.0.0.0/8 {&lt;br /&gt;        secret=DssUET01&lt;br /&gt;        nastype=other&lt;br /&gt;        shortname=localnet&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;Enable MySQL accounting in FreeRadius server. Edit radius.conf "sql" must be uncommented or added if missing.   &lt;br /&gt;&lt;br /&gt;# accounting { &lt;br /&gt; detail &lt;br /&gt; sql &lt;br /&gt; }&lt;br /&gt;&lt;br /&gt;Copy /var/www/CDRTool/setup/radius/OpenSER/dictionary.ser to /etc/freeradius&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;OpenSER setup&lt;br /&gt;------------- &lt;br /&gt;&lt;br /&gt;CDRTool version &gt;4.3 have been tested only against OpenSER 1.0 and above.&lt;br /&gt;&lt;br /&gt;Enable MySQL storage for subscribers and accounting and Radius accounting. For SIP Tracing you need OpenSER siptrace module. To enable quota you must add an extra column in the subscriber table:&lt;br /&gt;&lt;br /&gt;alter table openser.subscriber add column quota int not null;&lt;br /&gt;&lt;br /&gt;Entries required in openser.cfg:&lt;br /&gt;&lt;br /&gt;loadmodule "acc.so"&lt;br /&gt;&lt;br /&gt;modparam("acc", "failed_transaction_flag", 1)&lt;br /&gt;modparam("acc", "report_cancels",     0)&lt;br /&gt;modparam("acc", "report_ack",         0)&lt;br /&gt;modparam("acc", "early_media",        0)&lt;br /&gt;&lt;br /&gt;modparam("acc", "log_level",          1)&lt;br /&gt;modparam("acc", "log_flag",           1)&lt;br /&gt;modparam("acc", "log_missed_flag",    1)&lt;br /&gt;&lt;br /&gt;modparam("acc", "radius_config",      "/etc/openser/radius/client.conf")&lt;br /&gt;modparam("acc", "radius_flag",        1)&lt;br /&gt;modparam("acc", "radius_missed_flag", 1)&lt;br /&gt;modparam("acc", "radius_extra",       "Sip-RPid=$avp(s:rpid); \&lt;br /&gt;                                       Source-IP=$si; \&lt;br /&gt;                                       Source-Port=$sp; \&lt;br /&gt;                                       Canonical-URI=$avp(can_uri); \&lt;br /&gt;                                       Billing-Party=$avp(billing_party); \&lt;br /&gt;                                       Divert-Reason=$avp(s:divert_reason); \&lt;br /&gt;                                       X-RTP-Stat=$avp(s:rtp_statistics); \&lt;br /&gt;                                       From-Header=$hdr(from); \&lt;br /&gt;                                       User-Agent=$hdr(user-agent); \&lt;br /&gt;                                       Contact=$hdr(contact); \&lt;br /&gt;                                       Event=$hdr(event); \&lt;br /&gt;                                       SIP-Proxy-IP=$avp(s:sip_proxy_ip)")&lt;br /&gt;&lt;br /&gt;Further, you must enable accounting in various parts of the routing script by setting the accounting flag and saving the AVP containing the proxy IP address. It is important to save $avp(can_uri) after the Proxy has performed all possible lookups except DNS. The Canonical-URI will be used for rating the session. Example:&lt;br /&gt;&lt;br /&gt;route {&lt;br /&gt;       ...&lt;br /&gt;       setflag(ACCOUNTING_FLAG);&lt;br /&gt;       avp_write("SER_IP","$avp(s:sip-proxy)");&lt;br /&gt;       avp_write("$ru", "$avp(can_uri)");&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;Copy /var/www/CDRTool/setup/radius/OpenSER/dictionary.ser to /etc/openser/radius/ and uncomment the line:&lt;br /&gt;&lt;br /&gt;$INCLUDE               /etc/radiusclient-ng/dictionary&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;SOAP engine&lt;br /&gt;-----------&lt;br /&gt;&lt;br /&gt;Warning!&lt;br /&gt;&lt;br /&gt;Support for the SOAP engine has been discontinued from version &gt;=5.0.&lt;br /&gt;&lt;br /&gt;Note: It depends on the SOAP library from http://pear.php.net/package/SOAP. On Debian systems, this dependency is automatically installed but if CDRTool is installed from the tar archive you must download and install manually this SOAP library.&lt;br /&gt;&lt;br /&gt;The SOAP engine can be used by an external provisioning system to access information available in CDRTool (like prepaid accounts).&lt;br /&gt;&lt;br /&gt;The rating and other CDRTool functions (like provisioning of prepaid accounts or checking the balance) are available by using SOAP calls. The SOAP calls are translated into requests for the rating engine (which must be up and running, see previous section).&lt;br /&gt;&lt;br /&gt;The SOAP functionality including a WSDL file for creating a SOAP client is available in SOAP/WSDL/ directory.&lt;br /&gt;&lt;br /&gt;The SOAP server supports authorization, the SOAP clients must connect using an account that has soap_client right assigned into the CDRTool accounts page. The SOAP server uses the Apache web server for transport, it can work with both HTTP and HTTPS. The servers logs all network requests to syslog.&lt;br /&gt; &lt;br /&gt;Define in global.inc the SOAP server URL where the client should connect to:&lt;br /&gt;&lt;br /&gt;$SOAPServer=array("cdr_source"=&gt;"ser_radius",&lt;br /&gt;                  "location"  =&gt;"https://example.com/CDRTool/SOAP/server.php",&lt;br /&gt;                  "wsdl"      =&gt;"https://example.com/CDRTool/SOAP/WSDL/"&lt;br /&gt;                  );&lt;br /&gt;&lt;br /&gt;A test SOAP client is available in SOAP/client.php. It connects to the server and displays the CDRTool server version.&lt;br /&gt;&lt;br /&gt;To prevent a bug in PEAR SOAP server add the following last line in function SOAP_ServerErrorHandler from SOAP/Server.php&lt;br /&gt;&lt;br /&gt;function SOAP_ServerErrorHandler($errno, $errmsg, $filename,$linenum, $vars) {&lt;br /&gt;    ....&lt;br /&gt;&lt;br /&gt;    unset($soap_server_fault-&gt;backtrace);&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;Interaction between rating engine and SOAP:&lt;br /&gt;&lt;br /&gt;Function            Provisioning            B2BUA            RatingEngine        SOAP/XML&lt;br /&gt;----------------------------------------------------------------------------------------&lt;br /&gt;MaxSessionTime                                &lt;-----------------&gt; &lt;br /&gt;&lt;br /&gt;DeductBalance                                 &lt;-----------------&gt; &lt;br /&gt;&lt;br /&gt;AddBalance                -----------------------------------------------------------&gt;&lt;br /&gt;                                                                   &lt;------------------                          &lt;br /&gt;&lt;br /&gt;CheckBalance              -----------------------------------------------------------&gt;&lt;br /&gt;                                                                   &lt;------------------                          &lt;br /&gt;&lt;br /&gt;ShowAccounts              -----------------------------------------------------------&gt;&lt;br /&gt;                                                                   &lt;------------------                          &lt;br /&gt;&lt;br /&gt;LastMissedCalls           -----------------------------------------------------------&gt; &lt;br /&gt;LastPlacedCalls           -----------------------------------------------------------&gt; &lt;br /&gt;LastReceivedCalls         -----------------------------------------------------------&gt; &lt;br /&gt;OpenSERLocations          -----------------------------------------------------------&gt; &lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;MediaProxy setup&lt;br /&gt;----------------&lt;br /&gt;&lt;br /&gt;MediaProy can log into CDRTool the IP bandwidth utilization, the codecs and the User Agents. MediaProxy logs this information into the database used by the Radiusserver, the radacct table.&lt;br /&gt;&lt;br /&gt;MediaProxy can also correct the session duration of CDRs for which no BYE messages have been received.&lt;br /&gt;&lt;br /&gt;The following information is logged: &lt;br /&gt;&lt;br /&gt;- InputOctets and OutputOctets&lt;br /&gt;- CodecType (like GSM or G711)&lt;br /&gt;- ApplicationType (text/audio/video)&lt;br /&gt;- User Agent(s)&lt;br /&gt;- Media IP source and IP destination&lt;br /&gt;&lt;br /&gt;See MediaProxy documentation for how to enable Radius or database accounting.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Asterisk setup&lt;br /&gt;--------------&lt;br /&gt;&lt;br /&gt;Download from cvs the asterisk-addons and patch asterisk to store CDRs in MySQL.&lt;br /&gt;&lt;br /&gt;See /var/www/CDRTool/setup/asterisk for more information.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Cisco setup&lt;br /&gt;-----------&lt;br /&gt;&lt;br /&gt;Use the CISCO CLI, enter enable mode and configuration from terminal:&lt;br /&gt;&lt;br /&gt;&gt;enable&lt;br /&gt;config terminal&lt;br /&gt;aaa new-model&lt;br /&gt;aaa group server radius aaa.router&lt;br /&gt;server RADIUS_SERVER_IP auth-port 1812 acct-port 1813&lt;br /&gt;aaa accounting connection h323 start-stop group radius&lt;br /&gt;gw-accounting h323&lt;br /&gt;gw-accounting h323 vsa&lt;br /&gt;gw-accounting voip&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Manual CDR uploads&lt;br /&gt;------------------&lt;br /&gt;&lt;br /&gt;If MySQL is down you will miss CDRs written by RADIUS. These CDRs can be reload manually from radius accounting files using the supplied upload scripts in scripts directory (IPNX, OpenSER and CISCO import scripts available).&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Q931 Release codes for Cisco&lt;br /&gt;----------------------------&lt;br /&gt;&lt;br /&gt;In CDRTool CISCO hexadecimal release codes are automatically mapped to Q931 release codes.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Rating engine&lt;br /&gt;-------------&lt;br /&gt;&lt;br /&gt;See RATING file.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Monitoring&lt;br /&gt;----------&lt;br /&gt;&lt;br /&gt;Monit can check if the rating engine stopped working and restart it. A sample configuration file for monit is available in setup/monit/monitrc. Edit the IP address and hostname where the rating engine runs and copy /var/www/CDRTool/setup/monit/monitrc /etc/monit/monit.d/cdrtool&lt;br /&gt;&lt;br /&gt;Usage statistics&lt;br /&gt;----------------&lt;br /&gt;&lt;br /&gt;CDRTool can build  usage statistics of the number of online SIP devices from OpenSER, simultaneous number of media streams and relayed IP traffic by MediaProxy.&lt;br /&gt;&lt;br /&gt;Define DB_siponline as a new database class in global.inc. Example:&lt;br /&gt;&lt;br /&gt;class DB_siponline extends DB_Sql {&lt;br /&gt;  var $Host     = "db";&lt;br /&gt;  var $Database = "openser";&lt;br /&gt;  var $User     = "openser";&lt;br /&gt;  var $Password = "password";&lt;br /&gt;  var $Halt_On_Error ="no";&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;Define all media proxy servers in:&lt;br /&gt; &lt;br /&gt;/var/www/CDRTool/status/config/media_servers.php&lt;br /&gt;&lt;br /&gt;The script that gathers the usage information and builds the graphical statistics is /var/www/CDRTool/scripts/buildStatistics.php&lt;br /&gt;&lt;br /&gt;This script runs as a cron job every 5 minutes.&lt;br /&gt;&lt;br /&gt;The usage information is cumulated in /tmp/CDRTool-sip-statistics.txt file, which is a plain text file with one line per domain and values separated by tabs. This file can be easily parsed by external scripts to build statistics using other tools like SNMP.&lt;br /&gt;@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;MYSQL SP&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@&lt;br /&gt;/*&lt;br /&gt;LAST UPDATED: 2007-01-04 03:14 CET&lt;br /&gt;&lt;br /&gt;CHANGELOG:&lt;br /&gt;- Added database name as parameter to stored procedures&lt;br /&gt;- Fixed the multiple query result in "update_raddact_record_mediaproxy"&lt;br /&gt;- Modus operandi update&lt;br /&gt;- Fixed determination of previous year in "update_raddact_record_mediaproxy"&lt;br /&gt;- Consolidate SET statements to minimize binary log entries&lt;br /&gt;- Fixed bug in update_raddact_record_mediaproxy, the record values were reset &lt;br /&gt;  after execution of update on the first table causing failure to update &lt;br /&gt;  the previous table &lt;br /&gt;&lt;br /&gt;Starting with version CDRTool version 4.9 it is possible to store call&lt;br /&gt;details records in automatically rotated radacct tables by using MySQL&lt;br /&gt;stored procedures.&lt;br /&gt;&lt;br /&gt;This implementation has been contributed by&lt;br /&gt;Andrei Magureanu &lt;uskratos@gmail.com&gt;&lt;br /&gt;&lt;br /&gt;How to setup auto-rotation&lt;br /&gt;--------------------------&lt;br /&gt;&lt;br /&gt;1. Load radius_accounting.proc into the mysql server. MySQL &gt;=5.0 &lt;br /&gt;version and SUPER priviledges are required.&lt;br /&gt;&lt;br /&gt;2. Patch the Freeradius server mysql client to allow stored procedures.&lt;br /&gt;Instructions can be found in ../freeradius directory. Re-compile and&lt;br /&gt;re-install Freeradius server.&lt;br /&gt;&lt;br /&gt;3. Copy radius_accounting.conf to sql.conf to the Freeradius server. Edit&lt;br /&gt;the new sql.conf with the database connection information.&lt;br /&gt;&lt;br /&gt;4. Update MediaProxy configuration to use radius accounting, instead of&lt;br /&gt;database accounting (MediaProxy &gt;= 1.8.0 is required)&lt;br /&gt;&lt;br /&gt;5. In CDRTool, change global.inc table name to:&lt;br /&gt;                    "table"              =&gt; "radacct".date("Ym"),&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;The modus operandi of the stored procedure&lt;br /&gt;------------------------------------------&lt;br /&gt;&lt;br /&gt;Currently, call detail records generated by the OpenSER SIP Proxy are stored into a central radius.radacct table. The radacct table grows and must be manually purged, the purge operation locks the table for writing, which is blocking the application that performs the queries, and this situation is unacceptable.&lt;br /&gt;&lt;br /&gt;The radacct tables are populated with data as follows: When a SIP session starts, an INSERT query generated by the Freeradius server inserts data into MySQL a radacctYYYYMM table (e.g. radacct200611). Later, when the SIP session ends, an UPDATE query sets various fields of the previously inserted record. The server that performs the INSERT matches the inserted data based on indexes present in the table. We want to store the data in monthly tables that have a name based on the following syntax:&lt;br /&gt;&lt;br /&gt;radacct%Y%m&lt;br /&gt;&lt;br /&gt;Examples: &lt;br /&gt;&lt;br /&gt;radacct200611 (November table)&lt;br /&gt;radacct200612 (December table)&lt;br /&gt;&lt;br /&gt;The stored procedure achieves the following: On INSERT the monthly table is created automatically when necessary. If an INSERT query fails with the mysql code table not available, the right table is created and the INSERT query is performed in the new table. The table name is derived from the current month, which is determined from the AcctStartTime radius attribute. On UPDATE the procedure detects if the UPDATE query has failed because the record does not exist in the current table and updates the record in the previous table by substracting one calendar month, redefining the table name&lt;br /&gt;and retry the query. The table name is derived from the AcctStopTime radius attribute. A example of queries on how the procedures can be used is available at the end of this script.&lt;br /&gt;&lt;br /&gt;*/&lt;br /&gt;&lt;br /&gt;-- OPTIONAL (COMMENT OUT): DATABASE TO USE&lt;br /&gt;-- USE radius;&lt;br /&gt;&lt;br /&gt;-- MUST FOR UNIX BASED SYSTEMS -- (SEE: http://dev.mysql.com/doc/refman/5.0/en/stored-procedure-logging.html)&lt;br /&gt;-- SET GLOBAL log_bin_trust_function_creators = 1;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;DELIMITER ;&lt;br /&gt;&lt;br /&gt;-- CREATE "BEGINNING OF DEFAULT TABLE NAME" FUNCTION &lt;br /&gt;&lt;br /&gt;DROP FUNCTION IF EXISTS `set_radacct_table_name`;&lt;br /&gt;&lt;br /&gt;DELIMITER $$&lt;br /&gt;&lt;br /&gt;CREATE FUNCTION `set_radacct_table_name`() RETURNS varchar(50)&lt;br /&gt; DETERMINISTIC&lt;br /&gt;BEGIN&lt;br /&gt; DECLARE tblname VARCHAR(50);&lt;br /&gt; SET tblname = 'radacct';&lt;br /&gt; RETURN tblname;&lt;br /&gt;END $$&lt;br /&gt;&lt;br /&gt;DELIMITER ;&lt;br /&gt;&lt;br /&gt;-- CREATE SUPPORT "CREATE TABLE" PROCEDURE&lt;br /&gt;&lt;br /&gt;DROP PROCEDURE IF EXISTS `create_radacct_table`;&lt;br /&gt;&lt;br /&gt;DELIMITER $$&lt;br /&gt;&lt;br /&gt;CREATE PROCEDURE `create_radacct_table`(IN var_tbl VARCHAR(50))&lt;br /&gt;&lt;br /&gt;BEGIN&lt;br /&gt;&lt;br /&gt; SET @stbl = CONCAT("CREATE TABLE IF NOT EXISTS ", var_tbl, " (&lt;br /&gt;  `RadAcctId` bigint(21) NOT NULL auto_increment,&lt;br /&gt;  `AcctSessionId` varchar(255) NOT NULL default '',&lt;br /&gt;  `AcctUniqueId` varchar(255) NOT NULL default '',&lt;br /&gt;  `UserName` varchar(64) NOT NULL default '',&lt;br /&gt;  `Realm` varchar(64) default '',&lt;br /&gt;  `NASIPAddress` varchar(15) NOT NULL default '',&lt;br /&gt;  `NASPortId` varchar(50) NOT NULL default '',&lt;br /&gt;  `NASPortType` varchar(255) NOT NULL default '',&lt;br /&gt;  `AcctStartTime` datetime NOT NULL default '0000-00-00  00:00:00',&lt;br /&gt;  `AcctStopTime` datetime NOT NULL default '0000-00-00 00:00:00',&lt;br /&gt;  `AcctSessionTime` int(12) default NULL,&lt;br /&gt;  `AcctAuthentic` varchar(32) default NULL,&lt;br /&gt;  `ConnectInfo_start` varchar(32) default NULL,&lt;br /&gt;  `ConnectInfo_stop` varchar(32) default NULL,&lt;br /&gt;  `AcctInputOctets` bigint(12) default NULL,&lt;br /&gt;  `AcctOutputOctets` bigint(12) default NULL,&lt;br /&gt;  `CalledStationId` varchar(50) NOT NULL default '',&lt;br /&gt;  `CallingStationId` varchar(50) NOT NULL default '',&lt;br /&gt;  `AcctTerminateCause` varchar(32) NOT NULL default '',&lt;br /&gt;  `ServiceType` varchar(32) default NULL,&lt;br /&gt;  `FramedProtocol` varchar(32) default NULL,&lt;br /&gt;  `FramedIPAddress` varchar(15) NOT NULL default '',&lt;br /&gt;  `AcctStartDelay` int(12) default NULL,&lt;br /&gt;  `AcctStopDelay` int(12) default NULL,&lt;br /&gt;  `SipMethod` varchar(50) NOT NULL default '',&lt;br /&gt;  `SipResponseCode` smallint(5) unsigned NOT NULL default '0',&lt;br /&gt;  `SipToTag` varchar(128) NOT NULL default '',&lt;br /&gt;  `SipFromTag` varchar(128) NOT NULL default '',&lt;br /&gt;  `SipTranslatedRequestURI` varchar(255) NOT NULL default '',&lt;br /&gt;  `SipUserAgents` varchar(255) NOT NULL default '',&lt;br /&gt;  `SipApplicationType` varchar(255) NOT NULL default '',&lt;br /&gt;  `SipCodecs` varchar(255) NOT NULL default '',&lt;br /&gt;  `SipRPID` varchar(255) NOT NULL default '',&lt;br /&gt;  `SipRPIDHeader` varchar(255) NOT NULL default '',&lt;br /&gt;  `SourceIP` varchar(255) NOT NULL default '',&lt;br /&gt;  `SourcePort` varchar(255) NOT NULL default '',&lt;br /&gt;  `CanonicalURI` varchar(255) NOT NULL default '',&lt;br /&gt;  `DelayTime` varchar(5) NOT NULL default '',&lt;br /&gt;  `Timestamp` bigint(20) NOT NULL default '0',&lt;br /&gt;  `DestinationId` varchar(15) NOT NULL default '',&lt;br /&gt;  `Rate` text NOT NULL,&lt;br /&gt;  `Price` double(20,4) default NULL,&lt;br /&gt;  `Normalized` enum('0','1') default '0',&lt;br /&gt;  `BillingId` varchar(255) NOT NULL default '',&lt;br /&gt;  `MediaInfo` varchar(32) default NULL,&lt;br /&gt;  `RTPStatistics` text NOT NULL,&lt;br /&gt;  `FromHeader` varchar(128) NOT NULL default '',&lt;br /&gt;  `UserAgent` varchar(128) NOT NULL default '',&lt;br /&gt;  `Contact` varchar(128) NOT NULL default '',&lt;br /&gt;  PRIMARY KEY  (`RadAcctId`),&lt;br /&gt;  UNIQUE KEY `sess_id` (`AcctSessionId`(128),`SipFromTag`,`SipToTag`),&lt;br /&gt;   KEY `UserName` (`UserName`),&lt;br /&gt;   KEY `AcctSessionId` (`AcctSessionId`),&lt;br /&gt;   KEY `AcctUniqueId` (`AcctUniqueId`),&lt;br /&gt;   KEY `AcctStartTime` (`AcctStartTime`),&lt;br /&gt;   KEY `AcctStopTime` (`AcctStopTime`),&lt;br /&gt;   KEY `NASIPAddress` (`NASIPAddress`),&lt;br /&gt;   KEY `caller_idx` (`CallingStationId`),&lt;br /&gt;   KEY `called_idx` (`CalledStationId`),&lt;br /&gt;   KEY `canon_idx` (`CanonicalURI`),&lt;br /&gt;   KEY `source_ip_idx` (`SourceIP`),&lt;br /&gt;   KEY `billing_id_idx` (`BillingId`),&lt;br /&gt;   KEY `dest_id_idx` (`DestinationId`),&lt;br /&gt;   KEY `sip_req_uri_idx` (`SipTranslatedRequestURI`),&lt;br /&gt;   KEY `normalize_idx` (`Normalized`),&lt;br /&gt;   KEY `MediaInfo_idx` (`MediaInfo`),&lt;br /&gt;   KEY `Realm_idx` (`Realm`)&lt;br /&gt; ) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=1");&lt;br /&gt; PREPARE ctbl_stmt FROM @stbl;&lt;br /&gt; EXECUTE ctbl_stmt;&lt;br /&gt; DEALLOCATE PREPARE ctbl_stmt;&lt;br /&gt;&lt;br /&gt;END $$&lt;br /&gt;&lt;br /&gt;DELIMITER ;&lt;br /&gt;&lt;br /&gt;-- CREATE "INSERT RECORD" PROCEDURE&lt;br /&gt;DROP PROCEDURE IF EXISTS `insert_radacct_record`;&lt;br /&gt;&lt;br /&gt;DELIMITER $$&lt;br /&gt;&lt;br /&gt;CREATE PROCEDURE `insert_radacct_record`(&lt;br /&gt; IN var_db_name VARCHAR(20),&lt;br /&gt; IN var_AcctSessionId VARCHAR(255),&lt;br /&gt; IN var_AcctUniqueId VARCHAR(255),&lt;br /&gt; IN var_UserName VARCHAR(64),&lt;br /&gt; IN var_Realm VARCHAR(64),&lt;br /&gt; IN var_NASIPAddress VARCHAR(15),&lt;br /&gt; IN var_NASPortId VARCHAR(50),&lt;br /&gt; IN var_AcctStartTime VARCHAR(20),&lt;br /&gt; IN var_AcctStopTime VARCHAR(20),&lt;br /&gt; IN var_AcctSessionTime INT(12),&lt;br /&gt; IN var_AcctInputOctets BIGINT(12),&lt;br /&gt; IN var_AcctOutputOctets BIGINT(12),&lt;br /&gt; IN var_CalledStationId VARCHAR(50),&lt;br /&gt; IN var_CallingStationId VARCHAR(50),&lt;br /&gt; IN var_AcctTerminateCause VARCHAR(32),&lt;br /&gt; IN var_ServiceType VARCHAR(32),&lt;br /&gt; IN var_FramedProtocol VARCHAR(32),&lt;br /&gt; IN var_FramedIPAddress VARCHAR(15),&lt;br /&gt; IN var_AcctStartDelay INT(12),&lt;br /&gt; IN var_AcctStopDelay INT(12),&lt;br /&gt; IN var_SipResponseCode SMALLINT(5),&lt;br /&gt; IN var_SipMethod VARCHAR(50),&lt;br /&gt; IN var_SipTranslatedRequestURI VARCHAR(255),&lt;br /&gt; IN var_SipToTag VARCHAR(128),&lt;br /&gt; IN var_SipFromTag VARCHAR(128),&lt;br /&gt; IN var_SipRPID VARCHAR(255),&lt;br /&gt; IN var_SourceIP VARCHAR(255),&lt;br /&gt; IN var_SourcePort VARCHAR(255),&lt;br /&gt; IN var_CanonicalURI VARCHAR(255),&lt;br /&gt; IN var_Rate TEXT,&lt;br /&gt; IN var_RTPStatistics TEXT&lt;br /&gt;)&lt;br /&gt;BEGIN&lt;br /&gt;&lt;br /&gt; -- SET VARIABLES&lt;br /&gt; SET @v_AcctSessionId = var_AcctSessionId,&lt;br /&gt; @v_AcctUniqueId = var_AcctUniqueId,&lt;br /&gt; @v_UserName = var_UserName,&lt;br /&gt; @v_Realm = var_Realm,&lt;br /&gt; @v_NASIPAddress = var_NASIPAddress,&lt;br /&gt; @v_NASPortId = var_NASPortId;&lt;br /&gt;&lt;br /&gt; IF var_AcctStartTime = '0' OR var_AcctStartTime = '' THEN&lt;br /&gt;  SET @v_AcctStartTime = NOW();&lt;br /&gt; ELSE&lt;br /&gt;  SET @v_AcctStartTime = CAST(var_AcctStartTime AS DATETIME);&lt;br /&gt; END IF;&lt;br /&gt; &lt;br /&gt; IF var_AcctStopTime = '0' OR var_AcctStopTime = '' THEN&lt;br /&gt;  SET @v_AcctStopTime = CAST('0000-00-00 00:00:00' AS DATETIME);&lt;br /&gt; ELSE&lt;br /&gt;  SET @v_AcctStopTime = CAST(var_AcctStopTime AS DATETIME);&lt;br /&gt; END IF;&lt;br /&gt; &lt;br /&gt; SET @v_db_name = var_db_name,&lt;br /&gt; @v_AcctSessionTime = var_AcctSessionTime,&lt;br /&gt; @v_AcctInputOctets = var_AcctInputOctets,&lt;br /&gt; @v_AcctOutputOctets = var_AcctOutputOctets,&lt;br /&gt; @v_CalledStationId = var_CalledStationId,&lt;br /&gt; @v_CallingStationId = var_CallingStationId,&lt;br /&gt; @v_AcctTerminateCause = var_AcctTerminateCause,&lt;br /&gt; @v_ServiceType = var_ServiceType,&lt;br /&gt; @v_FramedProtocol = var_FramedProtocol,&lt;br /&gt; @v_FramedIPAddress = var_FramedIPAddress,&lt;br /&gt; @v_AcctStartDelay = var_AcctStartDelay,&lt;br /&gt; @v_AcctStopDelay = var_AcctStopDelay,&lt;br /&gt; @v_SipResponseCode = var_SipResponseCode,&lt;br /&gt; @v_SipMethod = var_SipMethod,&lt;br /&gt; @v_SipTranslatedRequestURI = var_SipTranslatedRequestURI,&lt;br /&gt; @v_SipToTag = var_SipToTag,&lt;br /&gt; @v_SipFromTag = var_SipFromTag,&lt;br /&gt; @v_SipRPID = var_SipRPID,&lt;br /&gt; @v_SourceIP = var_SourceIP,&lt;br /&gt; @v_SourcePort = var_SourcePort,&lt;br /&gt; @v_CanonicalURI = var_CanonicalURI,&lt;br /&gt;  @v_Rate = var_Rate,&lt;br /&gt; @v_RTPStatistics = var_RTPStatistics,&lt;br /&gt; @var_y = (SELECT YEAR(@v_AcctStartTime)),&lt;br /&gt; @var_m = (SELECT DATE_FORMAT(@v_AcctStartTime, '%m')),&lt;br /&gt; @var_tbl_begin = (SELECT set_radacct_table_name()),&lt;br /&gt; @var_tbl = CONCAT(@var_tbl_begin, @var_y, @var_m),&lt;br /&gt; @var_tbl_cnt = (SELECT COUNT(TABLE_NAME) AS TBLCNT&lt;br /&gt; FROM information_schema.tables&lt;br /&gt; WHERE TABLE_SCHEMA = @v_db_name&lt;br /&gt; AND TABLE_NAME = @var_tbl);&lt;br /&gt;&lt;br /&gt; -- TABLE DOES NOT EXIST&lt;br /&gt; IF @var_tbl_cnt = 0 THEN&lt;br /&gt;&lt;br /&gt;      -- CREATE RAD TABLE&lt;br /&gt;  SET @ctblproc = CONCAT("CALL create_radacct_table(", "'", @var_tbl, "'", ")");&lt;br /&gt;  PREPARE ctbl_proc_stmt FROM @ctblproc;&lt;br /&gt;  EXECUTE ctbl_proc_stmt;&lt;br /&gt;      DEALLOCATE PREPARE ctbl_proc_stmt;&lt;br /&gt;&lt;br /&gt; END IF;&lt;br /&gt;&lt;br /&gt; -- INSERT RECORD IN NEW TABLE&lt;br /&gt; SET @instmt = CONCAT("INSERT INTO ", @var_tbl, " (&lt;br /&gt;  RadAcctId, AcctSessionId, AcctUniqueId,&lt;br /&gt;  UserName, Realm, NASIPAddress, NASPortId,&lt;br /&gt;  AcctStartTime, AcctStopTime, AcctSessionTime,&lt;br /&gt;  AcctInputOctets, AcctOutputOctets, CalledStationId,&lt;br /&gt;  CallingStationId, AcctTerminateCause, ServiceType,&lt;br /&gt;  FramedProtocol, FramedIPAddress, AcctStartDelay,&lt;br /&gt;  AcctStopDelay, SipResponseCode,&lt;br /&gt;  SipMethod, SipTranslatedRequestURI, SipToTag,&lt;br /&gt;  SipFromTag, SipRPID, SourceIP, SourcePort, CanonicalURI,&lt;br /&gt;  Rate, RTPStatistics)&lt;br /&gt;  VALUES (NULL, ?, ?, ?, SUBSTRING_INDEX(?, '@',-1),&lt;br /&gt;  ?, ?, ?, ?, ?, ?, ?, trim(leading 'sip:' from trim(leading 'sips:' from ?)), trim(leading 'sip:' from trim(leading 'sips:' from ?)), ?, ?, ?, ?, ?, ?, ?, ?,trim(leading 'sip:' from trim(leading 'sips:' from ?)), ?, ?, ?, ?, ?, trim(leading 'sip:' from trim(leading 'sips:' from ?)), ?, ?  )");&lt;br /&gt;&lt;br /&gt; PREPARE add_rad FROM @instmt;&lt;br /&gt; EXECUTE add_rad USING @v_AcctSessionId, @v_AcctUniqueId,&lt;br /&gt;  @v_UserName, @v_Realm, @v_NASIPAddress, @v_NASPortId,&lt;br /&gt;  @v_AcctStartTime, @v_AcctStopTime, @v_AcctSessionTime,&lt;br /&gt;  @v_AcctInputOctets, @v_AcctOutputOctets, @v_CalledStationId,&lt;br /&gt;  @v_CallingStationId, @v_AcctTerminateCause, @v_ServiceType,&lt;br /&gt;  @v_FramedProtocol, @v_FramedIPAddress, @v_AcctStartDelay,&lt;br /&gt;  @v_AcctStopDelay, @v_SipResponseCode, @v_SipMethod,&lt;br /&gt;  @v_SipTranslatedRequestURI, @v_SipToTag, @v_SipFromTag,&lt;br /&gt;  @v_SipRPID, @v_SourceIP, @v_SourcePort, @v_CanonicalURI,&lt;br /&gt;  @v_Rate, @v_RTPStatistics;&lt;br /&gt; DEALLOCATE PREPARE add_rad;&lt;br /&gt;&lt;br /&gt; -- CLEAN UP&lt;br /&gt; SET @v_AcctSessionId = null,&lt;br /&gt; @v_AcctUniqueId = null,&lt;br /&gt; @v_UserName = null,&lt;br /&gt; @v_Realm = null,&lt;br /&gt; @v_NASIPAddress = null,&lt;br /&gt; @v_NASPortId = null,&lt;br /&gt; @v_AcctStartTime = null,&lt;br /&gt; @v_AcctStopTime = null,&lt;br /&gt; @v_AcctSessionTime = null,&lt;br /&gt; @v_AcctInputOctets = null,&lt;br /&gt; @v_AcctOutputOctets = null,&lt;br /&gt; @v_CalledStationId = null,&lt;br /&gt; @v_CallingStationId = null,&lt;br /&gt; @v_AcctTerminateCause = null,&lt;br /&gt; @v_ServiceType = null,&lt;br /&gt; @v_FramedProtocol = null,&lt;br /&gt; @v_FramedIPAddress = null,&lt;br /&gt; @v_AcctStartDelay = null,&lt;br /&gt; @v_AcctStopDelay = null,&lt;br /&gt; @v_SipResponseCode = null,&lt;br /&gt; @v_SipMethod = null,&lt;br /&gt; @v_SipTranslatedRequestURI = null,&lt;br /&gt; @v_SipToTag = null,&lt;br /&gt; @v_SipFromTag = null,&lt;br /&gt; @v_SipRPID = null,&lt;br /&gt; @v_SourceIP = null,&lt;br /&gt; @v_SourcePort = null,&lt;br /&gt; @v_CanonicalURI = null,&lt;br /&gt;  @v_Rate = null,&lt;br /&gt; @v_RTPStatistics = null,&lt;br /&gt; @var_y = null,&lt;br /&gt; @var_m = null,&lt;br /&gt; @v_db_name = null,&lt;br /&gt; @var_tbl_begin = null,&lt;br /&gt; @var_tbl = null;&lt;br /&gt;&lt;br /&gt;END $$&lt;br /&gt;&lt;br /&gt;DELIMITER ;&lt;br /&gt;&lt;br /&gt;-- CREATE "UPDATE RECORD" PROCEDURE&lt;br /&gt;&lt;br /&gt;DROP PROCEDURE IF EXISTS `update_radacct_record`;&lt;br /&gt;&lt;br /&gt;DELIMITER $$&lt;br /&gt;&lt;br /&gt;CREATE PROCEDURE `update_radacct_record`(&lt;br /&gt; IN var_db_name VARCHAR(20),&lt;br /&gt; IN var_AcctStopTime VARCHAR(20),&lt;br /&gt; IN var_AcctStopDelay INT(12),&lt;br /&gt; IN var_ConnectInfo_stop VARCHAR(32),&lt;br /&gt; IN var_RTPStatistics VARCHAR(255),&lt;br /&gt; IN var_AcctSessionId VARCHAR(255),&lt;br /&gt; IN var_SipToTag VARCHAR(128),&lt;br /&gt; IN var_SipFromTag VARCHAR(128)&lt;br /&gt;)&lt;br /&gt;&lt;br /&gt;BEGIN&lt;br /&gt;&lt;br /&gt; -- SET VARIABLES&lt;br /&gt; SET @v_db_name = var_db_name,&lt;br /&gt; @var_tbl_begin = (SELECT set_radacct_table_name()),&lt;br /&gt; @v_stoptime = var_AcctStopTime,&lt;br /&gt; @var_month_formatted = (SELECT DATE_FORMAT(@v_stoptime, '%m')),&lt;br /&gt; @var_yst = (SELECT DATE_FORMAT(@v_stoptime, '%Y')),&lt;br /&gt;  @var_tbl_month = CONCAT(@var_tbl_begin, @var_yst, @var_month_formatted),&lt;br /&gt; @v_AcctStopTime = CAST(var_AcctStopTime AS DATETIME),&lt;br /&gt; @v_AcctStopDelay = var_AcctStopDelay,&lt;br /&gt; @v_ConnectInfo_stop = var_ConnectInfo_stop,&lt;br /&gt; @v_RTPStatistics = var_RTPStatistics,&lt;br /&gt; @v_AcctSessionId = var_AcctSessionId,&lt;br /&gt; @v_SipToTag = var_SipToTag,&lt;br /&gt; @v_SipFromTag = var_SipFromTag,&lt;br /&gt; @var_tbl_cnt1 = (SELECT COUNT(TABLE_NAME) AS TBLCNT&lt;br /&gt; FROM information_schema.tables&lt;br /&gt; WHERE TABLE_SCHEMA = @v_db_name&lt;br /&gt; AND TABLE_NAME = @var_tbl_month);&lt;br /&gt;&lt;br /&gt; IF @var_tbl_cnt1 = 1 THEN&lt;br /&gt;  -- WE HAVE A TABLE BASED ON StopTime&lt;br /&gt;  -- SO LET'S TRY TO UPDATE&lt;br /&gt;  SET @updstmt1 = CONCAT("UPDATE ", @var_tbl_month, " SET&lt;br /&gt;  AcctStopTime = ?,&lt;br /&gt;  AcctSessionTime = UNIX_TIMESTAMP(?) - UNIX_TIMESTAMP(AcctStartTime),&lt;br /&gt;  AcctStopDelay = ?,&lt;br /&gt;   ConnectInfo_stop = ?,&lt;br /&gt;  RTPStatistics = ?,&lt;br /&gt;  Normalized = '0'&lt;br /&gt;  WHERE&lt;br /&gt;  AcctSessionId = ?&lt;br /&gt;  AND ((SipToTag = ? AND SipFromTag = ?) OR (SipToTag = ? AND SipFromTag = ?))&lt;br /&gt;  AND ConnectInfo_stop IS NULL;");&lt;br /&gt;  PREPARE update_rad1 FROM @updstmt1;&lt;br /&gt;  EXECUTE update_rad1 USING @v_AcctStopTime, @v_AcctStopTime,&lt;br /&gt;   @v_AcctStopDelay, @v_ConnectInfo_stop, @v_RTPStatistics,&lt;br /&gt;   @v_AcctSessionId, @v_SipToTag, @v_SipFromTag,&lt;br /&gt;   @v_SipFromTag, @v_SipToTag;&lt;br /&gt;&lt;br /&gt;  SET @updatedrows = (SELECT ROW_COUNT()),&lt;br /&gt;  @updstmt1 = null;&lt;br /&gt;&lt;br /&gt;  DEALLOCATE PREPARE update_rad1;&lt;br /&gt;&lt;br /&gt; ELSE&lt;br /&gt;  SET @updatedrows = 0;&lt;br /&gt; END IF;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt; IF @updatedrows = 0 THEN&lt;br /&gt;  -- UPDATE LAST MONTH'S TABLE BASED ON var_AcctStopTime&lt;br /&gt;&lt;br /&gt;  SET @var_prev_month = (SELECT DATE_FORMAT(DATE_ADD(@v_stoptime, INTERVAL -1 MONTH), '%Y%m')),&lt;br /&gt;  @var_tbl_pmonth = CONCAT(@var_tbl_begin, @var_prev_month),&lt;br /&gt;  @var_tbl_cnt2 = (SELECT COUNT(TABLE_NAME) AS TBLCNT&lt;br /&gt;  FROM information_schema.tables&lt;br /&gt;  WHERE TABLE_SCHEMA = @v_db_name&lt;br /&gt;  AND TABLE_NAME = @var_tbl_pmonth);&lt;br /&gt;&lt;br /&gt;  IF @var_tbl_cnt2 = 1 THEN&lt;br /&gt;   -- UPDATE PREVIOUS MONTH TABLE&lt;br /&gt;&lt;br /&gt;   SET @updstmt2 = CONCAT("UPDATE ", @var_tbl_pmonth, " SET&lt;br /&gt;   AcctStopTime = ?,&lt;br /&gt;   AcctSessionTime = UNIX_TIMESTAMP(?) - UNIX_TIMESTAMP(AcctStartTime),&lt;br /&gt;   AcctStopDelay = ?,&lt;br /&gt;   ConnectInfo_stop = ?,&lt;br /&gt;   RTPStatistics = ?,&lt;br /&gt;   Normalized = '0'&lt;br /&gt;   WHERE&lt;br /&gt;   AcctSessionId = ?&lt;br /&gt;   AND ((SipToTag = ? AND SipFromTag = ?) OR&lt;br /&gt;   (SipToTag = ? AND SipFromTag = ?));");&lt;br /&gt;   PREPARE update_rad2 FROM @updstmt2;&lt;br /&gt;   EXECUTE update_rad2 USING @v_AcctStopTime, @v_AcctStopTime,&lt;br /&gt;    @v_AcctStopDelay, @v_ConnectInfo_stop, @v_RTPStatistics,&lt;br /&gt;    @v_AcctSessionId, @v_SipToTag, @v_SipFromTag,&lt;br /&gt;    @v_SipFromTag, @v_SipToTag;&lt;br /&gt;&lt;br /&gt;   SET @updatedrows = (SELECT ROW_COUNT()),&lt;br /&gt;   @updstmt = null;&lt;br /&gt;&lt;br /&gt;   DEALLOCATE PREPARE update_rad2;&lt;br /&gt;  ELSE&lt;br /&gt;   SET @updatedrows = 0;&lt;br /&gt;  END IF;&lt;br /&gt;&lt;br /&gt; END IF;&lt;br /&gt;&lt;br /&gt; -- CLEAN UP&lt;br /&gt; SET @v_AcctStopTime = null,&lt;br /&gt; @v_AcctStopDelay = null,&lt;br /&gt; @v_ConnectInfo_stop = null,&lt;br /&gt; @v_RTPStatistics = null,&lt;br /&gt; @v_AcctSessionId = null,&lt;br /&gt; @v_SipToTag = null,&lt;br /&gt; @v_SipFromTag = null,&lt;br /&gt; @v_db_name = null;&lt;br /&gt;&lt;br /&gt;END $$&lt;br /&gt;&lt;br /&gt;DELIMITER ;&lt;br /&gt;&lt;br /&gt;-- CREATE "MEDIAPROXY RECORD UPDATE" PROCEDURE&lt;br /&gt;&lt;br /&gt;DROP PROCEDURE IF EXISTS `update_raddact_record_mediaproxy`;&lt;br /&gt;&lt;br /&gt;DELIMITER $$&lt;br /&gt;&lt;br /&gt;CREATE PROCEDURE `update_raddact_record_mediaproxy`(&lt;br /&gt; IN var_db_name VARCHAR(20),&lt;br /&gt; IN var_AcctSessionTime int(12),&lt;br /&gt; IN var_AcctInputOctets bigint(12),&lt;br /&gt; IN var_AcctOutputOctets bigint(12),&lt;br /&gt; IN var_SipUserAgents VARCHAR(255),&lt;br /&gt; IN var_SipCodecs VARCHAR(255),&lt;br /&gt; IN var_SipApplicationType VARCHAR(255),&lt;br /&gt; IN var_MediaInfo VARCHAR(32),&lt;br /&gt; IN var_Normalized ENUM('0','1'),&lt;br /&gt; IN var_AcctSessionId VARCHAR(255),&lt;br /&gt; IN var_SipToTag VARCHAR(128),&lt;br /&gt; IN var_SipFromTag VARCHAR(128)&lt;br /&gt;)&lt;br /&gt;&lt;br /&gt;BEGIN&lt;br /&gt;&lt;br /&gt; -- SET VARIABLES&lt;br /&gt; SET @var_tbl_begin = (SELECT set_radacct_table_name()),&lt;br /&gt; @var_prev_month = (SELECT DATE_FORMAT(DATE_ADD(CURRENT_DATE, INTERVAL -1 MONTH), '%Y%m')),&lt;br /&gt; @var_current_month = (SELECT DATE_FORMAT(CURRENT_DATE, '%Y%m')),&lt;br /&gt; @var_tbl = CONCAT(@var_tbl_begin, @var_current_month),&lt;br /&gt; @var_tbl_prev_month = CONCAT(@var_tbl_begin, @var_prev_month),&lt;br /&gt; @v_AcctSessionTime = var_AcctSessionTime,&lt;br /&gt; @v_AcctInputOctets = var_AcctInputOctets,&lt;br /&gt; @v_AcctOutputOctets = var_AcctOutputOctets,&lt;br /&gt; @v_SipUserAgents = var_SipUserAgents,&lt;br /&gt; @v_SipCodecs = var_SipCodecs,&lt;br /&gt; @v_SipApplicationType = var_SipApplicationType,&lt;br /&gt; @v_MediaInfo = var_MediaInfo,&lt;br /&gt; @v_Normalized = var_Normalized,&lt;br /&gt; @v_AcctSessionId = var_AcctSessionId,&lt;br /&gt; @v_SipToTag = var_SipToTag,&lt;br /&gt; @v_SipFromTag = var_SipFromTag,&lt;br /&gt; @v_na = 'n/a',&lt;br /&gt; @v_dbname = var_db_name,&lt;br /&gt; @updatedrows = 0,&lt;br /&gt; @var_tbl_cnt1 = (SELECT COUNT(TABLE_NAME) AS TBLCNT&lt;br /&gt; FROM information_schema.tables&lt;br /&gt; WHERE TABLE_SCHEMA = @v_dbname&lt;br /&gt; AND TABLE_NAME = @var_tbl),&lt;br /&gt; @var_tbl_cnt2 = (SELECT COUNT(TABLE_NAME) AS TBLCNT&lt;br /&gt; FROM information_schema.tables&lt;br /&gt; WHERE TABLE_SCHEMA = @v_dbname&lt;br /&gt; AND TABLE_NAME = @var_tbl_prev_month),&lt;br /&gt; @proc_query = CONCAT("CALL proc_update_raddact_record_mediaproxy (?,?,?,?,?,?,?,?,?,?,?,?,?)");&lt;br /&gt;&lt;br /&gt; PREPARE proc_rad_stmt FROM @proc_query;&lt;br /&gt;&lt;br /&gt; IF @var_tbl_cnt1 = 1 THEN&lt;br /&gt;  -- FOR THE CURRENT MONTH&lt;br /&gt;  EXECUTE proc_rad_stmt USING @var_tbl, @v_AcctSessionTime, &lt;br /&gt;             @v_AcctInputOctets, @v_AcctOutputOctets,&lt;br /&gt;             @v_SipUserAgents, @v_SipCodecs, @v_SipApplicationType,&lt;br /&gt;         @v_MediaInfo, @v_Normalized, @v_AcctSessionId,&lt;br /&gt;         @v_SipToTag, @v_SipFromTag, @v_dbname;&lt;br /&gt; END IF;&lt;br /&gt;&lt;br /&gt; IF @updatedrows = 0 AND @var_tbl_cnt2 = 1 THEN&lt;br /&gt;  -- FOR THE PREVIOUS MONTH&lt;br /&gt;  EXECUTE proc_rad_stmt USING @var_tbl_prev_month, @v_AcctSessionTime,&lt;br /&gt;             @v_AcctInputOctets, @v_AcctOutputOctets,&lt;br /&gt;             @v_SipUserAgents, @v_SipCodecs, @v_SipApplicationType,&lt;br /&gt;  @v_MediaInfo, @v_Normalized, @v_AcctSessionId,&lt;br /&gt;  @v_SipToTag, @v_SipFromTag, @v_dbname;&lt;br /&gt;  &lt;br /&gt;  IF @var_tbl_cnt1 = 1 AND @updatedrows = 0 THEN&lt;br /&gt;   -- FOR THE CURRENT MONTH WITH SipToTag = 'n/a'&lt;br /&gt;   EXECUTE proc_rad_stmt USING @var_tbl, @v_AcctSessionTime,&lt;br /&gt;                 @v_AcctInputOctets, @v_AcctOutputOctets,&lt;br /&gt;                 @v_SipUserAgents, @v_SipCodecs, @v_SipApplicationType,&lt;br /&gt;   @v_MediaInfo, @v_Normalized, @v_AcctSessionId,&lt;br /&gt;   @v_na, @v_SipFromTag, @v_dbname;&lt;br /&gt;   &lt;br /&gt;   IF @var_tbl_cnt2 = 1 AND @updatedrows = 0 THEN&lt;br /&gt;    -- FOR THE PREVIOUS MONTH WITH SipToTag = 'n/a'&lt;br /&gt;    EXECUTE proc_rad_stmt USING @var_tbl_prev_month, @v_AcctSessionTime,&lt;br /&gt;                      @v_AcctInputOctets, @v_AcctOutputOctets,&lt;br /&gt;                      @v_SipUserAgents, @v_SipCodecs, &lt;br /&gt;    @v_SipApplicationType, @v_MediaInfo, @v_Normalized, @v_AcctSessionId,&lt;br /&gt;    @v_na, @v_SipFromTag, @v_dbname;&lt;br /&gt;   END IF;&lt;br /&gt;  END IF;&lt;br /&gt; END IF;&lt;br /&gt; &lt;br /&gt; DEALLOCATE PREPARE proc_rad_stmt;&lt;br /&gt;&lt;br /&gt; -- CLEAN UP&lt;br /&gt;&lt;br /&gt; SET @var_current_month = null,&lt;br /&gt; @var_db_name = null,&lt;br /&gt; @var_tbl_begin = null,&lt;br /&gt; @var_tbl = null,&lt;br /&gt; @var_tbl_cnt = null,&lt;br /&gt; @var_prev_month = null,&lt;br /&gt; @var_tbl_prev_month = null,&lt;br /&gt; @v_AcctSessionTime = null,&lt;br /&gt; @v_AcctInputOctets = null,&lt;br /&gt; @v_AcctOutputOctets = null,&lt;br /&gt; @v_SipUserAgents = null,&lt;br /&gt; @v_SipCodecs = null,&lt;br /&gt; @v_SipApplicationType = null,&lt;br /&gt; @v_MediaInfo = null,&lt;br /&gt; @v_Normalized = null,&lt;br /&gt; @v_AcctSessionId = null,&lt;br /&gt; @v_SipFromTag = null,&lt;br /&gt; @v_SipToTag = null,&lt;br /&gt; @v_na = null,&lt;br /&gt; @v_dbname = null;&lt;br /&gt;&lt;br /&gt;END $$&lt;br /&gt;&lt;br /&gt;DELIMITER ;&lt;br /&gt;&lt;br /&gt;-- CREATE SUPPORT PROCEDURE FOR "update_raddact_record_mediaproxy"&lt;br /&gt;&lt;br /&gt;DROP PROCEDURE IF EXISTS `proc_update_raddact_record_mediaproxy`;&lt;br /&gt;&lt;br /&gt;DELIMITER $$&lt;br /&gt;&lt;br /&gt;CREATE PROCEDURE `proc_update_raddact_record_mediaproxy`(&lt;br /&gt; IN var_tblname VARCHAR(50),&lt;br /&gt; IN var_AcctSessionTime int(12),&lt;br /&gt; IN var_AcctInputOctets bigint(12),&lt;br /&gt; IN var_AcctOutputOctets bigint(12),&lt;br /&gt; IN var_SipUserAgents VARCHAR(255),&lt;br /&gt; IN var_SipCodecs VARCHAR(255),&lt;br /&gt; IN var_SipApplicationType VARCHAR(255),&lt;br /&gt; IN var_MediaInfo VARCHAR(32),&lt;br /&gt; IN var_Normalized ENUM('0','1'),&lt;br /&gt; IN var_AcctSessionId VARCHAR(255),&lt;br /&gt; IN var_SipToTag VARCHAR(128),&lt;br /&gt; IN var_SipFromTag VARCHAR(128),&lt;br /&gt; IN var_dbname VARCHAR(20)&lt;br /&gt;)&lt;br /&gt;BEGIN&lt;br /&gt;&lt;br /&gt; -- TABLENAME VARIABLE&lt;br /&gt; SET @var_tbl = var_tblname,&lt;br /&gt; @var_db_name = var_dbname,&lt;br /&gt; @var_tbl_cnt = (SELECT COUNT(TABLE_NAME) AS TBLCNT&lt;br /&gt; FROM information_schema.tables&lt;br /&gt; WHERE TABLE_SCHEMA = @var_db_name&lt;br /&gt; AND TABLE_NAME = @var_tbl);&lt;br /&gt;&lt;br /&gt; IF @var_tbl_cnt = 0 THEN&lt;br /&gt;  -- TABLE DOESN'T EVEN EXISTS, SO RETURN 0&lt;br /&gt;  SET @rcnt = (SELECT 0);&lt;br /&gt; ELSE&lt;br /&gt;&lt;br /&gt;  SET @radupdstmt = CONCAT("UPDATE ", @var_tbl, " SET&lt;br /&gt;   AcctSessionTime = AcctSessionTime + IF(ConnectInfo_stop IS NULL, ?, 0),&lt;br /&gt;   AcctStopTime = DATE_ADD(AcctStartTime, INTERVAL AcctSessionTime SECOND),&lt;br /&gt;   AcctInputOctets = AcctInputOctets + ?,&lt;br /&gt;   AcctOutputOctets = AcctOutputOctets + ?,&lt;br /&gt;   SipUserAgents = ?,&lt;br /&gt;   SipCodecs = ?,&lt;br /&gt;   SipApplicationType = ?,&lt;br /&gt;   MediaInfo = ?,&lt;br /&gt;   Normalized = ?&lt;br /&gt;   WHERE&lt;br /&gt;   AcctSessionId = ?&lt;br /&gt;   AND SipToTag = ? AND SipFromTag = ?;");&lt;br /&gt;   PREPARE update_rad FROM @radupdstmt;&lt;br /&gt;&lt;br /&gt;  SET @v_AcctSessionTime = var_AcctSessionTime,&lt;br /&gt;  @v_AcctInputOctets = var_AcctInputOctets,&lt;br /&gt;  @v_AcctOutputOctets = var_AcctOutputOctets,&lt;br /&gt;  @v_SipUserAgents = var_SipUserAgents,&lt;br /&gt;  @v_SipCodecs = var_SipCodecs,&lt;br /&gt;  @v_SipApplicationType = var_SipApplicationType,&lt;br /&gt;  @v_MediaInfo = var_MediaInfo,&lt;br /&gt;  @v_Normalized = var_Normalized,&lt;br /&gt;  @v_AcctSessionId = var_AcctSessionId,&lt;br /&gt;  @v_SipToTag = var_SipToTag,&lt;br /&gt;  @v_SipFromTag = var_SipFromTag;&lt;br /&gt;&lt;br /&gt;  EXECUTE update_rad USING @v_AcctSessionTime, @v_AcctInputOctets, @v_AcctOutputOctets,&lt;br /&gt;   @v_SipUserAgents, @v_SipCodecs, @v_SipApplicationType,&lt;br /&gt;   @v_MediaInfo, @v_Normalized, @v_AcctSessionId, @v_SipToTag, @v_SipFromTag;&lt;br /&gt;  SET @rcnt = (SELECT ROW_COUNT());&lt;br /&gt;  DEALLOCATE PREPARE update_rad;&lt;br /&gt;&lt;br /&gt; END IF;&lt;br /&gt;&lt;br /&gt;END $$&lt;br /&gt;&lt;br /&gt;DELIMITER ;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;/*&lt;br /&gt;&lt;br /&gt;-- TEST PROCEDURE THAT INSERTS A RECORD&lt;br /&gt;CALL insert_radacct_record (&lt;br /&gt;'radius','3c3b5ff12bf2-m5udeydrjsuw@snom320-000413241247', '5af53194787eccf1',&lt;br /&gt;'adi@umts.ro', 'adi@umts.ro', '83.149.75.105', '5060', '2006-12-10 12:09:19', &lt;br /&gt;'0', '0', '0', '0', 'sip:3333@umts.ro=3Buser=3Dphone',&lt;br /&gt;'sip:adi@umts.ro', '200', 'Sip-Session', '', '', '0', '0', '200', 'Invite',&lt;br /&gt;'sip:3333@vm01.dns-hosting.info=3Buser=3Dphone', 'as5664a60b', '27qems1o2j',&lt;br /&gt;'208005169', '81.23.228.147', '5060',&lt;br /&gt;'sip:3333@vm01.dns-hosting.info=3Buser=3Dphone', '', ''&lt;br /&gt;);&lt;br /&gt;&lt;br /&gt;-- TEST PROCEDURE THAT UPATES A RECORD WITH MEDIAPROXY INFORMATION&lt;br /&gt;CALL update_raddact_record_mediaproxy (&lt;br /&gt;'radius','3','5896','7140','snom320/5.2 + Asterisk', 'GSM', 'Audio', '', '0',&lt;br /&gt;'3c3b5ff12bf2-m5udeydrjsuw@snom320-000413241247', 'as5664a60b','27qems1o2j'&lt;br /&gt;);&lt;br /&gt;&lt;br /&gt;-- TEST PROCEDURE THAT UPATES A RECORD&lt;br /&gt;CALL update_radacct_record (&lt;br /&gt;'radius','2006-12-10 12:09:21', '0', '', 'n/a', &lt;br /&gt;'3c3b5ff12bf2-m5udeydrjsuw@snom320-000413241247', 'as5664a60b', '27qems1o2j'&lt;br /&gt;);&lt;br /&gt;&lt;br /&gt;*/&lt;div class="blogger-post-footer"&gt;akdayal@yahoo.com&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1818419888217740295-3057990064467318404?l=ananddayal.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ananddayal.blogspot.com/feeds/3057990064467318404/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1818419888217740295&amp;postID=3057990064467318404' title='10 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1818419888217740295/posts/default/3057990064467318404'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1818419888217740295/posts/default/3057990064467318404'/><link rel='alternate' type='text/html' href='http://ananddayal.blogspot.com/2007/02/cdrtool-installation.html' title='CDRTool installation (MYSQL)'/><author><name>Anand Kumar Dayal</name><uri>http://www.blogger.com/profile/15821949256334333875</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://bp2.blogger.com/_X_AIQvaR6X4/SJGDCYgSLAI/AAAAAAAADcI/tod2zTuEQCw/S220/PIC-AD-257(2).jpg'/></author><thr:total>10</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1818419888217740295.post-9011875722434419960</id><published>2007-01-20T08:42:00.000-08:00</published><updated>2007-01-20T08:43:32.443-08:00</updated><title type='text'>Meetme by AGI</title><content type='html'>the script below (meetme.agi) will prompt for a valid pin up to 3 times. If the pin matches one of the defined Admin pins, it will set the dialplan priority to 10 and exit, if User, sets to 20 and exits. Otherwise Hangs up.&lt;br /&gt;&lt;br /&gt;In the case of admin, these MeetMe options are used:&lt;br /&gt;a - Admin mode&lt;br /&gt;A - Marked mode&lt;br /&gt;c - Announce number of participants (optional of course)&lt;br /&gt;s - Present Admin menu by pressing '*'&lt;br /&gt;x - close conf when last marked user leaves.&lt;br /&gt;&lt;br /&gt;In the case of user:&lt;br /&gt;c s x are used as above, but we add:&lt;br /&gt;w - wait until marked user enters. (Plays MoH until then)&lt;br /&gt;&lt;br /&gt;The dialplan assumes you have a static pinless conference setup as conf #10.&lt;br /&gt;&lt;br /&gt;extensions.conf:&lt;br /&gt;exten =&gt; 5552323,1,Wait(1)&lt;br /&gt;exten =&gt; 5552323,2,Answer()&lt;br /&gt;exten =&gt; 5552323,3,AGI(meetme.agi)&lt;br /&gt;exten =&gt; 5552323,4,NoOp(Invalid Pin)&lt;br /&gt;exten =&gt; 5552323,5,Hangup()&lt;br /&gt;&lt;br /&gt;exten =&gt; 5552323,10,NoOp(Admin Pin)&lt;br /&gt;exten =&gt; 5552323,11,MeetMe(10,aAcsx)&lt;br /&gt;exten =&gt; 5552323,12,Hangup()&lt;br /&gt;&lt;br /&gt;exten =&gt; 5552323,20,NoOp(User Pin)&lt;br /&gt;exten =&gt; 5552323,21,MeetMe(10,cswx)&lt;br /&gt;exten =&gt; 5552323,22,Hangup()&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;The script of course requires the Asterisk::AGI module.&lt;br /&gt;&lt;br /&gt;meetme.agi:&lt;br /&gt;&lt;br /&gt;#!/usr/bin/perl&lt;br /&gt;use Asterisk::AGI;&lt;br /&gt;my $AGI = new Asterisk::AGI;&lt;br /&gt;my $input = { %{$AGI-&gt;ReadParse()} };&lt;br /&gt;&lt;br /&gt;#our $DEBUG = 1; &lt;br /&gt;&lt;br /&gt;my @UserPins = ('11111','22222');&lt;br /&gt;my @AdminPins = ('99999','88888');&lt;br /&gt;&lt;br /&gt;my $mode = collectPin($AGI,5);&lt;br /&gt;&lt;br /&gt;$AGI-&gt;verbose("collectPin got '$mode'") if $DEBUG;&lt;br /&gt;&lt;br /&gt;if ($mode eq 'Admin') {&lt;br /&gt;   $AGI-&gt;set_priority(10);&lt;br /&gt;} elsif ($mode eq 'User') {&lt;br /&gt;   $AGI-&gt;set_priority(20);&lt;br /&gt;} else {&lt;br /&gt;   $AGI-&gt;stream_file("goodbye",'""');&lt;br /&gt;   $AGI-&gt;hangup;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;exit;&lt;br /&gt;&lt;br /&gt;sub collectPin {&lt;br /&gt;   my $AGI = shift;&lt;br /&gt;   my $maxdigits = shift;&lt;br /&gt;&lt;br /&gt;   my $tries = 0;&lt;br /&gt;&lt;br /&gt;   #Three tries to select an existing pin.&lt;br /&gt;   while ($tries &lt; 3) {&lt;br /&gt;      $AGI-&gt;stream_file("please-try-again",'""') if $tries &gt; 0;&lt;br /&gt;      $tries++;&lt;br /&gt;      my $pin = $AGI-&gt;get_data('enter-conf-pin-number', "10000", $maxdigits);&lt;br /&gt;      $AGI-&gt;verbose("Got PIN $pin.") if $DEBUG;&lt;br /&gt;      next unless $pin &gt; 0;&lt;br /&gt;&lt;br /&gt;      if ( grep(/^$pin$/, @AdminPins) ) {&lt;br /&gt;         $AGI-&gt;stream_file("pin-number-accepted",'""');&lt;br /&gt;         return 'Admin';&lt;br /&gt;      } elsif ( grep(/^$pin$/, @UserPins) ) {&lt;br /&gt;         $AGI-&gt;stream_file("pin-number-accepted",'""');&lt;br /&gt;         return 'User';&lt;br /&gt;      } else {&lt;br /&gt;         $AGI-&gt;stream_file("conf-invalidpin",'""');&lt;br /&gt;      }&lt;br /&gt;   }&lt;br /&gt;&lt;br /&gt;   return undef;&lt;br /&gt;}&lt;div class="blogger-post-footer"&gt;akdayal@yahoo.com&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1818419888217740295-9011875722434419960?l=ananddayal.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ananddayal.blogspot.com/feeds/9011875722434419960/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1818419888217740295&amp;postID=9011875722434419960' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1818419888217740295/posts/default/9011875722434419960'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1818419888217740295/posts/default/9011875722434419960'/><link rel='alternate' type='text/html' href='http://ananddayal.blogspot.com/2007/01/meetme-by-agi.html' title='Meetme by AGI'/><author><name>Anand Kumar Dayal</name><uri>http://www.blogger.com/profile/15821949256334333875</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://bp2.blogger.com/_X_AIQvaR6X4/SJGDCYgSLAI/AAAAAAAADcI/tod2zTuEQCw/S220/PIC-AD-257(2).jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1818419888217740295.post-2888491968673943414</id><published>2007-01-14T21:38:00.000-08:00</published><updated>2007-01-14T21:55:15.941-08:00</updated><title type='text'>Mediaproxy with Accounting setup</title><content type='html'>&lt;span style="color: rgb(255, 255, 255);font-family:arial;font-size:85%;"  &gt;There is a new MediaProxy release available.&lt;br /&gt;&lt;br /&gt;To upgrade go to &lt;a rel="nofollow" href="http://mediaproxy.ag-projects.com/"&gt;http://mediaproxy.ag-projects.com&lt;/a&gt; or download the software directly from: &lt;a rel="nofollow" href="http://mediaproxy.ag-projects.com/mediaproxy-1.8.0.tar.gz"&gt;http://mediaproxy.ag-projects.com/mediaproxy-1.8.0.tar.gz&lt;/a&gt;&lt;br /&gt;&lt;/span&gt;&lt;pre  style="margin: 0em; color: rgb(255, 255, 255);font-family:arial;"&gt;&lt;span style="font-size:85%;"&gt;&lt;br /&gt;Changes from version 1.7.2 to 1.8.0&lt;br /&gt;-----------------------------------&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;/pre&gt;&lt;span style="color: rgb(255, 255, 255);font-family:arial;font-size:85%;"  &gt;Added support for radius accounting. The accounting type can be specified in the configuration file. To support radius accounting the pyrad module must be installed  (available at &lt;a rel="nofollow" href="http://www.wiggy.net/code/pyrad/"&gt;http://www.wiggy.net/code/pyrad/&lt;/a&gt;). The old boolead switch dbaccounting in the [Accounting] section of mediaproxy.ini was replaced by accounting which is a string&lt;br /&gt;specifying the accounting type to be used: none, radius or database.&lt;br /&gt;&lt;/span&gt;&lt;pre  style="margin: 0em; color: rgb(255, 255, 255);font-family:arial;"&gt;&lt;span style="font-size:85%;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/pre&gt;&lt;span style="color: rgb(255, 255, 255);font-family:arial;font-size:85%;"  &gt;For those using CDRTool, release 5.0 is available, which works with the new Radius accounting of MediaProxy 1.8.0. To upgrade go to &lt;a rel="nofollow" href="http://cdrtool.ag-projects.com/"&gt;http://cdrtool.ag-projects.com/&lt;/a&gt; or download the software directly from: &lt;a rel="nofollow" href="http://download.dns-hosting.info/CDRTool/cdrtool_5.0.tar.gz"&gt;http://download.dns-hosting.info/CDRTool/cdrtool_5.0.tar.gz&lt;/a&gt;&lt;br /&gt;&lt;/span&gt;&lt;pre style="margin: 0em;"&gt;&lt;span style="color: rgb(255, 255, 255);font-family:arial;font-size:85%;"  &gt;&lt;br /&gt;Thanks&lt;br /&gt;Anand Kumar&lt;/span&gt;&lt;br /&gt;&lt;/pre&gt;&lt;div class="blogger-post-footer"&gt;akdayal@yahoo.com&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1818419888217740295-2888491968673943414?l=ananddayal.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ananddayal.blogspot.com/feeds/2888491968673943414/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1818419888217740295&amp;postID=2888491968673943414' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1818419888217740295/posts/default/2888491968673943414'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1818419888217740295/posts/default/2888491968673943414'/><link rel='alternate' type='text/html' href='http://ananddayal.blogspot.com/2007/01/mediaproxy-with-account.html' title='Mediaproxy with Accounting setup'/><author><name>Anand Kumar Dayal</name><uri>http://www.blogger.com/profile/15821949256334333875</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://bp2.blogger.com/_X_AIQvaR6X4/SJGDCYgSLAI/AAAAAAAADcI/tod2zTuEQCw/S220/PIC-AD-257(2).jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1818419888217740295.post-5657217402631141060</id><published>2007-01-08T22:15:00.000-08:00</published><updated>2007-01-08T22:16:00.936-08:00</updated><title type='text'>ASTERISK FAQ</title><content type='html'>&lt;b&gt;Whats AGI?&lt;/b&gt;&lt;br /&gt;AGI stands for Asterisk Gateway Interface.  AGI allows Asterisk to launch external programs written in any language to control a telephony channel, play audio, read DTMF digits, etc. by communicating with the AGI protcol on stdin ad stdout.&lt;div class="blogger-post-footer"&gt;akdayal@yahoo.com&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1818419888217740295-5657217402631141060?l=ananddayal.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ananddayal.blogspot.com/feeds/5657217402631141060/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1818419888217740295&amp;postID=5657217402631141060' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1818419888217740295/posts/default/5657217402631141060'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1818419888217740295/posts/default/5657217402631141060'/><link rel='alternate' type='text/html' href='http://ananddayal.blogspot.com/2007/01/asterisk-faq.html' title='ASTERISK FAQ'/><author><name>Anand Kumar Dayal</name><uri>http://www.blogger.com/profile/15821949256334333875</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://bp2.blogger.com/_X_AIQvaR6X4/SJGDCYgSLAI/AAAAAAAADcI/tod2zTuEQCw/S220/PIC-AD-257(2).jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1818419888217740295.post-8750905481385886314</id><published>2007-01-08T00:40:00.000-08:00</published><updated>2007-01-08T00:54:07.375-08:00</updated><title type='text'>N-Way Calling or Three Way Calling by asterisk</title><content type='html'>&lt;h2&gt;&lt;span style="font-family: arial;"&gt;How this works&lt;/span&gt; &lt;/h2&gt;When You speak with other party, press *0 (macro nway-start is executed). Called party is immediately transferred to free conference, and You get dialtone to enter number of party You want to invite. After call established and You talk to third user, You can press ** to invite him to conference and *# to hangup call and return to conference. From conference any user can invite anyone else by pressing 0 (all other steps are same as for *0)&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;&lt;br /&gt;Here is dialplan example: &lt;/span&gt;&lt;br /&gt;[default]&lt;br /&gt;exten =&gt; _XXX,1,Set(DYNAMIC_FEATURES=nway-start)&lt;br /&gt;exten =&gt; _XXX,n,Dial(SIP/${EXTEN})&lt;br /&gt;&lt;br /&gt;[dynamic-nway]&lt;br /&gt;exten =&gt; _XXX,1,Answer&lt;br /&gt;exten =&gt; _XXX,n,Set(CONFNO=${EXTEN})&lt;br /&gt;exten =&gt; _XXX,n,Set(MEETME_EXIT_CONTEXT=dynamic-nway-invite)&lt;br /&gt;exten =&gt; _XXX,n,Set(DYNAMIC_FEATURES=)&lt;br /&gt;exten =&gt; _XXX,n,MeetMe(${CONFNO},pdMX)&lt;br /&gt;exten =&gt; _XXX,n,Hangup&lt;br /&gt;&lt;br /&gt;[dynamic-nway-invite]&lt;br /&gt;exten =&gt; 0,1,Read(DEST,dial,,i)&lt;br /&gt;exten =&gt; 0,n,Set(DYNAMIC_FEATURES=nway-inv#nway-noinv)&lt;br /&gt;exten =&gt; 0,n,Dial(Local/${DEST}@dynamic-nway-dest,,g)&lt;br /&gt;exten =&gt; 0,n,Set(DYNAMIC_FEATURES=)&lt;br /&gt;exten =&gt; 0,n,Goto(dynamic-nway,${CONFNO},1)&lt;br /&gt;exten =&gt; i,1,Goto(dynamic-nway,${CONFNO},1)&lt;br /&gt;&lt;br /&gt;[dynamic-nway-dest]&lt;br /&gt;exten =&gt; _XXX,1,Dial(SIP/${EXTEN})&lt;br /&gt;&lt;br /&gt;[macro-nway-start]&lt;br /&gt;exten =&gt; s,1,Set(CONFNO=${FindFreeConf()})&lt;br /&gt;exten =&gt; s,n,ChannelRedirect(${BRIDGEPEER},dynamic-nway,${CONFNO},1)&lt;br /&gt;exten =&gt; s,n,Read(DEST,dial,,i)&lt;br /&gt;exten =&gt; s,n,Set(DYNAMIC_FEATURES=nway-inv#nway-noinv)&lt;br /&gt;exten =&gt; s,n,Dial(Local/${DEST}@dynamic-nway-dest,,g)&lt;br /&gt;exten =&gt; s,n,Set(DYNAMIC_FEATURES=)&lt;br /&gt;exten =&gt; s,n,Goto(dynamic-nway,${CONFNO},1)&lt;br /&gt;&lt;br /&gt;[macro-nway-ok]&lt;br /&gt;exten =&gt; s,1,ChannelRedirect(${BRIDGEPEER},dynamic-nway,${CONFNO},1)&lt;br /&gt;&lt;br /&gt;[macro-nway-notok]&lt;br /&gt;exten =&gt; s,1,SoftHangup(${BRIDGEPEER})&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 204, 204);"&gt;Note, You need to provide FindFreeConf() function (or any other way) to get free Conference number. &lt;/span&gt;&lt;br /&gt; &lt;br /&gt;&lt;span style="color: rgb(51, 51, 51);"&gt;&lt;span style="color: rgb(255, 204, 204);"&gt;And, to make all this work, here is features.conf:&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;[applicationmap]&lt;br /&gt;nway-start =&gt; *0,caller,Macro,nway-start&lt;br /&gt;nway-inv =&gt; **,caller,Macro,nway-ok&lt;br /&gt;nway-noinv =&gt; *#,caller,Macro,nway-notok&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 51);"&gt;&lt;span style="color: rgb(255, 204, 204);"&gt;&lt;/span&gt;&lt;br /&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;akdayal@yahoo.com&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1818419888217740295-8750905481385886314?l=ananddayal.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ananddayal.blogspot.com/feeds/8750905481385886314/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1818419888217740295&amp;postID=8750905481385886314' title='44 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1818419888217740295/posts/default/8750905481385886314'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1818419888217740295/posts/default/8750905481385886314'/><link rel='alternate' type='text/html' href='http://ananddayal.blogspot.com/2007/01/n-way-calling-or-three-way-calling-by.html' title='N-Way Calling or Three Way Calling by asterisk'/><author><name>Anand Kumar Dayal</name><uri>http://www.blogger.com/profile/15821949256334333875</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://bp2.blogger.com/_X_AIQvaR6X4/SJGDCYgSLAI/AAAAAAAADcI/tod2zTuEQCw/S220/PIC-AD-257(2).jpg'/></author><thr:total>44</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1818419888217740295.post-8997391572156775701</id><published>2007-01-07T23:58:00.001-08:00</published><updated>2007-01-08T00:04:09.258-08:00</updated><title type='text'>Follow-Me using Asterisk</title><content type='html'>follow me script to allow Asterisk to ring from your desk phone to a cell phone then back to voicemail. If you are not available to answer the cell phone (or choose not to) it will ring back to Asterisk voicemail.&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;exten =&gt; 1234,1,dial(sip/1234,20)&lt;br /&gt;exten =&gt; 1234,2,playback(pls-wait-connect-call)&lt;br /&gt;exten =&gt; 1234,3,Setvar(NewCaller=${CALLERIDNUM})&lt;br /&gt;exten =&gt; 1234,4,SetCIDNum(0${CALLERIDNUM})&lt;br /&gt;exten =&gt; 1234,5,dial(${TRUNK}c/9871234321,20,r)&lt;br /&gt;exten =&gt; 1234,6,SetCIDNum(${NewCaller})&lt;br /&gt;exten =&gt; 1234,7,voicemail2(u1234@default)&lt;br /&gt;exten =&gt; 1234,101,voicemail2(b1234@default)&lt;br /&gt;exten =&gt; 1234,102,hangup &lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(51, 51, 255);"&gt;Explanations: &lt;/span&gt;&lt;br /&gt;exten =&gt; 1234,1,dial(sip/1234,20)&lt;br /&gt;&lt;br /&gt;   * Present the caller with a transfer message to let them know that the system is doing something.&lt;br /&gt;&lt;br /&gt;exten =&gt; 1234,2,playback(pls-wait-connect-call)&lt;br /&gt;&lt;br /&gt;   * Set a new variable with the current caller id information&lt;br /&gt;&lt;br /&gt;exten =&gt; 1234,3,Setvar(NewCaller=${CALLERIDNUM})&lt;br /&gt;&lt;br /&gt;   * Place a 0 before the caller id number to let the called party know that this is coming as a transfer from the desk phone.&lt;br /&gt;&lt;br /&gt;exten =&gt; 1234,4,SetCIDNum(0${CALLERIDNUM})&lt;br /&gt;&lt;br /&gt;   * Dial the cell phone 987-123-4321. Display a ring to the caller until # is pressed on the cell phone.&lt;br /&gt;&lt;br /&gt;exten =&gt; 1234,5,dial(${TRUNK}c/9871234321,20,r)&lt;br /&gt;&lt;br /&gt;   * If the called party chooses to not accept the call change the callerid information back.&lt;br /&gt;&lt;br /&gt;exten =&gt; 1234,6,SetCIDNum(${NewCaller})&lt;br /&gt;&lt;br /&gt;   * Place the caller into voicemail.&lt;br /&gt;&lt;br /&gt;exten =&gt; 1234,7,voicemail2(u1245@default)&lt;br /&gt;&lt;br /&gt;   * If the called party is on the phone just go to voicemail (this may be out of step??).&lt;br /&gt;&lt;br /&gt;exten =&gt; 1234,101,voicemail2(b1234@default)&lt;br /&gt;&lt;br /&gt;exten =&gt; 1234,102,hangup&lt;br /&gt;&lt;br /&gt;&lt;ol&gt;&lt;li&gt;    The c after the TRUNK command is what causes the connection to wait until the # key is pressed to complete the call.&lt;/li&gt;&lt;li&gt;You can use something other than ,r which causes the caller to hear ringing while the call is being placed to the cell phone. Using ,m as an option will play music on hold until someone answers. &lt;/li&gt;&lt;/ol&gt;&lt;div class="blogger-post-footer"&gt;akdayal@yahoo.com&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1818419888217740295-8997391572156775701?l=ananddayal.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ananddayal.blogspot.com/feeds/8997391572156775701/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1818419888217740295&amp;postID=8997391572156775701' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1818419888217740295/posts/default/8997391572156775701'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1818419888217740295/posts/default/8997391572156775701'/><link rel='alternate' type='text/html' href='http://ananddayal.blogspot.com/2007/01/follow-me-using-asterisk_07.html' title='Follow-Me using Asterisk'/><author><name>Anand Kumar Dayal</name><uri>http://www.blogger.com/profile/15821949256334333875</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://bp2.blogger.com/_X_AIQvaR6X4/SJGDCYgSLAI/AAAAAAAADcI/tod2zTuEQCw/S220/PIC-AD-257(2).jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1818419888217740295.post-2142459229973292232</id><published>2007-01-05T21:37:00.000-08:00</published><updated>2007-01-05T21:38:33.893-08:00</updated><title type='text'>VoIP Codecs</title><content type='html'>Coders/decoders (Codecs) are used by VoIP networks for converting analog voice signals into digital pulses and then reconvert the digital pulses into analog signals. In order to communicate, the codecs have to be compatible with each other. The algorithms that the codecs use for conversion of the data streams affect the quality of voice as well as the bandwidth consumption.&lt;br /&gt;&lt;br /&gt;The solutions to algorithm usage are either proprietary or covered by international standards, where everyone has access to the algorithms. Pulse Code Modulation (PCM) was responsible for the development of the T-carrier systems that are used even today. PCM could yield a data rate of 64 Kbps. The signal was sampled in two ways, Mu-Law in the US and Japan and A-Law in Europe. Both these forms of sampling allowed for a high resolution as the discrete levels were apportioned logarithmically and not linearly.&lt;br /&gt;&lt;br /&gt;Recommendation G.711 has been instituted by the ITU in 1988 and is the standardized form of the PCM encoding. PCM does not eliminate the redundancy in the signals, which can result in a high data output rate unsuitable for certain situations, especially when there is a bandwidth constraint. This is the reason why several speech algorithms have attempted to reduce the data rate. Reduction in data rate by half can double the call-carrying capacity of the given bandwidth. G.722.1, G.723.1, G.726, etc are codec standards that reduce the bandwidth requirements. Their data rates are 24/32, 5.3/6.3, 16/24/32/40 Kbps, respectively.&lt;br /&gt;&lt;br /&gt;Apart from these open standards, there are proprietary algorithms that may or may not offer an advantage over the ITU-defined algorithms. However, they can tie a business to their implementation for the economic life-cycle of the VoIP system.&lt;div class="blogger-post-footer"&gt;akdayal@yahoo.com&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1818419888217740295-2142459229973292232?l=ananddayal.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ananddayal.blogspot.com/feeds/2142459229973292232/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1818419888217740295&amp;postID=2142459229973292232' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1818419888217740295/posts/default/2142459229973292232'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1818419888217740295/posts/default/2142459229973292232'/><link rel='alternate' type='text/html' href='http://ananddayal.blogspot.com/2007/01/voip-codecs.html' title='VoIP Codecs'/><author><name>Anand Kumar Dayal</name><uri>http://www.blogger.com/profile/15821949256334333875</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://bp2.blogger.com/_X_AIQvaR6X4/SJGDCYgSLAI/AAAAAAAADcI/tod2zTuEQCw/S220/PIC-AD-257(2).jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1818419888217740295.post-452985699986488506</id><published>2007-01-04T20:37:00.000-08:00</published><updated>2007-01-04T21:05:18.390-08:00</updated><title type='text'>Asterisk Realtime with MySQL.</title><content type='html'>This is a How-to for the beginners to work Realtime Asterisk with MySQL.&lt;br /&gt;&lt;br /&gt;Getting Asterisk-addons.&lt;br /&gt;-----------------------------------------&lt;br /&gt;1. Download asterisk-addons tar  from the asterisk.org site (ftp://ftp1.digium.com/pub/asterisk/releases/asterisk-addons-1.2.3.tar.gz).&lt;br /&gt;2. Untar it under /usr/src&lt;br /&gt;3. cd /usr/src/asterisk-addons&lt;br /&gt;4. make clean&lt;br /&gt;5. make install&lt;br /&gt;6. This installs the module for mysql, "res_config_mysql.so" into your asterisk modules dir.&lt;br /&gt;7. Copy "res_mysql.conf.sample" from "/usr/src/asterisk-addons/configs" and place it under "/etc/asterisk/"&lt;br /&gt;8. Rename "res_mysql.conf.sample" it to "res_mysql.conf"&lt;br /&gt;&lt;br /&gt;Creating database in MySQL.&lt;br /&gt;----------------------------------------&lt;br /&gt;I have created a database by name "test" with two tables "sip_buddies" and "extensions"&lt;br /&gt;&lt;br /&gt;Create table "sip_buddies" using:&lt;br /&gt;-----------------------------------------&lt;br /&gt;CREATE TABLE `sip_buddies` (&lt;br /&gt;`id` int(11) NOT NULL auto_increment,&lt;br /&gt;`name` varchar(80) NOT NULL default '',&lt;br /&gt;`accountcode` varchar(20) default NULL,&lt;br /&gt;`amaflags` varchar(13) default NULL,&lt;br /&gt;`callgroup` varchar(10) default NULL,&lt;br /&gt;`callerid` varchar(80) default NULL,&lt;br /&gt;`canreinvite` char(3) default 'yes',&lt;br /&gt;`context` varchar(80) default NULL,&lt;br /&gt;`defaultip` varchar(15) default NULL,&lt;br /&gt;`dtmfmode` varchar(7) default NULL,&lt;br /&gt;`fromuser` varchar(80) default NULL,&lt;br /&gt;`fromdomain` varchar(80) default NULL,&lt;br /&gt;`fullcontact` varchar(80) default NULL,&lt;br /&gt;`host` varchar(31) NOT NULL default '',&lt;br /&gt;`insecure` varchar(4) default NULL,&lt;br /&gt;`language` char(2) default NULL,&lt;br /&gt;`mailbox` varchar(50) default NULL,&lt;br /&gt;`md5secret` varchar(80) default NULL,&lt;br /&gt;`nat` varchar(5) NOT NULL default 'no',&lt;br /&gt;`deny` varchar(95) default NULL,&lt;br /&gt;`permit` varchar(95) default NULL,&lt;br /&gt;`mask` varchar(95) default NULL,&lt;br /&gt;`pickupgroup` varchar(10) default NULL,&lt;br /&gt;`port` varchar(5) NOT NULL default '',&lt;br /&gt;`qualify` char(3) default NULL,&lt;br /&gt;`restrictcid` char(1) default NULL,&lt;br /&gt;`rtptimeout` char(3) default NULL,&lt;br /&gt;`rtpholdtimeout` char(3) default NULL,&lt;br /&gt;`secret` varchar(80) default NULL,&lt;br /&gt;`type` varchar(6) NOT NULL default 'friend',&lt;br /&gt;`username` varchar(80) NOT NULL default '',&lt;br /&gt;`disallow` varchar(100) default 'all',&lt;br /&gt;`allow` varchar(100) default 'g729;ilbc;gsm;ulaw;alaw',&lt;br /&gt;`musiconhold` varchar(100) default NULL,&lt;br /&gt;`regseconds` int(11) NOT NULL default '0',&lt;br /&gt;`ipaddr` varchar(15) NOT NULL default '',&lt;br /&gt;`regexten` varchar(80) NOT NULL default '',&lt;br /&gt;`cancallforward` char(3) default 'yes',&lt;br /&gt;`setvar` varchar(100) NOT NULL default '',&lt;br /&gt;PRIMARY KEY (`id`),&lt;br /&gt;UNIQUE KEY `name` (`name`),&lt;br /&gt;KEY `name_2` (`name`)&lt;br /&gt;) TYPE=MyISAM ROW_FORMAT=DYNAMIC;&lt;br /&gt;&lt;br /&gt;Create table "extensions" using:&lt;br /&gt;---------------------------------------&lt;br /&gt;CREATE TABLE `extensions` (&lt;br /&gt;`id` int(11) NOT NULL auto_increment,&lt;br /&gt;`context` varchar(20) NOT NULL default '',&lt;br /&gt;`exten` varchar(20) NOT NULL default '',&lt;br /&gt;`priority` tinyint(4) NOT NULL default '0',&lt;br /&gt;`app` varchar(20) NOT NULL default '',&lt;br /&gt;`appdata` varchar(128) NOT NULL default '',&lt;br /&gt;PRIMARY KEY (`context`,`exten`,`priority`),&lt;br /&gt;KEY `id` (`id`)&lt;br /&gt;) TYPE=MyISAM;&lt;br /&gt;&lt;br /&gt;Add some data into them, no need to enter all the details in sip_buddies, add only the necessary fields.&lt;br /&gt;&lt;br /&gt;I have added a context like&lt;br /&gt;&lt;br /&gt;name = 102&lt;br /&gt;canreinvite = no&lt;br /&gt;context = default&lt;br /&gt;dtmfmode = rfc2833&lt;br /&gt;host = dynamic&lt;br /&gt;port= yes&lt;br /&gt;type = friend&lt;br /&gt;username = 102&lt;br /&gt;secret = 102&lt;br /&gt;&lt;br /&gt;(if u r getting error in uploadin data, change the field type from NOT NULL to NULL)&lt;br /&gt;&lt;br /&gt;Add some data into extensions table also.&lt;br /&gt;&lt;br /&gt;500 default VoiceMailMain&lt;br /&gt;123 default Playback welcome&lt;br /&gt;&lt;br /&gt;Configuration in res_mysql.conf.&lt;br /&gt;-------------------------------------------&lt;br /&gt;[general]&lt;br /&gt;dbhost = localhost&lt;br /&gt;dbname = test&lt;br /&gt;dbuser = username&lt;br /&gt;dbpass = password&lt;br /&gt;dbport = 3306&lt;br /&gt;dbsock = /tmp/mysql.sock&lt;br /&gt;&lt;br /&gt;(check the mysql.sock path, it could be /var/lib/mysql/mysql.sock)&lt;br /&gt;&lt;br /&gt;Configuration in extconfig.conf.&lt;br /&gt;--------------------------------------------&lt;br /&gt;sipusers =&gt; mysql,test,sip_buddies&lt;br /&gt;sippeers =&gt; mysql,test,sip_buddies&lt;br /&gt;extensions =&gt; mysql,test,extensions&lt;br /&gt;&lt;br /&gt;Configuration in sip.conf.&lt;br /&gt;--------------------------------------------&lt;br /&gt;[general]&lt;br /&gt;&lt;br /&gt;rtcachefriends=yes&lt;br /&gt;&lt;br /&gt;Configuration in extensions.conf.&lt;br /&gt;--------------------------------------------&lt;br /&gt;[default]&lt;br /&gt;&lt;br /&gt;switch =&gt; Realtime/default@extensions&lt;br /&gt;&lt;br /&gt;Start the asterisk,&lt;br /&gt;--------------------------------------------&lt;br /&gt;In the CLI mode,&lt;br /&gt;--------------------------------------------&lt;br /&gt;CLI&gt; realtime mysql status&lt;br /&gt;&lt;br /&gt;This shows the status of your mysql connection, like&lt;br /&gt;&lt;br /&gt;"Connected to test@localhost, port 3306 with username root for 46 minutes, 30 seconds"&lt;br /&gt;&lt;br /&gt;Anand Kumar Dayal&lt;br /&gt;akdayal@yahoo.com&lt;div class="blogger-post-footer"&gt;akdayal@yahoo.com&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1818419888217740295-452985699986488506?l=ananddayal.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ananddayal.blogspot.com/feeds/452985699986488506/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1818419888217740295&amp;postID=452985699986488506' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1818419888217740295/posts/default/452985699986488506'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1818419888217740295/posts/default/452985699986488506'/><link rel='alternate' type='text/html' href='http://ananddayal.blogspot.com/2007/01/asterisk-realtime-with-mysql.html' title='Asterisk Realtime with MySQL.'/><author><name>Anand Kumar Dayal</name><uri>http://www.blogger.com/profile/15821949256334333875</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://bp2.blogger.com/_X_AIQvaR6X4/SJGDCYgSLAI/AAAAAAAADcI/tod2zTuEQCw/S220/PIC-AD-257(2).jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1818419888217740295.post-2126350740231286433</id><published>2006-12-30T16:02:00.000-08:00</published><updated>2007-01-16T09:51:49.633-08:00</updated><title type='text'>How to Asterisk configure</title><content type='html'>&lt;a href="http://www.asterisk.org/"&gt; asterisk &lt;/a&gt;,&lt;a href="http://iptel.org/"&gt; SER&lt;/a&gt;, OpenSer are open Source VoIP Servers.&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Aserisk: &lt;/span&gt;You can configure the VoIP server using by Asterisk. The installation &amp; configuration instructions  are given below...&lt;br /&gt;&lt;br /&gt;1. Download the asterisk form &lt;a href="http://www.asterisk.org/"&gt; asterisk &lt;/a&gt;.&lt;br /&gt;2. Install using make ; make install command.&lt;br /&gt;3. Configure the sip user in sip.conf file and write the dialing extension in extensions.conf&lt;br /&gt;sip User format&lt;br /&gt;[user name]&lt;br /&gt;type=&lt;br /&gt;host= dynamic&lt;br /&gt;context =&lt;br /&gt;secret =&lt;br /&gt;disallow=  ; codes configuration&lt;br /&gt;allow=   ; codes configuration&lt;br /&gt;............etc&lt;span style="font-weight: bold;"&gt;&lt;br /&gt;&lt;/span&gt; and extension as&lt;br /&gt;[context name]&lt;br /&gt;dial =&gt; X,1,Dial(SIP/${EXTEN}@call termination context name |call dialing time duration like '30')&lt;br /&gt;&lt;br /&gt;Anand Dayal&lt;br /&gt;akdayal@yahoo.com&lt;div class="blogger-post-footer"&gt;akdayal@yahoo.com&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1818419888217740295-2126350740231286433?l=ananddayal.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ananddayal.blogspot.com/feeds/2126350740231286433/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1818419888217740295&amp;postID=2126350740231286433' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1818419888217740295/posts/default/2126350740231286433'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1818419888217740295/posts/default/2126350740231286433'/><link rel='alternate' type='text/html' href='http://ananddayal.blogspot.com/2006/12/how-to-asterisk-congigure.html' title='How to Asterisk configure'/><author><name>Anand Kumar Dayal</name><uri>http://www.blogger.com/profile/15821949256334333875</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://bp2.blogger.com/_X_AIQvaR6X4/SJGDCYgSLAI/AAAAAAAADcI/tod2zTuEQCw/S220/PIC-AD-257(2).jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1818419888217740295.post-3043392576668012566</id><published>2006-12-30T15:30:00.000-08:00</published><updated>2007-01-04T21:06:45.439-08:00</updated><title type='text'>Do you want VoIP Help ?</title><content type='html'>Dear Friends&lt;br /&gt;&lt;br /&gt;I am in VOIP industry since more than 2 years , I have experience in PC to phone , phone to PC , IP to phone , Phone to IP Device , Phone to Phone calling Cards , Billing , Origination Calls Retails , Wholesale , Termination calls Etc.&lt;br /&gt;I am working on open source VoIP projects.&lt;br /&gt;&lt;br /&gt;if you have any queries, then Contact Me akdayal@yahoo.com.&lt;br /&gt;Thanks&lt;div class="blogger-post-footer"&gt;akdayal@yahoo.com&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1818419888217740295-3043392576668012566?l=ananddayal.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ananddayal.blogspot.com/feeds/3043392576668012566/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1818419888217740295&amp;postID=3043392576668012566' title='3 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1818419888217740295/posts/default/3043392576668012566'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1818419888217740295/posts/default/3043392576668012566'/><link rel='alternate' type='text/html' href='http://ananddayal.blogspot.com/2006/12/voip-server.html' title='Do you want VoIP Help ?'/><author><name>Anand Kumar Dayal</name><uri>http://www.blogger.com/profile/15821949256334333875</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://bp2.blogger.com/_X_AIQvaR6X4/SJGDCYgSLAI/AAAAAAAADcI/tod2zTuEQCw/S220/PIC-AD-257(2).jpg'/></author><thr:total>3</thr:total></entry></feed>
