I'm attempting to run an existing SER config file under a recent build of sip-router. I get a syntax error on the t_on_failure("noroute") call that exists in my config file. The specific error is "bad expression: type mismatch (str instead of int)". I presume this means sip-router does not support named failure route labels. Is that correct?
Thanks,Steve
---
ISC Networking & Telecommunications
3401 Walnut Street, Suite 221A
Philadelphia, PA 19104
215-573-8396
215-898-9348 (fax)
Hi, i have a problem about the handling of the "cancel" message.
The call flow is this:
A -----------------> (Invite) Proxy (P)
B
(100 Tryng) <---------------------------
----------------->(Invite) B
(100 Tryng) <---------------------------
(183 Progress) <---------------------------
(183 Progress) <---------------------------
(200 OK) <---------------------------
(200 OK) <---------------------------
--------------------------------->(CANCEL)
(200 canceling) <---------------------------
(200 OK) <---------------------------
(200 OK) <---------------------------
----------------->(ACK)
----------------->(ACK)
(BYE) <---------------------------
(BYE) <---------------------------
----------------->(481 Call Leg/Transaction Does Not Exist)
----------------->(481 Call Leg/Transaction Does Not Exist)
The B side answer with OK, after a while , a send a CANCEL. I don't know why
Kamailio don't forward this message to the B side.
B retry to send the OK message, then A send the ACK.
At the end , B send BYE , but A don't have the transactin.
In this situation, kamailio should deliver the "CANCEL" to the B side ?
(even if, before B send the OK )
Or the proxy should not consider the CANCEL because B has answered with
"OK" ?
Where is the error on my configuration ?
Thanks
I have Kamailio 1.5.3 and my configuration is this:
modparam("siptrace", "trace_on", 0)
modparam("carrierroute", "config_source", "db")
modparam("auth_db", "password_column", "ha1")
modparam("auth_db", "use_domain", 1)
modparam("usrloc", "db_mode", 2)
#modparam("usrloc","nat_bflag", 8)
modparam("permissions", "trusted_table", "trusted")
modparam("permissions", "db_mode", 1)
modparam("permissions", "peer_tag_avp", "$avp(i:707)")
modparam("mi_fifo", "fifo_name", "/tmp/kamailio_fifo")
modparam("avpops","avp_table","usr_preferences")
modparam("avpops","attribute_column","attribute")
modparam("avpops","value_column","value")
modparam("uac","from_restore_mode","auto")
modparam("tm", "fr_timer", 12)
modparam("tm", "wt_timer", 32)
modparam("rr", "append_fromtag", 1)
#modparam("rr", "enable_full_lr", 1)
modparam("userblacklist", "use_domain", 0)
#modparam("dialog", "dlg_flag", 2)
modparam("registrar|nathelper", "received_avp", "$avp(i:42)")
#modparam("registrar", "min_expires", 17000)
modparam("acc", "db_flag", 2)
modparam("acc", "db_missed_flag", 3)
modparam("acc", "db_table_acc", "acc")
modparam("acc", "db_table_missed_calls", "missed_calls")
modparam("acc", "detect_direction", 1)
route{
# -----------------------------------------------------------------
# Sanity Check Section
# -----------------------------------------------------------------
if (!mf_process_maxfwd_header("10"))
{
sl_send_reply("483", "Too Many Hops");
exit;
};
if (msg:len > max_len)
{
sl_send_reply("513", "Message Overflow");
exit;
};
# -----------------------------------------------------------------
# Preprocessing
# -----------------------------------------------------------------
if (!method=="REGISTER") record_route();
# -----------------------------------------------------------------
# NAT Detection
# -----------------------------------------------------------------
force_rport();
if (nat_uac_test("19")) {
if (method=="REGISTER") {
fix_nated_register();
} else {
fix_nated_contact();
}
setflag(7);
}
# -----------------------------------------------------------------
#
# -----------------------------------------------------------------
sip_trace();
##Loose_route packets
if (has_totag()) {
if (loose_route()) {
if(method=="BYE") {
#Account BYE
transactions
setflag(2);
};
route(2);
} else {
if ( is_method("ACK") ) {
if ( t_check_trans() ) {
# non
loose-route, but stateful ACK;
# must be an ACK
after a 487 or e.g. 404 from upstream server
t_relay();
exit;
} else {
# ACK without matching
transaction ... ignore and discard.\n");
exit;
}
}
sl_send_reply("404","Not
here");
}
exit;
}
# -----------------------------------------------------------------
# CANCEL processing
# -----------------------------------------------------------------
if (is_method("CANCEL")) {
if (t_check_trans()) t_relay();
exit;
};
t_check_trans();
# -----------------------------------------------------------------
#
# -----------------------------------------------------------------
if (method =="OPTIONS" || method=="SUBSCRIBE") {exit;};
if (method =="REGISTER") {route(3);};
route(1);
}
route[2]
{
t_on_reply("1");
if (!t_relay()) {
sl_reply_error();
};
exit;
}
..
failure_route[2] {
if (t_was_cancelled()) {
# xlog("INFO:cancelled transaction--\n");
exit;
}
revert_uri();
..
t_on_failure("2");
append_branch();
if (!t_relay()) {
exit;
};
}
Hi!
I have a problem with Kamailio. Sometimes (can not catch the moment
and conditions of) situations arise when, calling from AAA to uri XXX
call comes to uri YYY. The call comes from PSTN to the gray subnet of
user-agents registered in kamailio. As the PSTN we using Audiocodes
mediant.
Kamailio ver. 1.5.3
Mediant host: 172.19.32.2, Kamailio host: 172.19.32.3
XXX host: 172.19.32.33, YYY host: 192.168.1.203
I put a line in the log section route_branch:
> Apr 28 12:59:20 sipproxy /ks/sbin/kamailio[18294]: [INFO] new branch at sip:XXX@172.19.32.33:5060;user=phone
Then in the log module acc wrote:
> Apr 28 12:59:21 sipproxy /ks/sbin/kamailio[18302]: ACC: transaction answered: timestamp=1272473961;method=BYE;from_tag=1e76ae41;to_tag=1c1795565414;call_id=17
955646162422000234627(a)172.19.32.2;code=481;reason=Call/Transaction
Does Not Exist;from_uri=sip:XXX@172.19.32.3
<sip%3AXXX(a)172.19.32.3>;from_username=XXX;from_name=;from_domain=
172.19.32.3;to_uri=sip:AAA@172.19.32.2
<sip%3AAAA(a)172.19.32.2>;to_username=AAA;to_name=;to_domain=172.19.32.2;request_uri=sip:AAA@172.19.32.2
<sip%3AAAA(a)172.19.32.2>;request_username=AAA;route_id=;route_name=;route_type_id=;destination=;calllist_id=
Despite the error, the call passes, but to the another uri.
Here's the log of the mediant:
1:
> Apr 28 12:52:31 172.19.32.2 ( lgr_flow)(44244101 ) ---- Outgoing SIP Message to 172.19.32.3:5060 ----
Apr 28 12:52:31 172.19.32.2 ACK sip:XXX@172.19.32.33:5060;user=phone
SIP/2.0^M Via: SIP/2.0/UDP 172.19.32.2;branch=z9hG4bKac1897823584^M
Max-Forwards: 70^M From: <sip:AAA@172.19.32.2
<sip%3AAAA(a)172.19.32.2>>;tag=1c1795565414^M To: <sip:XXX@172.19.32.3
<sip%3AXXX(a)172.19.32.3>>;tag=1e76ae41^M Call-ID:
17955646162422000234627(a)172.19.32.2^M CSeq: 1 ACK Contact:
<sip:AAA@172.19.32.2 <sip%3AAAA(a)172.19.32.2>>^M Route:
<sip:172.19.32.3;lr;ftag=1c1795565414;vsf=AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA->^M
Supported: em,timer,replaces,path,early-session,resource-priority^M
Allow: REGISTER,OPTIONS,INVITE,ACK,CANCEL,BYE,NOTIFY,PRACK,REFER,INFO,SUBSCRIBE,UPDATE^M
*User-Agent: Audiocodes-Sip-Gateway-Mediant 2000/v.5.00A.045.003*^M
Content-Length: 0
As you can see, in 1. all is well. But then:
2:
> ..... ---- Incoming SIP Message from 172.19.32.3:5060 ----
....From: <sip:AAA@172.19.32.2 <sip%3AAAA(a)172.19.32.2>>;tag=1c1795565414^M
> Call-ID: 17955646162422000234627(a)172.19.32.2^M CSeq: 1 INVITE^M Allow:
> INVITE, ACK, CANCEL,OPTIONS, BYE, NOTIFY, REFER, MESSAGE, OPTIONS, INFO^M
> Content-Type: application/sdp^M *User-Agent: Zoiper for Windows rev.1105*^M
> Content-Length: 232^M ^M v=0^M *o=Zoiper_user 0 0 IN IP4 192.168.1.203^M
> s=Zoiper_session^M c=IN IP4 192.168.1.203^*M t=0 0^M m=audio 8000 RTP/AVP
> 8 0 101^M a=rtpmap:8 PCMA/8000^M a=rtpmap:0 PCMU/8000^M a=rtpmap:101
> telephone-event/8000^M a=fmtp:101 0-15^M a=sendrecv
And that is where the substitution occurred at the data fields
'Contact' an entirely different user-agent (uri YYY), which is also
registered on Kamailio. That it eventually comes to call. *Repeat: In
second SIP message from Kamailio 'Contact' field is replaced by
'Contact' of another (!) user-agent (YYY).*
There is a suspicion that an error occurs in a block:
> if (!lookup("location")) {
switch ($retcode) {
case -3:
...
case -1:
...
case -2:
...
}
}
}
I myself anywhere 'Contact' field are not affected, so all suspected
to *locate() *from module Registrar.
Hi to all.
I'm new here.
I'm getting crazy with presence_xml error.
I'm using kamailio 1.5.4 notls with xlite 3.0 (winXP client) softphone and
postgresql 8.4 as db backend.
Seems that presence works, but i have error in parsing xml:
those are the relevant log:
Apr 29 16:42:54 ocs /usr/sbin/kamailio[2462]:
INFO:presence:send_notify_request: NOTIFY
sip:user1@ocs.ita.domain.net<sip%3Auser1(a)ocs.ita.domain.net>via
sip:user1@10.44.17.145:24258 on behalf of
sip:user2@ocs.ita.domain.net<sip%3Auser2(a)ocs.ita.domain.net>for event
presence
Apr 29 16:42:54 ocs /usr/sbin/kamailio[2463]:
ERROR:presence_xml:agregate_xmls: while parsing xml body message
Apr 29 16:42:54 ocs /usr/sbin/kamailio[2463]:
ERROR:presence_xml:pres_agg_nbody: while aggregating body
When i login on kamailio, the users are not immediatly notified to my
presence...but, when there's a change of status, the client are notified and
on softphone the status change.
Other that, if the client close softphone, i can watch this on the log:
Apr 29 16:42:41 ocs /usr/sbin/kamailio[2461]:
ERROR:presence_xml:offline_nbody: while parsing xml memory
Apr 29 16:42:41 ocs /usr/sbin/kamailio[2461]:
ERROR:presence_xml:pres_agg_nbody: while constructing offline body
Apr 29 16:42:41 ocs /usr/sbin/kamailio[2461]:
INFO:presence:send_notify_request: NOTIFY
sip:user1@ocs.ita.domain.net<sip%3Auser1(a)ocs.ita.domain.net>via
sip:user1@10.44.17.145:24258 on behalf of
sip:user3@ocs.ita.domain.net<sip%3Auser3(a)ocs.ita.domain.net>for event
presence
And the client, on the other softphone, results on line, rather then
offline.
I'm thinking about encoding database, i've tryied with SQL ASCII and UTF-8
too. Same behaviour.
I try different releases (1.5.3 no tls) on different distribution (debian,
lucid, alpine linux). Same behaviour.
Obiouvsly, the softphone are right configured (presence agent is enabled).
Any hints?
Thanks for you kind attention.
:: Francesco Colista
:: Email : francesco.colista(a)gmail.com
:: Jabber: francesco(a)jabber.org
Guys,
I'm successfully using a Kamailio + RTPproxy setup in bridge mode with most
of my Gateways. My setup includes two different interfaces one with a public
IP and teh other with the private IP.
Now I'm facing some slight issue. Some providers won't accept my calls (or
calls will have some strange behavior) if the Contact header has an IP out
of immediate range.
I tried to use fix_nated_contact() function but as per my topology, this
function will not change the contact header because the IP is already the
one on the interface.
Example:
U 192.168.200.X:5060 -> 192.168.200.Y:5060
INVITE sip:111160911097@192.168.200.Y SIP/2.0.
Via: SIP/2.0/UDP 192.168.200.X:5060;branch=z9hG4bK096baacc;rport.
From: "Uriel Rozenbaum" <sip:60911100@192.168.200.X>;tag=as32794d5e.
To: <sip:111160911097@192.168.200.Y>.
Contact: <sip:60911100@*192.168.200.X*>.
U 200.A.A.A:5060 -> 200.B.B.B:5060
INVITE sip:898960911097@200.B.B.B SIP/2.0.
Record-Route: <sip:200.A.A.A;r2=on;lr=on;ftag=as32794d5e>.
Record-Route: <sip:192.168.200.Y;r2=on;lr=on;ftag=as32794d5e>.
Via: SIP/2.0/UDP 200.A.A.A;branch=z9hG4bK5222.14fbf4f7.0.
Via: SIP/2.0/UDP
192.168.200.X:5060;received=192.168.200.X;branch=z9hG4bK096baacc;rport=5060.
From: "Uriel Rozenbaum" <sip:60911100@192.168.200.X>;tag=as32794d5e.
To: <sip:111160911097@192.168.200.Y>.
Contact: <sip:60911100@*192.168.200.X*>.
Is there any way to let know Kamailio the outgoing IP I'll be using and fix
the contact accordingly?
I can trigger this change after I know the destination IP.
Thanks!
Uriel
Hello,
What does the following stat mean when you run the " openserctl moni "
sl: received_ACKs = xxxx
I did some digging and I got the following explanation... But am not sure if this is an
error in operser or an error on a message received by openser or what?
" sl: received_ACKs - number of received ACKs due sending negative replies. "
any help is appreciated.
thanks,
--Jignesh
Hi,
We need to add header on the failure route.
Exemple:
On failure 404 Not found, we need add header
Reason: Q.850; cause=1
We tried this in failure_route:
if(t_check_status("404")){
xlog("L_ERR", "404 Not found\n");
append_to_reply("Reason: Q.850; cause=1\r\n");
xlog("L_ERR", "404 Not found apres\n");
exit;
}
and
if(t_check_status("404")){
xlog("L_ERR", "404 Not found\n");
append_hf("Reason: Q.850; cause=1\r\n");
xlog("L_ERR", "404 Not found apres\n");
exit;
}
The twice doesn't work.
Someone can help me?
Thanks,
--
Alexandre Rendour
Acropolis Telecom <http://www.acropolistelecom.net>
<mailto:rendour@acropolistelecom.net>
Adresse : 161-163 avenue Gallieni
Paris - Porte de Bagnolet
93170 Bagnolet
Hello,
a short note that the merging of SIP Express Routers (SER) users mailing
list into sr-users is completed from subscriber point of view:
- posts to serusers(a)lists.iptel.org are directed to
sr-users(a)lists.sip-router.org
- posts to sr-users(a)lists.sip-router.org are received by subscribers of
serusers(a)lists.iptel.org
Just a bit of time ago, kamailio (openser) users' mailing list was
merged as well.
Since the release 3.0.x is practically the same source code, no mater
the binary is compiled as ser or kamailio, and the development is in the
same place (code in same repository), a combined mailing lists
environment is the right for providing the best answers in shortest time
for both communities.
Therefore, now there are two mailing lists:
- sr-users(a)lists.sip-router.org - to be used for discussions about
stable versions and generic project/community topics
- sr-dev(a)lists.sip-router.org - to be used for discussions about devel
version and future development topics
If you were subscribed to both with same email address, you won't get
duplicates. If you had some settings that are no longer in place, please
contact one of devels on sr-dev lists or write to me.
Cheers,
Daniel
--
Daniel-Constantin Mierla
* http://www.asipto.com/
* http://twitter.com/miconda
* http://www.linkedin.com/in/danielconstantinmierla
Hi guys,
I was debugging an install on kamailio 3.0, and was asked to add per
user custom outbound proxies.
To do so, I used load_credentials from auth_db to store the custom route
in an avp, as you can see in the relevant part below.
I noticed a strange thing, POINT 1 show "OK", but POINT 2 shows "KO".
Is it a normal behaviour that avp got deleted after the Dialog PART ?
Regards,
Gled
---------------------------------------------------------------------------------
modparam("auth_db", "load_credentials",
"$avp(s:proxy)=outbound_override;$avp(s:rights)=rights;$avp(s:max_out)=max_out")
route[INVITE_FROM_UAC] {
if (!www_authorize("", "my_user_view")) {
www_challenge("", "1");
}
if ( !($tU =~ $avp(s:rights_ereg)) ) {
sl_send_reply("403","Forbidden");
t_release();
exit();
}
/* POINT 1 */
if ( is_avp_set("$avp(s:proxy)") ) {
xlog("OK");
}
else {
xlog("KO");
}
get_profile_size("outbound","$fU","$avp(calls_out)");
if ( $avp(s:max_out) != 0 && $avp(calls_out) >= $avp(s:max_out) ) {
t_reply("403","Too Many calls");
t_release();
exit();
}
/* Dialog PART */
if (!is_in_profile("outbound")) {
dlg_manage();
set_dlg_profile("outbound","$fU");
}
/* POINT 2 */
if ( is_avp_set("$avp(s:proxy)") ) {
xlog("OK");
}
else {
xlog("KO");
}
}
---------------------------------------------------------------------------------
Hello,
I'm attempting to use the following in Kamailio:
$(hdr(from){re.subst,/(.*?);(.*)/\1/}) --- however it does not match /
replace, with this from header sample:
From: <sip:714364XXXX@XX.XX.XX.XX
;pstn-params=808282808882;cpc=unknown>;tag=gK0b53f6d9
However if this is fully pcre compatible, then I am a bit lost as I've
checked the results in php, perl, and python produces:
From: <sip:714364XXXX@XX.XX.XX.XX (expected result)
However, Kamailio does not match / replace / etc using the following:
xlog("L_INFO", "Test From Header Regex:
$(hdr(from){re.subst,/(.*?);(.*)/\1/})");
Code Samples / Regex Pattern Replacements:
PHP: http://codepad.org/CUttQH1r
Perl: http://codepad.org/ZfAO4X5v
Python: http://codepad.org/T14SYWkZ
Any comments / help / etc is always appreciated, look forward to hearing
back from you all!
Sincerely,
Brandon Armstead