I'm am attempting to return a 503 "Service Unavailable" after my
kamailio server sends the provisional response to customer UA if we
cannot find a route for the call. I am using:
t_reply("503", "Service Unavailable");
However this results in:
ERROR:tm:w_t_reply: failed to send a t_reply to a message for which no
transaction-state has been established
Reading up on t_reply, it clearly states: "Sends a stateful reply
after a transaction has been established." So, I guess thats means
even though we have received the invite, and send 100 Trying back, a
transaction does not actually exist.
So, my question is, how do I tell the sending UAC that we are 5XX so
that it can stop sitting there waiting for session progress?
Thanks for any help.
David
On Sat, Apr 11, 2009 at 1:19 PM, David Aldworth <daldworth(a)teliax.com> wrote:
> Is there a way to tell if a transaction already exists before executing
> t_newtran(); ?
I suppose you could use t_check_trans().
But I haven't tried it.
> If the route query scripts executes resulted in a route, but then we get a
> 5XX from upstream, a transactions then exists. When it tries to execute
> t_newtran(); I get the following:
>
> ERROR:tm:t_newtran: transaction already in process 0x2873dd08
>
> If the query did not get a route, and no transaction exists, then executing
> t_newtran(); before the t_reply works perfectly.
>
> Using sl_send_reply works, but if the transaction does exist then it sends
> *two* 5XX messages back to the UAC. This is actually not harmful as far as I
> can tell. But it's not clean either.
I think at any point in the cfg it should be clear to the
reader/writer where a transaction exists or not depending of which
functions were called. I mean, you should know it. If you must
recourse to some function to tell if a transaction exists or not, then
I think the cfg is not clear.
regards,
takeshi
P.S.: please, always CC to the list.
> On Apr 10, 2009, at 10:06 PM, mayamatakeshi wrote:
>
>> On Sat, Apr 11, 2009 at 12:53 PM, David Aldworth <daldworth(a)teliax.com>
>> wrote:
>>>
>>> I'm am attempting to return a 503 "Service Unavailable" after my
>>> kamailio server sends the provisional response to customer UA if we
>>> cannot find a route for the call. I am using:
>>>
>>> t_reply("503", "Service Unavailable");
>>>
>>> However this results in:
>>>
>>> ERROR:tm:w_t_reply: failed to send a t_reply to a message for which no
>>> transaction-state has been established
>>>
>>> Reading up on t_reply, it clearly states: "Sends a stateful reply
>>> after a transaction has been established." So, I guess thats means
>>> even though we have received the invite, and send 100 Trying back, a
>>> transaction does not actually exist.
>>>
>>> So, my question is, how do I tell the sending UAC that we are 5XX so
>>> that it can stop sitting there waiting for session progress?
>>
>> Hello,
>> you can send the reply statelessly:
>> sl_send_reply("503", "Service Unavailable" );
>>
>> or statefully:
>> t_newtran();
>> t_reply("503", "Service Unavailable");
>>
>> Before you can use t_reply, a transaction must be established. This
>> can be done explicitly calling t_newtran() or it will be do internally
>> by other functions like t_relay.
>>
>> regards,
>> takeshi.
>
>
Greetings,
I recently deployed 1.5.0 and was thrilled to have the opportunity to
use the new sqlops module for a purpose that required a lot of custom
database logic, but unfortunately had to roll back to 1.4.4 because a
lot of stuff seemed to be broken in the 'dialog' module. I refuse to
believe that the 'dialog' module was released in such a broken state, so
I am thinking I am problem is that I am neglecting something very
important or that there are some omissions in the documentation.
System is CentOS 64-bit on a dual-CPU quad-core setup with 8 GB of RAM.
Two fundamental problems:
1) get_profile_size() on profiles with no "values" (i.e. inside the
enumerated "profiles_no_value" modparam) crashes.
This problem also exists on 1.4.4. I have not tried other 1.4.x releases.
So, I have:
modparam("dialog", "enable_stats", 1)
modparam("dialog", "hash_size", 65536)
modparam("dialog", "rr_param", "dlgcor")
modparam("dialog", "dlg_flag", 2)
modparam("dialog", "default_timeout", 28800)
modparam("dialog", "dlg_match_mode", 1)
modparam("dialog", "db_mode", 0)
modparam("dialog", "profiles_no_value", "global")
modparam("dialog", "profiles_with_value", "user")
And then, in my INVITE handler for inbound routes:
# Set dialog construction flag.
setflag(2);
# Add this dialog to the global call count profile.
set_dlg_profile("global");
# Add this dialog to a per-customer dialog profile.
set_dlg_profile("user", "$avp(S:user_id)");
# Put out some debugging values for global and customer profiles.
get_profile_size("global", "$var(global_dialog_count)");
get_profile_size("user", "$avp(S:user_id)",
"$var(customer_dialog_count)");
The first get_profile_size() statement crashes--the one that refers to
the profile without values.
According to the GDB backtrace, the crash occurs at
modules/dialog/dialog.c:701:
if(sp_dest->setf(msg, &sp_dest->pvp, (int)EQ_T, &val)<0)
{
LM_ERR("setting profile PV failed\n");
return -1;
}
The cause is that sp_dest is NULL here. I have determined that the
value of 'result' in w_get_profile_size() as passed into this prototype:
static int w_get_profile_size(struct sip_msg *msg, char *profile,
char *value, char *result)
is NULL.
I would conclude from this - not being a developer - that the root cause
is that the config file/route script lexer does not properly distinguish
between the value-less and with-value argument combination of
get_profile_size() that can occur.
A workaround is possible by setting my 'global' profile to be "with
values" as well and using a bogus value key like "1" that is always the
same. However, I do not think this should be happening.
2) The second problem only occurs in 1.5.0 and not in 1.4. It is much
more serious.
It would appear that the dialogs are not actually being inserted into
the profiles - either the global or the per-user ones. I can see from
the debug logs that the dialogs are being tracked because I set the
dialog construction flag (2). I have also tried using dlg_manage().
However, get_profile_size(...) always returns 0 no matter what I do.
---
I find it hard to believe that the 'dialog' module in 1.5.0 was released
with such regressions, and cannot find anything in the devel list
archives or the tracker suggesting that this behaviour has been
elsewhere. My only conclusion is that either I am doing something wrong
or that there is a problem with my environment. Admittedly, I have not
tried reproducing these issues in 32-bit library environment and perhaps
should.
Please help!
-- Alex
--
Alex Balashov
Evariste Systems
Web : http://www.evaristesys.com/
Tel : (+1) (678) 954-0670
Direct : (+1) (678) 954-0671
Mobile : (+1) (678) 237-1775
Hi All,
I know how to use subst function to modify the display name.
But I try to use it with an usr_table like by provisioning in it the
username and the new display name. Nevertheless it seems that subst
doesn't support avp in the substitution string resulting that it print
out "s:displayname" instead of the value.
Is there any workaround to do something like that ?
Regards,
Hello,
I am using dispatcher and LCR. In my failure route I want to log the
IP address of the machine which responded with an error. What is the
pseudo I would use for this? I tried $si, but that appears to always
contain the source IP of the server which issued the first INVITE.
thanks,
Geoff
Hi,
I've just installed openser 3.1. When I try to start the service I am getting the following error. Is this a bug or I am missing something in the setting:
/etc/openser$ sudo openserctl restart
INFO: Stopping OpenSER :
ERROR: No PID file found (/var/run/openser.pid)! OpenSER probably not running
INFO: check with 'ps axw | /bin/egrep openser'
Thanks,
A S
_________________________________________________________________
Rediscover Hotmail®: Get quick friend updates right in your inbox.
http://windowslive.com/RediscoverHotmail?ocid=TXT_TAGLM_WL_HM_Rediscover_Up…
Hello,
Wednesday, April 15, is scheduled to import kamailio modules in the git
repository of sip-router.org. That will become the working place for new
features as Kamailio developers agreed to switch to git.
From now until migration is done, developers should hold any commit for
new features or cosmetic changes to the SVN trunk. The sources will be
imported with entire commit log history plus lot of new patches done
during last weeks to make them compile with sip-router - status at:
http://sip-router.org/wiki/devel/kamailio-integration#module_integration_st…
Even for bug fixes (if it is the case considering Easter holidays) we
should work on 1.5 branch after a bit more private testing before
committing. If some developer has important patches to commit in very
short time, please reply.
Cheers,
Daniel
--
Daniel-Constantin Mierla
http://www.asipto.com/
I need to place a load on our server by generating a large number of SUBSCRIBE messages with a specific Event header type. I've tried sipsak without success. We have PacketGen on a laptop but that is a confusing application. Does anyone have any suggestions for how to generate 50-100 SUBSCRIBE messages per second?
Thanks,steve
Hello,
Does anybody know in which situation the NONCE_REUSED return code for
www_authenticate would appear? I understand the usage of the
STALE_NONCE code, this is when the nonce expires and the servers sends
a new nonce to the phone. But why is the NONCE_REUSED used and why
does it occur sometimes? Should I reject or accept the registration
when this code appears?
typedef enum auth_result {
AUTH_ERROR = -5, /* Error occurred, a reply has not been sent out */
NO_CREDENTIALS, /* Credentials missing */
STALE_NONCE, /* Stale nonce */
INVALID_PASSWORD, /* Invalid password */
USER_UNKNOWN, /* User non existant */
ERROR, /* Error occurred, a reply has been sent out -> */
/* return 0 to the openser core */
AUTHORIZED, /* Authorized. If returned by pre_auth, */
/* no digest authorization necessary */
DO_AUTHORIZATION, /* Can only be returned by pre_auth. */
NONCE_REUSED /* Returned if nonce is used more than once */
/* Means to continue doing authorization */
} auth_result_t;
Many thanks,
Catalina Oancea