Hi!
I use acc module with extra accounting.
modparam("acc", "db_extra", "direction=$avp(direction)")
I set $avp(direction) during request processing (in main request route).
The value stored with INVITE and BYE is fine, but ACK requests do not
have the assigned value, but the same value as the INVITE request.
Is this by design? Is this a limitation of tm and AVPs?
Thanks
Klaus
Hi, I get a prefix string from a database and store it in
$var(prefix). Such prefix can contain any number of digits (no fixed
length).
Now I must to check if the RURI username begins with that prefix and
in that case strip it.
I can get the first step (detect it) using pcre_match function:
if pcre_match("$rU", "^$var(prefix)") {
# Prefix match.
But I cannot get the second part working (stripping it). I've tryed everything:
- strip() is not valid as just allows an integer (no pv).
- subst_user() doesn't accept pv:
if subst_user("/^$var(prefix)(.*)$/\1/")
Any ideas please? Thanks a lot.
--
Iñaki Baz Castillo
<ibc(a)aliax.net>
Hi all,
I'm tryting to implement a E164 normalizer using the dialplan module,
by now I have 3 simple rules:
dpid priority matchop matchex matchlen subsex replaceex attributes
0 1 1 (00|\+)([1-9][0-9]+) 0 (00|\+)([1-9][0-9]+) \2
0 1 1 ([5-9][0-9]{8}) 0 ([5-9][0-9]{8}) 34\1
The first rule 'it's supposed' to remove + or 00 from full qualified E164 numbers,
the seccond rule 'should' add 34 as prefix to all 'valid' spanish numbers, they was
running on some little test I did, but when try to put them on pre-production enviroment
I get strage results.
I call dp_translate as dp_translate("0","$rU/$rU");
And this what I get :
Input RURI Output RURI
900XXXXXX(a)dom.tld XXXXXX(a)dom.tld
And the quetion is why?, are my match rules wrong? why subex and matchex must be the same?
Best regards.
--
Raul Alexis Betancor Santana
Dimension Virtual S.L.
Hello list,
I am afraid I am asking something stupid but I cannot find a way to do this cleanly, so here it goes....
I am retrieving values from a db using either carrierroute or mtree modules to send a 302 to my softswitch. It expects the message as:
SIP/2.0 302 Moved Temporarily
Via: SIP/2.0/UDP 134.111.48.66:5060;branch=zgfdgdfgf2491b5437
Contact: <sip:989897@X.X.X.X;rg=4003>;q=0.2
Contact: <sip:989897@X.X.X.X:rg=321>;q=0.8
To: <sip:989897@X.X.X.X:5066>;tag=1
.....
Where the important things are the rg: those are the trunks in the SS) and the q (probability) and there can be multiple rgs for the same prefix (2 in this example)
My idea was to keep in the db something like this:
Prefix:98
Route:4003,0.2|321,0.8
And then inject those values in the contact header, but I am having a hard time finding the right way to do it. Is there any way to do it without calling the perl module?
Many thanks,
A
Hi, I would like to summarize how $avp's and $var's handle the null
value, 0 and empty string. For this I've writen the following test
I've checked in Kamailio 1.5.4:
--------------------------
$var(null) = null;
$avp(s:null) = null;
$var(empty) = "";
$avp(s:empty) = "";
xlog("var(null): '$var(null)'\n");
if $var(null) == null
xlog("*** if var(null) == null \n");
if $var(null)
xlog("*** if var(null) \n");
if $var(null) != null
xlog("*** if var(null) != null \n");
if ! $var(null)
xlog("*** if ! var(null) \n");
if $var(null) == ''
xlog("*** if var(null) == '' \n");
if $var(null) == 0
xlog("*** if var(null) == 0 \n");
xlog("\n");
xlog("avp(s:null): '$avp(s:null)'\n");
if $avp(s:null) == null
xlog("*** if avp(s:null) == null \n");
if $avp(s:null)
xlog("*** if avp(s:null) \n");
if $avp(s:null) != null
xlog("*** if avp(s:null) != null \n");
if ! $avp(s:null)
xlog("*** if ! avp(s:null) \n");
if $avp(s:null) == ''
xlog("*** if avp(s:null) == '' \n");
if $avp(s:null) == 0
xlog("*** if avp(s:null) == 0 \n");
xlog("\n");
xlog("var(empty): '$var(empty)'\n");
if $var(empty) == null
xlog("*** if var(empty) == null \n");
if $var(empty)
xlog("*** if var(empty) \n");
if $var(empty) != null
xlog("*** if var(empty) != null \n");
if ! $var(empty)
xlog("*** if ! var(empty) \n");
if $var(empty) == ''
xlog("*** if var(empty) == '' \n");
if $var(empty)== 0
xlog("*** if var(empty) == 0 \n");
xlog("\n");
xlog("avp(s:empty): '$avp(s:empty)' \n");
if $avp(s:empty) == null
xlog("*** if avp(s:empty) == null \n");
if $avp(s:empty)
xlog("*** if avp(s:empty) \n");
if $avp(s:empty) != null
xlog("*** if avp(s:empty) != null \n");
if ! $avp(s:empty)
xlog("*** if ! avp(s:empty) \n");
if $avp(s:empty) == ''
xlog("*** if avp(s:empty) == '' \n");
if $avp(s:empty) == 0
xlog("*** if avp(s:empty) == 0 \n");
-------------------------
The result is:
-------------------------
var(null): '0'
*** if var(null) != null
*** if ! var(null)
*** if var(null) == 0
avp(s:null): '<null>'
*** if avp(s:null) == null
*** if ! avp(s:null)
var(empty): ''
*** if var(empty) != null
*** if ! var(empty)
*** if var(empty) == ''
CRITICAL:core:comp_scriptvar: invalid operation 20/3/4!!
WARNING:core:do_action: error in expression (l=356)
avp(s:empty): ''
*** if avp(s:empty) != null
*** if ! avp(s:empty)
*** if avp(s:empty) == ''
CRITICAL:core:comp_scriptvar: invalid operation 20/3/4!!
WARNING:core:do_action: error in expression (l=372)
-------------------------
Conclusions:
- $var cannot store null value. If so it converts it to 0.
- When cheking "if $avp(...) {" the result is false in case the
content of the $avp is null, 0 or an empty string.
- When cheking "if $var(...) {" the result is false in case the
content of the $var is 0 or an empty string.
Any thoughts on this?
Regards.
--
Iñaki Baz Castillo
<ibc(a)aliax.net>
Hi
I have problem with force_rtp_proxy. Kamailio server have multi network
interfaces. I have two PSTN GW-s. And If is something wrong with first
one, the call is send to the second via PSTN failover route. When I send
call to the first GW I'm calling force_rtp_proxy("oc","10.10.10.1"); But
the first GW respond with 404 Not found, so I send INVITE to the second
GW with calling force_rtp_proxy("oc","10.10.20.1"); In SDP I see double
IP's :
o=root 26366 26367 IN IP4 10.10.10.110.10.20.1
s=session
c=IN IP4 10.10.10.110.10.20.1
How to resolve that?
Thank you
Ernest
Hi
I have problem with force_rtp_proxy. Kamailio server have multi network
interfaces. I have two PSTN GW-s. And If is something wrong with first
one, the call is send to the second via PSTN failover route. When I send
call to the first GW I'm calling force_rtp_proxy("oc","10.10.10.1"); But
the first GW respond with 404 Not found, so I send INVITE to the second
GW with calling force_rtp_proxy("oc","10.10.20.1"); In SDP I see double
IP's :
o=root 26366 26367 IN IP4 10.10.10.110.10.20.1
s=session
c=IN IP4 10.10.10.110.10.20.1
How to resolve that?
Thank you
Ernest
please keep the list cc-ed.
On 9/14/10 10:53 AM, Vijayalakshmi wrote:
> Daniel,
> Yes, I need to port SER to my server. I tried with liposip2. But
> haven't got my result...
have you tried to compile it? What is the C compiler of this OS? Does it
have support for makefile system?
Cheers,
Daniel
>
> Regards.
> Lakshmi Marudhanayagam
>
> Daniel-Constantin Mierla wrote:
>> Hello,
>>
>> On 9/14/10 8:00 AM, Lakshmi Marudhanayagam wrote:
>>> Hi,
>>>
>>> Iam trying to develop a SIP server in VxWorks. Please assist me
>>> with how to
>>> implement SIP in my Server. Where do I get these info...????
>>>
>>>
>> do you need to develop a new one (writing from scratch) or port
>> kamailio/ser to this os? Have you tried to compile kamailio on it?
>>
>> Cheers,
>> Daniel
>>
>
--
Daniel-Constantin Mierla
http://www.asipto.com
Hi,
Siremis, the web management interface for Kamailio, released v1.0.1. It
is a patch update with fixes since v1.0.0. More about it at:
http://siremis.asipto.com/2010/09/14/siremis-v1-0-1-released/
The series 1.0.x will be kept compatible with Kamailio 3.0.x. A new
major release is baked these days (new UI and features) to work with
upcoming 3.1.0.
Regards,
Ramona
--
http://www.asipto.com
Hi
I am exploring the applicability of pdb module in finnish number portability scheme.
Looks like carrier id 000 cannot be used as zero is already reserved for
"the number could not be found" result in pdb protocol.
(Queries seem to work after I changed MIN_PDB_CARRIERID in common.h to 0,
but unfortunately that configuration just does not make sense.)
Is there any way out of this other than using internally different
value for carrier 0?
I rather use correct ids if somehow possible to avoid mapping logic in
routing script.
Note about help text consistency:
When going through pdbt.c there is this comment above import_csv function:
/*
Read a csv list from the given file and build a dtree structure.
Format of lines in csv file: "<number prefix>;<carrier id>".
Format of carrier id: "D[0-9][0-9][0-9]".
Returns the number of lines imported or -1 on error.
*/
Isn't the third line incorrect?
Same thing also in help text output of pdbt -h.
docs/data_format.txt mentions letter D only in front of carrier name file.
What is the meaning of D anyway in this context?
Here is my awk pipe contribution to scripts/get_carrier_names_finland.sh:
curl -o - "http://www2.ficora.fi/numerointi/nure_numbering.asp?nums=tot&lang=en" | awk '/<tbody>/, /<\/tbody>/' | awk -F"</td" -v RS="</tr" '{ gsub(/.*>/,"",$1) gsub(/.*>/,"",$2); gsub(/ä/,"ä",$2); gsub(/Å/,"Å",$2); gsub(/ö/,"ö",$2); if ( $2 != "") { printf "D%.3d %s\n",$1,$2 } }'
--
Mikko Lehto