Hi
As per the hello world Document from Onsip.orf ( getting started)
iam working with Media proxy with same config
i have installed OpenSER 1.1.0 with mysql 4.3
on Cent OS, open SER runnning on Public IP.
I have 3 clients
Client one Pulic IP
Client 2 and client 3 behind NAT ( Linksys Router)
Client1 - Sipura
Client 2- LeadTek
Client 3 my laptop X-Lite Soft Phone
the problem here is, when ever iam making call between
NATed Clients, some time media proxy using some time not
when ever media proxy not using then one way voice
and call also not disconnecting,
any solution, or suggestion
Ram
What solutions are available for avoiding manual editing and saving of Cisco .cnf files for individual phones while using SER or OpenSER? I've got 50-80 phones in my organization and I'm tired of manually managing the phone .cnf files
I'm imagining some piece of code that auto-generates the files on command or on a schedule based on entries in the MySQL database. Maybe a column can be added to the Subscriber table or somewhere that holds the MAC address of the phone?
Thanks,
M
Hi,
I cant start Ser 0.9.6
I get the following error when I start it up
0(4628) set_mod_param_regex: parameter <db_url> not found in module <acc>
0(4628) parse error (87,20-21): Can't set module parameter
0(4628) set_mod_param_regex: parameter <db_missed_flag> not found in module
<acc>
0(4628) parse error (92,19-20): Can't set module parameter
0(4628) set_mod_param_regex: parameter <db_flag> not found in module <acc>
0(4628) parse error (93,19-20): Can't set module parameter
ERROR: bad config file (3 errors)
Here's my settings for the acc module - can anyone see whats wrong with it??
modparam("acc", "db_url", "mysql://ser:heslo@localhost/ser")
modparam("acc", "log_level", 1)
modparam("acc", "log_flag", 1)
modparam("acc", "log_missed_flag", 2)
modparam("acc", "log_fmt", "fimos")
modparam("acc", "db_missed_flag", 2)
modparam("acc", "db_flag", 1)
Dear all,
Thanks to all of you for your kind-hearted answering my question. Thank you very much.
Now, I am building serweb in openser. So, the client can register to become the member of communication in my openser that I have built.
1. Can "serweb" (from iptel.org) be used in openser server for building the webserver of the openser server? Or openser has it`s own webserver except "serweb"?
2.When I build serweb (from iptel.org), I have some problems. I do hope anybody can help me and give me a suggestion. Please..
The error message that I got from client browser is
Fatal error: Failed opening required 'var/www/phplib/db_mysql.inc' (include_path='.:/usr/share/pear') in /var/www/html/serweb/user_interface/prepend.php on line 23
The contain of prepend.php that shows line 23 is
require($_PHPLIB["libdir"] . "db_mysql.inc"); /* Change this to match your database. */
I don`t know what is wrong. I do hope anybody can give me a suggestion. Please help me..Please. Thanks
Regards,
Ferianto
Note:
This is the contain of db_mysql.inc that I have configured
<?php
/*
* Session Management for PHP3
*
* Copyright (c) 1998-2000 NetUSE AG
* Boris Erdmann, Kristian Koehntopp
*
* $Id: db_mysql.inc,v 1.1.1.1 2002/09/04 18:19:57 kozlik Exp $
*
*/
class DB_Sql {
/* public: connection parameters */
var $Host = "localhost";
var $Database = "openser";
var $User = "openser";
var $Password = "openserrw";
/* public: configuration parameters */
var $Auto_Free = 0; ## Set to 1 for automatic mysql_free_result()
var $Debug = 0; ## Set to 1 for debugging messages.
var $Halt_On_Error = "yes"; ## "yes" (halt with message), "no" (ignore errors quietly), "report" (ignore errror, but spit a warning)
var $Seq_Table = "db_sequence";
/* public: result array and current row number */
var $Record = array();
var $Row;
/* public: current error number and error text */
var $Errno = 0;
var $Error = "";
/* public: this is an api revision, not a CVS revision. */
var $type = "mysql";
var $revision = "1.2";
/* private: link and query handles */
var $Link_ID = 0;
var $Query_ID = 0;
/* public: constructor */
function DB_Sql($query = "") {
$this->query($query);
}
/* public: some trivial reporting */
function link_id() {
return $this->Link_ID;
}
function query_id() {
return $this->Query_ID;
}
/* public: connection management */
function connect($Database = "", $Host = "", $User = "", $Password = "") {
/* Handle defaults */
if ("" == $Database)
$Database = $this->Database;
if ("" == $Host)
$Host = $this->Host;
if ("" == $User)
$User = $this->User;
if ("" == $Password)
$Password = $this->Password;
/* establish connection, select database */
if ( 0 == $this->Link_ID ) {
$this->Link_ID=mysql_pconnect($Host, $User, $Password);
if (!$this->Link_ID) {
$this->halt("pconnect($Host, $User, \$Password) failed.");
return 0;
}
if (!@mysql_select_db($Database,$this->Link_ID)) {
$this->halt("cannot use database ".$Database);
return 0;
}
}
return $this->Link_ID;
}
/* public: discard the query result */
function free() {
@mysql_free_result($this->Query_ID);
$this->Query_ID = 0;
}
/* public: perform a query */
function query($Query_String) {
/* No empty queries, please, since PHP4 chokes on them. */
if ($Query_String == "")
/* The empty query string is passed on from the constructor,
* when calling the class without a query, e.g. in situations
* like these: '$db = new DB_Sql_Subclass;'
*/
return 0;
if (!$this->connect()) {
return 0; /* we already complained in connect() about that. */
};
# New query, discard previous result.
if ($this->Query_ID) {
$this->free();
}
if ($this->Debug)
printf("Debug: query = %s<br>\n", $Query_String);
$this->Query_ID = @mysql_query($Query_String,$this->Link_ID);
$this->Row = 0;
$this->Errno = mysql_errno();
$this->Error = mysql_error();
if (!$this->Query_ID) {
$this->halt("Invalid SQL: ".$Query_String);
}
# Will return nada if it fails. That's fine.
return $this->Query_ID;
}
/* public: walk result set */
function next_record() {
if (!$this->Query_ID) {
$this->halt("next_record called with no query pending.");
return 0;
}
$this->Record = @mysql_fetch_array($this->Query_ID);
$this->Row += 1;
$this->Errno = mysql_errno();
$this->Error = mysql_error();
$stat = is_array($this->Record);
if (!$stat && $this->Auto_Free) {
$this->free();
}
return $stat;
}
/* public: position in result set */
function seek($pos = 0) {
$status = @mysql_data_seek($this->Query_ID, $pos);
if ($status)
$this->Row = $pos;
else {
$this->halt("seek($pos) failed: result has ".$this->num_rows()." rows.");
/* half assed attempt to save the day,
* but do not consider this documented or even
* desireable behaviour.
*/
@mysql_data_seek($this->Query_ID, $this->num_rows());
$this->Row = $this->num_rows();
return 0;
}
return 1;
}
/* public: table locking */
function lock($table, $mode = "write") {
$query = "lock tables ";
if (is_array($table)) {
while (list($key,$value) = each($table)) {
if (!is_int($key)) {
// texts key are "read", "read local", "write", "low priority write"
$query .= "$value $key, ";
} else {
$query .= "$value $mode, ";
}
}
$query = substr($query,0,-2);
} else {
$query .= "$table $mode";
}
$res = $this->query($query);
if (!$res) {
$this->halt("lock() failed.");
return 0;
}
return $res;
}
function unlock() {
$res = $this->query("unlock tables");
if (!$res) {
$this->halt("unlock() failed.");
}
return $res;
}
/* public: evaluate the result (size, width) */
function affected_rows() {
return @mysql_affected_rows($this->Link_ID);
}
function num_rows() {
return @mysql_num_rows($this->Query_ID);
}
function num_fields() {
return @mysql_num_fields($this->Query_ID);
}
/* public: shorthand notation */
function nf() {
return $this->num_rows();
}
function np() {
print $this->num_rows();
}
function f($Name) {
if (isset($this->Record[$Name])) {
return $this->Record[$Name];
}
}
function p($Name) {
if (isset($this->Record[$Name])) {
print $this->Record[$Name];
}
}
/* public: sequence numbers */
function nextid($seq_name) {
$this->connect();
if ($this->lock($this->Seq_Table)) {
/* get sequence number (locked) and increment */
$q = sprintf("select nextid from %s where seq_name = '%s'",
$this->Seq_Table,
$seq_name);
$id = @mysql_query($q, $this->Link_ID);
$res = @mysql_fetch_array($id);
/* No current value, make one */
if (!is_array($res)) {
$currentid = 0;
$q = sprintf("insert into %s values('%s', %s)",
$this->Seq_Table,
$seq_name,
$currentid);
$id = @mysql_query($q, $this->Link_ID);
} else {
$currentid = $res["nextid"];
}
$nextid = $currentid + 1;
$q = sprintf("update %s set nextid = '%s' where seq_name = '%s'",
$this->Seq_Table,
$nextid,
$seq_name);
$id = @mysql_query($q, $this->Link_ID);
$this->unlock();
} else {
$this->halt("cannot lock ".$this->Seq_Table." - has it been created?");
return 0;
}
return $nextid;
}
/* public: return table metadata */
function metadata($table = "", $full = false) {
$count = 0;
$id = 0;
$res = array();
/*
* Due to compatibility problems with Table we changed the behavior
* of metadata();
* depending on $full, metadata returns the following values:
*
* - full is false (default):
* $result[]:
* [0]["table"] table name
* [0]["name"] field name
* [0]["type"] field type
* [0]["len"] field length
* [0]["flags"] field flags
*
* - full is true
* $result[]:
* ["num_fields"] number of metadata records
* [0]["table"] table name
* [0]["name"] field name
* [0]["type"] field type
* [0]["len"] field length
* [0]["flags"] field flags
* ["meta"][field name] index of field named "field name"
* This last one could be used if you have a field name, but no index.
* Test: if (isset($result['meta']['myfield'])) { ...
*/
// if no $table specified, assume that we are working with a query
// result
if ($table) {
$this->connect();
$id = @mysql_list_fields($this->Database, $table);
if (!$id) {
$this->halt("Metadata query failed.");
return false;
}
} else {
$id = $this->Query_ID;
if (!$id) {
$this->halt("No query specified.");
return false;
}
}
$count = @mysql_num_fields($id);
// made this IF due to performance (one if is faster than $count if's)
if (!$full) {
for ($i=0; $i<$count; $i++) {
$res[$i]["table"] = @mysql_field_table ($id, $i);
$res[$i]["name"] = @mysql_field_name ($id, $i);
$res[$i]["type"] = @mysql_field_type ($id, $i);
$res[$i]["len"] = @mysql_field_len ($id, $i);
$res[$i]["flags"] = @mysql_field_flags ($id, $i);
}
} else { // full
$res["num_fields"]= $count;
for ($i=0; $i<$count; $i++) {
$res[$i]["table"] = @mysql_field_table ($id, $i);
$res[$i]["name"] = @mysql_field_name ($id, $i);
$res[$i]["type"] = @mysql_field_type ($id, $i);
$res[$i]["len"] = @mysql_field_len ($id, $i);
$res[$i]["flags"] = @mysql_field_flags ($id, $i);
$res["meta"][$res[$i]["name"]] = $i;
}
}
// free the result only if we were called on a table
if ($table) {
@mysql_free_result($id);
}
return $res;
}
/* public: find available table names */
function table_names() {
$this->connect();
$h = @mysql_query("show tables", $this->Link_ID);
$i = 0;
while ($info = @mysql_fetch_row($h)) {
$return[$i]["table_name"] = $info[0];
$return[$i]["tablespace_name"] = $this->Database;
$return[$i]["database"] = $this->Database;
$i++;
}
@mysql_free_result($h);
return $return;
}
/* private: error handling */
function halt($msg) {
$this->Error = @mysql_error($this->Link_ID);
$this->Errno = @mysql_errno($this->Link_ID);
if ($this->Halt_On_Error == "no")
return;
$this->haltmsg($msg);
if ($this->Halt_On_Error != "report")
die("Session halted.");
}
function haltmsg($msg) {
printf("</td></tr></table><b>Database error:</b> %s<br>\n", $msg);
printf("<b>MySQL Error</b>: %s (%s)<br>\n",
$this->Errno,
$this->Error);
}
}
?>
---------------------------------
Yahoo! Messenger with Voice. Make PC-to-Phone Calls to the US (and 30+ countries) for 2¢/min or less.
Hi List,
I am trying to get SER to run on FreeBSD 6
For some reason, I can't get the acc module to do anything.
I have downloaded SER from CVS, changed ./modules/acc/Makefile to enable
SQL accounting, and did a gmake bin include_modules="mysql", then
untared the resulting .tgz in /
SER starts fine, processes SIP message fine, and yields no errors in
/var/log/messages.
However I can't see any accounting related information in ser's "acc"
table (which remains always empty).
Any ideas?
PS: Here is my ser.cfg (I have replaced the IP addresses with dummy
addresses because I don't want them to be archived...). If somebody
would be kind enough to take a look at it...
debug=3
fork=yes
log_stderror=no
listen=123.123.123.123
port=5060
children=4
dns=no
rev_dns=no
fifo="/tmp/ser_fifo"
fifo_db_url="mysql://ser:heslo@localhost/ser"
# ------------------ module loading ----------------------------------
loadmodule "/usr/local/lib/ser/modules/mysql.so"
loadmodule "/usr/local/lib/ser/modules/sl.so"
loadmodule "/usr/local/lib/ser/modules/tm.so"
loadmodule "/usr/local/lib/ser/modules/rr.so"
loadmodule "/usr/local/lib/ser/modules/maxfwd.so"
loadmodule "/usr/local/lib/ser/modules/usrloc.so"
loadmodule "/usr/local/lib/ser/modules/registrar.so"
loadmodule "/usr/local/lib/ser/modules/textops.so"
## ACC
loadmodule "/usr/local/lib/ser/modules/acc.so"
modparam("acc", "log_level", 1)
modparam("acc", "log_flag", 1)
# ----------------- setting module-specific parameters ---------------
modparam("rr", "enable_full_lr", 1)
# ------------------------- request routing logic -------------------
# main routing logic
route{
# initial sanity checks -- messages with
# max_forwards==0, or excessively long requests
if (!mf_process_maxfwd_header("10")) {
sl_send_reply("483","Too Many Hops");
break;
};
if (msg:len >= 2048 ) {
sl_send_reply("513", "Message too big");
break;
};
if (method=="REGISTER") {
sl_send_reply("501", "Not Implemented");
break;
};
if (method=="OPTIONS") {
sl_send_reply("501", "Not Implemented");
break;
};
record_route();
if( (method=="INVITE") || (method=="ACK") || (method=="BYE")) {
setflag(1);
};
# subsequent messages withing a dialog should take the
# path determined by record-routing
if (loose_route()) {
# mark routing logic in request
append_hf("P-hint: rr-enforced\r\n");
route(1);
break;
};
if (!uri==myself) {
# mark routing logic in request
append_hf("P-hint: outbound\r\n");
route(1);
break;
};
route(3);
if (method=="INVITE") {
route(2);
break;
};
route(1);
}
route[1]
{
if (!t_relay()) {
sl_reply_error();
};
}
route[2] {
if (uri=~"^sip:001#") {
rewritehostport ("123.123.123.201:5060");
};
if (uri=~"^sip:002#") {
rewritehostport ("123.123.123.202:5060");
};
if (uri=~"^sip:003#") {
sl_send_reply ("401", "Unauthorized");
break();
};
if (uri=~"^sip:004#") {
rewritehostport ("123.123.123.204:5060");
};
route(1);
}
route[3]
{
if ( !(
(src_ip == 123.123.123.201) ||
(src_ip == 123.123.123.202) ||
(src_ip == 123.123.123.204) ||
1
) )
{
sl_send_reply("401", "Unauthorized");
break();
};
}
What are some things that might create one-way audio issues from different
clients, all using STUN, all NATted behind the same firewall?
Some UAs, I have to add port-forwarding for to ensure two-way audio (they're
behaving as though they're behind a symmetric NAT). Others, I don't have any
issues with at all.
For instance, X-Lite? Always works. Snom? Requires port-forwarding in order to
function correctly 100% of the time (often works, doesn't always). Grandstream
(phones and ATAs)? Always works. UTStarCom F3000? Requires port-forwarding to
function correctly. SJPhone? Always works. Etc., etc.
All these devices are behind the same firewall, so I don't think it's
necessarily an issue with the method of NAT that the firewall does. It's
something that varies inside the UA.
Any ideas what, inside a UA, could cause such disparity? I thought it might be
the SDP headers, but I can't honestly tell MUCH difference between them.
I'm at a bit of a loss for all the bizarre variables involved.
N.
Anybody noticed that the site iptel.org/ser has a new look and the ser
admin and ser programmer guides (among many other links) are gone.
Are these doc still accessible ??
Thanks
Gaurav
Hi,
Oh my. My appologies! I've mixed up with Asterisk.
What ser version do you want to install, btw? If 0.9.x then plz take a
look at INSTALL file in the tar ball. There should not be any problem
with compiling like in any other linux system, if you've installed all
the needed packages.
When you make,
1. make #builds only ser core, equivalent to make ser
2. make all #builds everything
3. make bin include_modules="mysql jabber cpl-c auth_radius
group_radius uri_radius postgres pa" #builds selective modules
(you'll definitely need mysql and the rest is up to you)
4. Refer to INSTALL file for more options. Btw, since Ubuntu is Debian
based, then also take a look at the "requirements" section for Debian.
5. Make sureto install MySQL first. I used 4.1.x for many
installations so far and it seems to be working really fine.
Then make install. This should install ser into default directory (
/usr/local ) with configuration file inside the /usr/local/etc/ser/
and shell scripts with binaries in /usr/local/sbin/.
Andrey.
On 8/19/06, Eddie Johnson Jr <ilo(a)ilo-infosystems.us> wrote:
> Are you saying in this e-mail that a package exist in the repository because
> I have checked by searching SER and Sip Express Router and nothing. Any
> suggestions will be greatly appreciated.
>
> -----Original Message-----
> From: serusers-bounces(a)lists.iptel.org
> [mailto:serusers-bounces@lists.iptel.org] On Behalf Of Andrey Kouprianov
> Sent: Thursday, August 17, 2006 10:57 PM
> To: serusers(a)iptel.org
> Subject: Re: [Serusers] SER on Ubuntu Breezy
>
> Hi,
>
> A friend of mine has installed SER on Ubuntu 5.10 before from Ubuntu's
> package list. I dont know the details, but it should be fairly easy.
> Flex and bison MUST be installed on Ubuntu by default. All u need to
> install is MySQL server first, and then SER. Ubuntu should take care
> of the rest or at least tell u which package is missing.
>
> On 8/17/06, Eddie Johnson Jr <ilo(a)ilo-infosystems.us> wrote:
> >
> >
> >
> > Has anyone done an install of SER on Ubuntu 5.10. I need some initial
> setup
> > points and I can take it from there. I installed, flex, bison,
> > build-essential, ran make clean nothing, ran make install and I get
> makefile
> > 80 no directory or file. Where do I go from here?
> >
> >
> >
> > Regards,
> >
> >
> >
> > iloadmin
> > _______________________________________________
> > Serusers mailing list
> > Serusers(a)lists.iptel.org
> > http://lists.iptel.org/mailman/listinfo/serusers
> >
> >
> >
> _______________________________________________
> Serusers mailing list
> Serusers(a)lists.iptel.org
> http://lists.iptel.org/mailman/listinfo/serusers
>
>
Hey all..
First time poster, but long time reader. Thanks to all that contribute
to this excellent project, this software is very flexible!
I just wanted to mention that while upgrading my config to 1.1.0, I
found that..
avp_write("$ruri/username", "$avp(myuser)") or
avp_write("$ru/username", "$avp(myuser)")
does not work as expected, and does not return just the username.
Instead I needed to change it to..
avp_write("$rU", "$avp(myuser)")
BTW, am I able to update via SVN to a newer bug fixed version of the
1.1.0 branch, without taking on any new things in the HEAD branch? Is
it just as simple as this, and I have just not tried it. I wish to use
this code in a production environment.
Kind regards, Stuart.
Hello Greger and thanks for your answer
I tested sending the CANCEL to route(3), and it seems to be working ok now. But now i'm facing another problem. The OK message for the BYE seems not to be routed back to the NAT'd port, instead is routed to the default port. Please check the file attached (BYE_debug.TXT).
As i pointed in my first post, the calling endpoint is NAT'd. Following the BYE sequence seems to be right, it hits the loose_route section and then the route(1), but since the BYE does not contain the rport parameter in the VIA header the OK is routed back to the port advertised in the VIA header. (5061) and not to the received port.
Maybe i'm doing something wrong?.
I tested a new solution, but i don't know if is correct or is according to the ONSIP document.
I added a client_nat_test("3") in the Call Tear Down Section-
..........
# -----------------------------------------------------------------
# Record Route Section
# -----------------------------------------------------------------
if (method=="INVITE" && client_nat_test("3")) {
# INSERT YOUR IP ADDRESS HERE
record_route_preset("200.100.100.246:5060;nat=yes");
} else if (method!="REGISTER") {
record_route();
};
# -----------------------------------------------------------------
# Call Tear Down Section
# -----------------------------------------------------------------
if (method=="BYE" || method=="CANCEL") {
if (client_nat_test("3")) {
force_rport();
xlog("L_INFO", "[%rm] - From:%fu ; To:%ru ; Call-ID:%ci ; Desde:%is\n - FORCE RPORT ON");
};
end_media_session();
setflag(1);
};
# -----------------------------------------------------------------
# Loose Route Section
# -----------------------------------------------------------------
if (loose_route()) {
if (has_totag() && (method=="INVITE" || method=="ACK")) {
if (client_nat_test("3")||search("^Route:.*;nat=yes")){
setflag(6);
use_media_proxy();
};
};
route(1);
break;
};
.......
Hope that someone could help me here.
Thanks
Regards,
Ricardo Martinez.-
-----Mensaje original-----
De: Greger V. Teigre [mailto:greger@teigre.com]
Enviado el: jueves, 17 de agosto de 2006 4:05
Para: Ricardo Martinez
CC: serusers(a)iptel.org
Asunto: Re: [Serusers] Via RPORT for CANCEL message.
Having a quick look, you may have found a bug in the ONsip.org scripts. A CANCEL is not loose routed (a dialog has not yet been set up) and must be handled the same way as an INVITE, i.e. the only way to find the route for CANCEL is to route the CANCEL the same way you routed the INVITE. However, it seems that you have somehow has done that, as your domain has changed to @gw. in the CANCEL doing downstream (i.e. forwarded by your SER).
So, CANCEL should be sent to route(3), the INVITE handler and not route(1). I'm quite sure this was correct in a previous version, we even had some discussions around how to handle it and how to describe it, but it seems that something has happened along the way.
g-)
Ricardo Martinez wrote:
Hello.
My main configuration is based on the ser.cfg from the issue 5 plus some modifications included by me. Beside that i'm using
version: ser 0.9.3 (i386/linux)
flags: STATS: Off, USE_IPV6, USE_TCP, DISABLE_NAGLE, USE_MCAST, DNS_IP_HACK, SHM_MEM, SHM_MMAP, PKG_MALLOC, FAST_LOCK-ADAPTIVE_WAIT
ADAPTIVE_WAIT_LOOPS=1024, MAX_RECV_BUFFER_SIZE 262144, MAX_LISTEN 16, MAX_URI_SIZE 1024, BUF_SIZE 65535
@(#) $Id: main.c,v 1.197 2004/12/03 19:09:31 andrei Exp $
main.c compiled on 11:03:37 Dec 22 2005 with gcc 3.2
I have a question regarding to sending a CANCEL message for an INVITE from a NAT'd endpoint. As far as i know the force_rport() command adds the received IP port to the top most via header in the SIP message, this enables subsequent SIP message to return to the proper port later on in a SIP transaction. My problem is that for a CANCEL message coming from a NAT'd endpoint this command seems not to be working. This is the scenario.
NAT'd endpoint : 200.100.100.248
SER : 200.100.100.246
SER-2 : 200.100.100.36
GW : 200.100.100.69
The NAT'd endpoint send an INVITE to the proxy, but then in the middle of the transaction decide to CANCEL the request.
As you can see in the "cancel_debug.txt" file included on this mail, the CANCEL message does not contain the "rport" in the Via header, so it seems to be routed back to the default sip port (5060). Is there a way to force the rport in a CANCEL? for a enpoint unable to put the rport by itself?
I want to do this according to the onsip document, in a compatible way..
Anyway i made a little test including a force_rport(); in the CANCEL handler
..........
# -----------------------------------------------------------------
# Record Route Section
# -----------------------------------------------------------------
if (method=="INVITE" && client_nat_test("3")) {
# INSERT YOUR IP ADDRESS HERE
record_route_preset("200.100.100.246:5060;nat=yes");
} else if (method!="REGISTER") {
record_route();
};
# -----------------------------------------------------------------
# Call Tear Down Section
# -----------------------------------------------------------------
if (method=="BYE" || method=="CANCEL") {
end_media_session();
setflag(1);
};
# -----------------------------------------------------------------
# Loose Route Section
# -----------------------------------------------------------------
if (loose_route()) {
if (has_totag() && (method=="INVITE" || method=="ACK")) {
if (client_nat_test("3")||search("^Route:.*;nat=yes")){
setflag(6);
use_media_proxy();
};
};
route(1);
break;
};
# -----------------------------------------------------------------
# Call Type Processing Section
# -----------------------------------------------------------------
if (!is_uri_host_local()) {
if (is_from_local() || allow_trusted()) {
route(4);
route(1);
} else {
sl_send_reply("403", "Forbidden");
};
break;
};
if (method=="CANCEL") {
force_rport();
route(1);
break;
} else if (method=="INVITE") {
route(3);
break;
} else if (method=="REGISTER") {
route(2);
break;
} else if (method=="ACK") {
route(1);
break;
};
lookup("aliases");
if (uri!=myself) {
route(4);
route(1);
break;
};
if (!lookup("location")) {
sl_send_reply("404", "User Not Found");
break;
};
route(1);
this solve my problem but it seems not to be so accurate.
I hope that someone can help me
Thanks!
Ricardo Martinez.-