Ok, got this far:
replace_all(";rn=\+[0-9]*;npdi=(yes|no)", "");
Anyone know if replace and substitute with nothing? Basically its not
working :)
-----Original Message-----
From: Matt Schulte
Sent: Thursday, December 02, 2004 11:00 PM
To: serusers(a)lists.iptel.org
Subject: [Serusers] URI rewrite
Importance: High
I have an usual problem, a sip provder we're using is sending us long
forms of URI's:
+16365551212;rn=+16182074198;npdi=yes(a)blahblah.com
What I'm wanting to do is remove everything after +16365551212 (except
domain of course)
Ideas? stuck!!!! Thanks
_______________________________________________
Serusers mailing list
serusers(a)lists.iptel.org http://lists.iptel.org/mailman/listinfo/serusers
hi to all
we installed our ser+billing+asterisk -> termination asterisk+pstn and it works fine.
now i would like to bypass our asterisk and allow our ser to redirect directly to our pstn providers asterisk (at least for sip connections).
i have account, password, ip of remote asterisk but can't find how should i modify my ser.cfg to allow ser to redirect to that asterisk (t_relay_to_udp allows me to redirect to an ip/port without changing anything else)
thnx for your help
Graziano
How can I compile SER on Mac OS X? With the package I got
instructions
came in order to start SER at startup, but I found nothing about
building. I tried typing "make" but I got a very long list of all
kinds o errors.
Can anyone help?
Thanks
Hello all,
I have written a custom modules and am thinking about returning not just -1
on
error but different values if I can handle them differently in the ser.cfg.
I know that I can do the following....
if (!function_a())
{
do something;
}
else
{
do something else;
}
But I want to do store the return value of "function_a" and do different
stuff
depending on the return value.
Is this possible ?
thanks for any help in advance.
Jignesh Gandhi
Software Engineer II
Hi All.
I'm using ser-0.8.99-dev21 and I'm trying to create a module which will query MySQL to see if the
number dialed is in a table of unassigned DIDs. The reason is that we use a third party for PSTN
access and they assign us DIDs. If a DID is dialed that is not assigned to a ser subscriber our
sip proxy routes the caller to the PSTN gateway.
But the PSTN gateway provider sees the DID as belonging to our sip proxy so they route it right
back to us. And we get in a loop.
I've basically got my custom ser module working but there is a bug that I cannot find. This
modules exports a single function called "is_did_unassigned()".
The bug is this - when I dial a number that is unassigned is_did_unassigned() returns "0". But if
I dial a number on the PSTN the call to "is_did_unassigned()" hangs. So it appears that when the
MySQL query returns zero rows the module freezes.
My question is this - can someone give the attached source code a quick look to see what I've
messed up. Please be nice - this is my first stab at ser modules and I'm still very unclear on all
the db abstractions.
The MySQL table looks like this
CREATE TABLE unassigned_dids (username char(10))
My ser.cfg looks like this:
loadmodule "/usr/local/lib/ser/modules/dbdid.so"
modparam("dbdid", "db_url", "mysql://ser:heslo@localhost/ser")
route {
if (!lookup("location")) {
if (isflagset(31)) {
# Send to voicemail
route(5);
} else if (does_uri_exist()) {
sl_send_reply("480", "Temporarily Unavailable");
} else if (is_did_unassigned()) {
# User Does Not Exist, but the DID is ours
sl_send_reply("480", "Temporarily Unavailable");
} else if (uri=~"^sip:[0-9]{10}@") {
# Send to PSTN Gateway
route(3);
} else {
sl_send_reply("404", "User Not Found");
};
break;
};
}
And finally the code for the custom module which provided the "is_did_unassigned()" function is
attached.
Regards,
Paul
__________________________________
Do you Yahoo!?
Yahoo! Mail - Find what you need with new enhanced search.
http://info.mail.yahoo.com/mail_250
That's pretty much the end of startup, actually :-). The rest starts
jamming when you get connections to port 5060. You could debug = 4 to
see more output if you'd like.. Keep in mind that SER is by no means
"intelligent", especially without modules, *you* tell it what to listen
for and what to say via the config file. ie: without a routing statement
the proxy will literally do nothing.
I would recommend starting out with nathelper.cfg located in the
src sample directory, that actually works from default for local user
routing. Forwarding to Asterisk (,etc..) is another story, see if you
get all that working first and then move on. I made the mistake of
trying to do too much without knowing how the config worked, the result
I had was often infinite loops that would crash SER and Asterisk.
Matt
-----Original Message-----
From: Tareq Siraj [mailto:to_tareq@yahoo.com]
Sent: Thursday, December 02, 2004 8:38 AM
To: serusers(a)lists.iptel.org
Subject: [Serusers] SER stops after connecting to RTP Proxy
Hi all,
Its me again ... I got the RTP proxy thing working
... SER connects to RTPProxy ... then its stuck there
... doesnt proceed. the console log i get is like
this:
Listening on
192.168.1.21 [192.168.1.21]:5060
Aliases: machinename.localdomain:5060 machinename:*
WARNING: no fork mode
stateless - initializing
Maxfwd module- initializing
0(8908) mod_init(): Database connection opened
successfuly
textops - initializing
0(0) INFO: udp_init: SO_RCVBUF is initially 110592
0(0) INFO: udp_init: SO_RCVBUF is finally 221184
2(0) INFO: fifo process starting: 8912
1(8910) rtpp_test: RTP proxy found, support for it
enabled
2(8912) rtpp_test: RTP proxy found, support for it
enabled
2(8912) SER: open_uac_fifo: fifo server up at
/tmp/ser_fifo...
0(8908) rtpp_test: RTP proxy found, support for it
enabled
1(8910) 2(8912) INFO: signal 15 received
Thanks in advance. Any pointer would be appreciated.
- Tareq
__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com
_______________________________________________
Serusers mailing list
serusers(a)lists.iptel.org http://lists.iptel.org/mailman/listinfo/serusers
I have an usual problem, a sip provder we're using is sending us long
forms of URI's:
+16365551212;rn=+16182074198;npdi=yes(a)blahblah.com
What I'm wanting to do is remove everything after +16365551212 (except
domain of course)
Ideas? stuck!!!! Thanks
dear jiri,
i have problem in my serweb. i have 2 clients in softphone and 1 client in hardphone. they can do communication well but they just call by "username@mydomain". mydomain is sip.pcr.ac.id.
my problem is :
all they just recieve the same alias. it is 62761100. i don't know how it can be.
please help me..........
thanks before for your kindness.
this is my ser.cfg
# ----------- global configuration parameters ------------------------
#debug=3 # debug level (cmd line: -dddddddddd)
#fork=yes
#log_stderror=no # (cmd line: -E)
/* Uncomment these lines to enter debugging mode
debug=7
fork=yes
log_stderror=yes
*/
check_via=no # (cmd. line: -v)
dns=no # (cmd. line: -r)
rev_dns=no # (cmd. line: -R)
port=5060
children=4
fifo="/tmp/ser_fifo"
listen=192.168.10.64
listen=127.0.0.1
# ------------------ module loading ----------------------------------
# Uncomment this if you want to use SQL database
loadmodule "/usr/lib/ser/modules/mysql.so"
loadmodule "/usr/lib/ser/modules/sl.so"
loadmodule "/usr/lib/ser/modules/tm.so"
loadmodule "/usr/lib/ser/modules/rr.so"
loadmodule "/usr/lib/ser/modules/maxfwd.so"
loadmodule "/usr/lib/ser/modules/usrloc.so"
loadmodule "/usr/lib/ser/modules/registrar.so"
loadmodule "/usr/lib/ser/modules/textops.so"
loadmodule "/usr/lib/ser/modules/auth.so"
loadmodule "/usr/lib/ser/modules/auth_db.so"
loadmodule "/usr/lib/ser/modules/nathelper.so"
loadmodule "/usr/lib/ser/modules/msilo.so"
loadmodule "/usr/lib/ser/modules/acc.so"
loadmodule "/usr/lib/ser/modules/group.so"
loadmodule "/usr/lib/ser/modules/vm.so"
# ----------------- setting module-specific parameters ---------------
# -- usrloc params --
#modparam("usrloc", "db_mode", 0)
# Uncomment this if you want to use SQL database
# for persistent storage and comment the previous line
modparam("usrloc", "db_mode", 2)
modparam("usrloc", "timer_interval", 10)
#mod acc
modparam("acc", "log_missed_flag", 3)
modparam("acc", "log_level", 1)
modparam("acc", "log_flag", 1)
#rrparams
modparam("rr", "enable_full_lr", 1)
#tm params
modparam("tm", "fr_timer", 12)
modparam("tm", "fr_inv_timer", 24)
# -- auth params --
# Uncomment if you are using auth module
#
modparam("auth_db", "calculate_ha1", yes)
#
# If you set "calculate_ha1" parameter to yes (which true in this config),
# uncomment also the following parameter)
#
modparam("auth_db", "password_column", "password")
# -- rr params --
# add value to ;lr param to make some broken UAs happy
modparam("rr", "enable_full_lr", 1)
# -- msilo params --
modparam("msilo","registrar","sip:registrar@sip.pcr.ac.id")
modparam("msilo", "check_time", 90)
modparam("msilo", "use_contact", 0)
#modparam("msilo","db_url","sql://ser:passwd@dbhost/ser")
# ------------------------- request routing logic -------------------
# main routing logic
alias="sip.pcr.ac.id"
alias="gateway.sip.pcr.ac.id"
alias="192.168.10.64"
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 > max_len ) {
sl_send_reply("513", "Message too big");
break;
};
# we record-route all messages -- to make sure that
# subsequent messages will go through our proxy; that's
# particularly good if upstream and downstream entities
# use different transport protocol
record_route();
# loose-route processing
if (loose_route()) {
t_relay();
break;
};
# if the request is for other domain use UsrLoc
# (in case, it does not work, use the following command
# with proper names and addresses in it)
if (uri==myself) {
if (method=="REGISTER") {
# Uncomment this if you want to use digest authentication
if (!www_authorize("sip.pcr.ac.id", "subscriber")) {
www_challenge("sip.pcr.ac.id", "0");
break;
};
save("location");
break;
#MSILO - dumping user's offline message
if (m_dump())
{
log("MSILO: offline message dumped - if they were\n");
}
else
{
log("MSILO: no offline message dumped\n");
};
break;
# -- aliases --
lookup("aliases");
if (!uri==myself)
{
append_hf("P-hint: outbound alias\r\n");
route(1);
break;
};
};
# -- acc --
# call initiation
if (method=="INVITE")
{
setflag(1);
};
# -- msilo --
# we do not care about anything else but MESSAGEs
if (method=="MESSAGE")
{
if (t_newtran())
{
log("MESSAGE received -> storing using MSILO\n");
# MSILO - storing as offline message
if (m_store("0"))
{
log("MSILO: offline message stored\n");
if (!t_reply("202", "Accepted"))
{
sl_reply_error();
};
}
else
{
log("MSILO: offline message NOT stored\n");
if (!t_reply("503", "Service Unavailable"))
{
sl_reply_error();
};
};
# if the downstream UA does not support MESSAGE requests
# go to failure_route[2]
t_on_failure("2");
#if (!t_relay())
#{
# sl_reply_error();
#};
route(1);
break;
};
};
# native SIP destinations are handled using our USRLOC DB
if (!lookup("location")) {
sl_send_reply("404", "Not Found");
break;
};
};
# forward to current uri now; use stateful forwarding; that
# works reliably even if we forward from TCP to UDP
if (!t_relay()) {
sl_reply_error();
};
}
route[1]
{if (!t_relay())
{
sl_reply_error();
};
}
this a little in my config.php :
$this->first_alias_number=62761100;
/* expiration times, priorities, etc. for usrloc/alias contacts */
$this->new_alias_expires='567648000';
$this->new_alias_q=1.00;
$this->new_alias_callid="web_call_id(a)sip.pcr.ac.id";
$this->new_alias_cseq=1;
$this->ul_priority="1.00";
Sita Rosita
___________________________________________________
Create your own safe chat rooms.
http://www.homemaster.net - Homemaster. Come Together. Online.
Hi everybody,
I'm trying to get SER working and I get these errors(below) during running of SER.
I've already found an answer in the list, but still don't know when this situation happen.
After this, all UA's cannot register with SER.
Would anybody be able to tell me how can I fix this.
how can I set sending only INVITE, 183 and 200 messages to the rtpproxy?
I'm using nathelper.cfg from source package with minor changes.
Thanks for help
Ladia
This is from syslog:
Dec 2 21:31:44 linux /usr/local/sbin/ser[9313]: ERROR: extract_body: message body has lenght zero
Dec 2 21:31:44 linux /usr/local/sbin/ser[9313]: ERROR: force_rtp_proxy2: can't extract body from the message
Dec 2 21:31:44 linux /usr/local/sbin/ser[9313]: ERROR: on_reply processing failed
Dec 2 21:31:44 linux /usr/local/sbin/ser[9313]: ERROR: extract_body: message body has lenght zero
Dec 2 21:31:44 linux /usr/local/sbin/ser[9313]: ERROR: force_rtp_proxy2: can't extract body from the message
Dec 2 21:31:44 linux /usr/local/sbin/ser[9313]: ERROR: on_reply processing failed