at one point in my script i need to make this kind of domain_lookup:
xlog("L_INFO", "looking for domain $var(from_uri_domain)\n");
lookup_domain("$fd", "$var(from_uri_domain)");
looks like second argument is not understood. because i get into syslog
Jul 4 20:29:41 localhost /usr/sbin/sip-router[26491]: INFO: looking for domain test.fi
Jul 4 20:29:41 localhost /usr/sbin/sip-router[26491]: ERROR: domain [domain_mod.c:531]: Cannot get domain name to lookup
the latter line comes, when i changed in lookup_domain this DBG to ERR:
if (get_str_fparam(&domain, msg, (fparam_t*)fp) != 0) {
ERR("Cannot get domain name to lookup\n");
return -1;
}
i cannot replace $var(from_uri_domain) with a select.
so is this it? should i go back to the original plan and add attribute
support to k's domain module?
-- juha
line
if (is_local("@ruri.host")) {
in branch_route block that caused "Command cannot be used in the block"
parse error, also caused warning:
0(4462) WARNING: tm [tm.c:503]: WARNING: on_sl_reply("stateless_reply"): empty/non existing route
when i changed the above line to
if (1) {
both the parse error and the warning disappeared. looks like syntax
checking got somehow confused and produced warning on something that was
ok.
-- juha
i tried to replace k domain module with s, but got this kind of show
stopper:
0(3499) : <core> [cfg.y:3020]: parse error in config file, line 1877, column 30: Command cannot be used in the block
the line in question is
if (is_local("@ruri.host")) {
and the block is branch_route block.
can BRANCH_ROUTE be just added to the list
{"is_local", is_local, 1, fixup_var_str_1, REQUEST_ROUTE|FAILURE_ROUTE },
or will it result into problems?
-- juha
Greetings,
I've begun heavily using dlg_bridge() and SEMS for some applications -
dlg_bridge() was a brilliant idea, thank you very much Daniel. This
finally lets me get out of using Asterisk for certain media-related
purposes entirely.
Problem is that the bridge_controller From URI is statically defined in
the configuration. When outbound leg is initiated that, upon pickup, is
REFER'd to an announcement RURI on SEMS, the caller ID hence always
stays the same. Would it be possible to make this parameter dynamic,
i.e. from an AVP?
I suppose a useful workaround in the meantime is to simply override that
RURI with whatever I prefer in an appended RPID header, but in this case
I am dealing with a gateway that does not trust RPID over From. :(
Cheers,
-- 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...
Normally, dial plans are based on some sort of mask. For example, in
Brazil, local fix destination have all 8 digits and start with [2-5]
(mask [2-5][0-9]{7}), local mobile numbers have also 8 digits, but start
with [6-9] (mask [6-9][0-9]{7}); so all local numbers mask would be
[2-9][0-9]{7}... I could continue but You got the idea... ;)
Well, what I'm trying to find is a way to use this kind of definition in
place of (or as) the 'prefix' field, either from LCR or CR module.
The advantages are that with this, not only prefix are matched, but also
some sanity checks, like length, can be done in a single step.
Is this a new feature or is there a way to accomplish this?
Edson.
what are the possible values of 'type' column of 'domain_attrs' table?
it would be nice if s domain module README would contain a reference to
a file where they are described.
-- juha
Module: sip-router
Branch: master
Commit: 9c77d5329b45a493b741527bc8902456dbf51e7e
URL: http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=9c77d53…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Committer: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: Fri Jul 3 20:19:47 2009 +0200
core: km_parse_avp_spec() update
- fallback to ser style of avp name in $avp(id) if 'id' has no ':' and
there is no avp alias defined
- behavior was changed when I added support for K compatible avp aliases
in pv module
- issue reported by Andrei Pelinscu-Onciul
---
usr_avp.c | 8 ++++----
1 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/usr_avp.c b/usr_avp.c
index 6c06721..53f38e4 100644
--- a/usr_avp.c
+++ b/usr_avp.c
@@ -1041,11 +1041,11 @@ int km_parse_avp_spec( str *name, int *type, int_str *avp_name)
p = (char*)memchr((void*)name->s, ':', name->len);
if (p==NULL) {
- /* it's an avp alias */
- return lookup_avp_galias( name, type, avp_name);
- } else {
- return parse_avp_name( name, type, avp_name, &index);
+ /* might be kamailio avp alias or ser avp name style */
+ if(lookup_avp_galias( name, type, avp_name)==0)
+ return 0; /* found */
}
+ return parse_avp_name( name, type, avp_name, &index);
}