I have recently noticed that despite having a
$record_route_nated = true;
in the route[PSTN_FORWARD] of ser.cfg, the INVITES and
such sent on do not have a Record-Route header.
In our NATed situation, probably the only thing this
would cause problems with would be when the called party
hangs up first, SER and the calling party never find out
about it, since the calling party IP is not reachable
from the PSTN switch NATed address space, so the single
BYE message sent by the PSTN switch probably whizzes
by to an unreachable destination address. So the calling
party remains off-hook and just gets dead air. When
the calling party finally disconnects, the SER passes
the caller-initiated BYE to the PSTN switch which
returns a 481 because it thinks the call was over ages
earlier. Or at least this is what appears to be happening.
Here is the PSTN_FORWARD in use, not that different
from the PSTN gateway example ser.cfg:
route[PSTN_FORWARD]
{
# Set where packets should be sent. If you don't do this here,
# OPTIONS and other messages will be transmitted back to the
# outside interface and processed all over again, and you eventually
# get a Too Many Hops error on every OPTIONS message.
# Code to make this point in multiple directions would be needed
# to implement two-way origination.
rewritehost("10.x.x.x"); #Send to SIP-TDM switch
if (method == "BYE" || method == "CANCEL") {
unforce_rtp_proxy();
}
else if (method == "INVITE") {
# Force record routing if either party is behind NAT
$record_route_nated = true;
# log(1, "NAT Mangle Force RTP Proxy\n");
force_rtp_proxy("e");
}
t_on_reply("PSTN_REPLY");
# if this is called from the failure route we need to open a new
branch
if (isflagset(FLAG_FAILUREROUTE)) {
append_branch();
}
# if this is an initial INVITE (without a To-tag) we might try another
# (forwarding or voicemail) target after receiving an error
if (method=="INVITE" && @to.tag=="") {
t_on_failure("FAILURE_ROUTE");
}
# send it out now; use stateful forwarding as it works reliably
# even for UDP2TCP
if (!t_relay()) {
sl_reply_error();
}
drop;
}
The resulting INVITE that is being sent on to the PSTN switch
looks like:
INVITE sip:+1xxxxxxxxxx@10.x.x.x:5060;npdi=yes SIP/2.0
Via: SIP/2.0/UDP 10.x.x.x;branch=z9hG4bK6804.1cb4cb23.0
Via: SIP/2.0/UDP 10.x.x.x:5060;branch=z9hG4bK1kpu0b20e0fgogk9c6d0.1
f:
<sip:+1xxxxxxxxxx;jip=xxxxxx@10.x.x.x:5060;user=phone>;tag=d0a-13c4-83e003-64bd22fa-83e003
t: <sip:+1xxxxxxxxxx@10.x.x.x:5060;user=phone>
i: a249e890d8184d0a13c483e0033230d1ff3b57654c1d4018-0143-8166
CSeq: 1 INVITE
User-agent: CS2000_NGSS/9.0
P-Asserted-Identity: <sip:+1xxxxxxxxxx;jip=xxxxxx@10.x.x.x;user=phone>
Max-Forwards: 16
k: 100rel
Allow: ACK,BYE,CANCEL,INVITE,OPTIONS,INFO,SUBSCRIBE,REFER,NOTIFY,PRACK
m: <sip:10.x.x.x:5060;transport=udp>
c: application/SDP
l: 231
v=0
o=- 15109843 15109843 IN IP4 10.x.x.x
s=-
c=IN IP4 10.x.x.x
t=0 0
m=audio 44464 RTP/AVP 0 101
b=AS:80
a=ptime:20
a=rtpmap:0 PCMU/8000/1
a=rtpmap:101 telephone-event/8000/1
a=fmtp:101 0-15
a=nortpproxy:yes
So, any ideas as to why the "$record_route_nated = true"
doesn't seem to be having any effect, eg no Record-Route
shows up in outbound messages? I know SER is passing
through the above code because I can uncomment the
"NAT Mangle" comment and see it in the logs.
Is there perhaps some module that must be present that
we may have eliminated that makes Record-Route get
emitted?
Thanks again!
I'm deploying Kamailio in an enterprise environment and I'm looking for
a better way to handle the mapping of external DIDs to SIP usernames,
number re-writing etc. I'm currently using ENUM in my test setup but I'd
prefer to go with SQL storage and have that data written out to a faster
database for lookups by Kamailio. I have a mix of users that register
directly to the proxy and also several PBXs that I need to route blocks
of numbers to through Cisco routers. For location A I would need to
route any four digit number that starts with a 3 (3759), EXCEPT ones
specifically defined in my database since they might be mapped directly
to a user. Also for any outbound call (9 prefix) I need to check the DB
to see if it's local.
If I move to DB storage how do I handle things like parallel/sequential
forking? ENUM makes it very easy - for example:
1.0.0.0.1 NAPTR 100 10 "u" "E2U+sip"
"!^.*$!sip:8700@172.20.152.132!" .
NAPTR 100 10 "u" "E2U+sip"
"!^.*$!sip:901191986701####@172.20.152.132!" .
NAPTR 100 10 "u" "E2U+sip"
"!^.*$!sip:901191996700####@172.20.152.132!" .
If I have a SIP user "bob(a)domain.com" a simple location lookup works for
that, but I also need to be able to map a e.164 did to him, and a short
form with just the last 4 digits for my internal dialing. I would need a
database schema that does the equivalent to this:
0.1.5.3.3.9.2.4.1.9.1 NAPTR 100 10 "u" "E2U+sip"
"!^.*$!sip:bobm@domain.com!" .
0.1.5.3 NAPTR 100 10 "u" "E2U+sip"
"!^.*$!sip:bobm@domain.com!" .
Any suggestions?
Thanks
Bob
--------------------------------------------------------------------------
This email with all information contained herein or attached hereto may contain confidential and/or privileged information intended for the addressee(s) only. If you have received this email in error, please contact the sender and immediately delete this email in its entirety and any attachments thereto.
(W1)
Hi,
first of all thanks for the great sqlops module.
Is "|sql_result_free(result)|" needed before I leave the script by
"exit;" to avoid memory trouble
or is it only needed to query again in the same request processing?
Is there any way to check if the query was not successful (db
unreachable, systax error in query)?
I've seen a warning in the syslog, but I need to check it in the script.
BTW in the doc the example for 1.4.2. seems to be wrong?
regards,
Andreas
Hi,
I'm trying to find a open source ptt (push to talk) server?
Does Kamailio can act as this role? Or do you know any open source ptt
server?
Thanks!
--
Steven S.W
Helo,
I've installes Siiremis and I have the following error when I try to log
in.
"An exception occurred while executing this script:
Error message: #256, No Database information found in the config file.
Script name and line number of error:
/var/www/siremis-0.9.1/openbiz/bin/Configuration.php:42"
I have only change the db_name in Config.xml from openser_siremis to
openser. (the only data base that I have is openser that I've installed
with opensedbctl create).
Can anybody help me, please?
Thanks,
Loredana
hello, ich have installed the latest version from kamailio
kamailio-1.5.0-tls_src.tar.gz
Compiled and installed with this parameters
NICER=1 make all
make include_modules="db_mysql" all
make install
the database tables created with
/usr/local/sbin/kamdbctl create
and then start kamailio with
kamctl start
the output on cmd is :
gateway2:/usr/local/sbin # kamctl start
INFO: Starting Kamailio :
ERROR: PID file /var/run/kamailio.pid does not exist -- Kamailio start
failed
my logfile:
...
Mar 9 13:17:19 gateway2 /usr/local/sbin/kamailio[9496]:
DBG:core:fix_actions: fixing record_route, line 310
Mar 9 13:17:19 gateway2 /usr/local/sbin/kamailio[9496]:
DBG:core:fix_actions: fixing is_method, line 313
Mar 9 13:17:19 gateway2 /usr/local/sbin/kamailio[9496]:
DBG:core:parse_methods: methods 0x1
Mar 9 13:17:19 gateway2 /usr/local/sbin/kamailio[9496]:
DBG:textops:fixup_method: using id for method [INVITE/1]
Mar 9 13:17:19 gateway2 /usr/local/sbin/kamailio[9496]:
DBG:core:fix_actions: fixing append_hf, line 320
Mar 9 13:17:19 gateway2 /usr/local/sbin/kamailio[9496]:
DBG:core:fix_actions: fixing is_method, line 334
Mar 9 13:17:19 gateway2 /usr/local/sbin/kamailio[9496]:
DBG:core:parse_methods: methods 0x2200
Mar 9 13:17:19 gateway2 /usr/local/sbin/kamailio[9496]:
DBG:textops:fixup_method: using id for methods [PUBLISH,SUBSCRIBE/8704]
Mar 9 13:17:19 gateway2 /usr/local/sbin/kamailio[9496]:
DBG:core:fix_actions: fixing is_method, line 337
Mar 9 13:17:19 gateway2 /usr/local/sbin/kamailio[9496]:
DBG:core:parse_methods: methods 0x80
Mar 9 13:17:19 gateway2 /usr/local/sbin/kamailio[9496]:
DBG:textops:fixup_method: using id for method [REGISTER/128]
Mar 9 13:17:19 gateway2 /usr/local/sbin/kamailio[9496]:
DBG:core:fix_actions: fixing save, line 339
Mar 9 13:17:19 gateway2 /usr/local/sbin/kamailio[9496]:
DBG:core:db_do_init: connection 0x654220 not found in pool
Mar 9 13:17:19 gateway2 /usr/local/sbin/kamailio[9496]:
DBG:db_mysql:db_mysql_new_connection: opening connection:
mysql://xxxx:xxxx@localhost/openser
Mar 9 13:17:19 gateway2 /usr/local/sbin/kamailio[9496]:
ERROR:db_mysql:db_mysql_new_connection: driver error: Access denied for user
'openser'@'localhost' (using password: YES)
Mar 9 13:17:19 gateway2 /usr/local/sbin/kamailio[9496]:
ERROR:core:db_do_init: could not add connection to the pool
Mar 9 13:17:19 gateway2 /usr/local/sbin/kamailio[9496]:
ERROR:usrloc:register_udomain: failed to open database connection
Mar 9 13:17:19 gateway2 /usr/local/sbin/kamailio[9496]:
ERROR:registrar:domain_fixup: failed to register domain
Mar 9 13:17:19 gateway2 /usr/local/sbin/kamailio[9496]:
ERROR:core:fix_actions: fixing failed (code=-1) at cfg line 339
Mar 9 13:17:19 gateway2 /usr/local/sbin/kamailio[9496]:
CRITICAL:core:fix_expr: fix_actions error
Mar 9 13:17:19 gateway2 /usr/local/sbin/kamailio[9496]: ERROR:core:main:
failed to fix configuration with err code -1
Mar 9 13:17:19 gateway2 /usr/local/sbin/kamailio[9496]:
DBG:core:destroy_modules: shutting down module auth_db
Mar 9 13:17:19 gateway2 /usr/local/sbin/kamailio[9496]:
DBG:core:destroy_modules: shutting down module auth
Mar 9 13:17:19 gateway2 /usr/local/sbin/kamailio[9496]:
DBG:core:destroy_modules: shutting down module acc
....
username and pw ist default.
i try it on console and login is ok:
gateway2:/usr/local/sbin # mysql -uopenser -h localhost -popenser
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 5894 to server version: 5.0.26
Type 'help;' or '\h' for help. Type '\c' to clear the buffer.
mysql> use openser
Database changed
mysql> Bye
what is wrong in my config?
--
View this message in context: http://www.nabble.com/kamailio-start-with-error-Access-denied-for-user..-tp…
Sent from the OpenSER Users Mailing List mailing list archive at Nabble.com.
Howdy,
Can anyone help me configure my .cfg file to point inbound calls from the pstn gateway to my Trixbox on a sip trunk to Kamailio?
Outbound calls work fine and trunk is registered in local DB.
Cheers,
Taff...
Hello,
I'm trying to add CallForwarding to my kamailio.cfg.
Before relaying an INVITE from one subscriber to another, I'm required
to modify the From username to the PSTN number of the caller. So I use
uac_replace_from and this works fine.
I can see kamailio sendind this record-route:
Record-Route: <sip:192.168.33.2;lr=on;ftag=qunug47bd1hc74ir26iv;vsf=AAAAAERUW1NLXloEeFVZKRYIDAZKBwRPEQYEH1oLCQAEFS5qcA--;did=b76.5c17ed25>
But then, when the callee fails to answer and failure_route is called,
I need to modify the From username to the PSTN number of the callee
before doing the forward. If I simply try to call uac_replace_from
again inside failure_route, record-route is sent with a duplicate vsf
parameter like this:
Record-Route: <sip:192.168.33.2;lr=on;ftag=qunug47bd1hc74ir26iv;vsf=AAAAAERUW1NLXloEeFVZKRYIDAZKBwRPEQYEH1oLCQAEFS5qcA--;did=b76.5c17ed25;vsf=AAAAAERUW1NLXloEeFVeKRYIDAZKBwRPEQYEH1oLCQAEFS5qcA-->
And this causes two problems:
- the message becomes too big and the GW replies with "513 Message too large"
- the reply is sent back to the caller with duplicate From header and
some UAs do not acknowledge the reply.
So, is it possible to modify the From header more than once?
regards,
takeshi
Hello
I need some clarification here; the Help file for this module says this:
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
The module keeps trace of all (or selected ones) incoming request's IP source and blocks the ones that exceeded some limit. Works simultaneous for IPv4 and IPv6 addresses.
The module does not implement any actions on blocking - it just simply reports that there is a high traffic from an IP; what to do, is the administator decision (via scripting).
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
I understand from the first part that it blocks the IPs, but last sentence says otherwise. How is it supposed to work?
txs
jp
I'm hoping to store several gateway IP's in a hash table using HTable,
then grab one of them randomly. Does anyone have a recommendation as to
how this can be done, or perhaps a better way to do it? I chose HTable
because a) I want to reload the values every x minutes and b) I'm using
it for other purposes.
Mike