[OpenSIPS-Users] SIP Reg with radius

2022-02-12 Thread Vishal Pai
Hello Team

I am new to Opensips. Can we have the sip registration to lookup for auth
in Radius if yes then we can forward the sip invite to PBX with a unique
header.

Is there any document in opensips for reference with radius for
authentication.

Thanks
___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


Re: [OpenSIPS-Users] SHM Memory issue

2019-01-24 Thread Vishal Pai
I am getting this

[image: grep.PNG]

On Fri, Jan 25, 2019 at 10:33 AM Alexey Kazantsev via Users <
users@lists.opensips.org> wrote:

> Hi Vishal,
>
> what's the output of
>
>ps aux | grep [o]pensips
>
> command? It should show the value of '-m' parameter.
>
>
> ---
> BR, Alexey
> http://alexeyka.zantsev.com/
> ___
> Users mailing list
> Users@lists.opensips.org
> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>
___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


[OpenSIPS-Users] SHM Memory issue

2019-01-24 Thread Vishal Pai
Hello everyone

I am using opensips version

version: opensips 2.4.3 (x86_64/linux)
flags: STATS: On, DISABLE_NAGLE, USE_MCAST, SHM_MMAP, PKG_MALLOC, F_MALLOC,
FAST_LOCK-ADAPTIVE_WAIT
ADAPTIVE_WAIT_LOOPS=1024, MAX_RECV_BUFFER_SIZE 262144, MAX_LISTEN 16,
MAX_URI_SIZE 1024, BUF_SIZE 65535
poll method support: poll, epoll, sigio_rt, select.
git revision: c49ae1d53


I am getting when there is increase the number of calls

Jan 24 19:51:20 ns101756 /usr/local/sbin/opensips[1431]:
ERROR:core:fm_malloc: not enough free shm memory (59920 bytes left, need
432), please increase the "-m" command line parameter!
Jan 24 19:51:20 ns101756 /usr/local/sbin/opensips[1431]:
INFO:core:fm_malloc: attempting defragmentation...
Jan 24 19:51:20 ns101756 /usr/local/sbin/opensips[1423]:
WARNING:core:utimer_ticker: utimer task  already scheduled for
30849800 ms (now 31196060 ms), it may overlap..
Jan 24 19:51:20 ns101756 /usr/local/sbin/opensips[1431]:
INFO:core:fm_malloc: unable to alloc a big enough fragment!
Jan 24 19:51:20 ns101756 /usr/local/sbin/opensips[1431]:
ERROR:tm:build_local: no more share memory
Jan 24 19:51:20 ns101756 /usr/local/sbin/opensips[1431]:
ERROR:tm:cancel_branch: attempt to build a CANCEL failed

Think it's memory issue. What is the best way to fix it up.
___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


[OpenSIPS-Users] Opensips caching

2019-01-16 Thread Vishal Pai
Hello everyone

what is the best way to implement the caching in opensips. I am doing
following

we have a rate table with NPANXX with rate per minute. Every time when we
do outbound calls we get NPANXX of dialed number and search it in database.
Since in this way it will create a load on cpu for each select query.

Can anyone help me in this also let me know if there is any caching
functionality is available in opensips ?


Vishal Pai
___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


Re: [OpenSIPS-Users] Manage LRN response for invite

2018-12-13 Thread Vishal Pai
Thank you Jon. It worked.

On Tue, Dec 11, 2018 at 5:42 PM Jon Abrams  wrote:

> I do something like this to pull the rn field from the response:
>
> if(t_check_status("302")) {
> $var(contact) = $(hdr(Contact));
> $avp(lrn_called) = $(var(contact){nameaddr.uri}{param.value,rn});
> }
>
> On Tue, Dec 11, 2018 at 5:24 AM Vishal Pai  wrote:
>
>> Hello All
>>
>> I am implementing LRN using sip invite how i can get the rn value of
>> response received for the request in a variable. What i did is
>>
>> Invite
>>
>> SIP/2.0 302 Moved Temporarily
>> Via: SIP/2.0/UDP XXX.XX.XX.XXX:5060;branch=z9hG4bK1cc7.f7
>> From: "31XX00" ;tag=
>> To: ;tag=6b20a7d3
>> Call-ID: 03b3850628d1d60d2341cc2c39ae15b7@192.168.1.100:5
>> CSeq: 102 INVITE
>> *Contact: *
>> Location-Info: N
>> Content-Length: 0
>>
>>  if(t_check_status("302")) {
>> $var(lrn_rpl) = $(ct.fields(uri){param.value,rn});
>> xlog("SCRIPT:LRN Received : $var(lrn_rpl) \n");
>>  }
>>
>> Here i am getting NULL value in $var(lrn_rpl) variable.
>>
>> Can anyone let me know what i am doing wrong here.
>>
>>
>> ___
>> Users mailing list
>> Users@lists.opensips.org
>> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>>
> ___
> Users mailing list
> Users@lists.opensips.org
> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>
___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


[OpenSIPS-Users] Manage LRN response for invite

2018-12-11 Thread Vishal Pai
Hello All

I am implementing LRN using sip invite how i can get the rn value of
response received for the request in a variable. What i did is

Invite

SIP/2.0 302 Moved Temporarily
Via: SIP/2.0/UDP XXX.XX.XX.XXX:5060;branch=z9hG4bK1cc7.f7
From: "31XX00" ;tag=
To: ;tag=6b20a7d3
Call-ID: 03b3850628d1d60d2341cc2c39ae15b7@192.168.1.100:5
CSeq: 102 INVITE
*Contact: *
Location-Info: N
Content-Length: 0

 if(t_check_status("302")) {
$var(lrn_rpl) = $(ct.fields(uri){param.value,rn});
xlog("SCRIPT:LRN Received : $var(lrn_rpl) \n");
 }

Here i am getting NULL value in $var(lrn_rpl) variable.

Can anyone let me know what i am doing wrong here.
___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


Re: [OpenSIPS-Users] Replace $tU value

2018-11-27 Thread Vishal Pai
It worked.

Thank You Bogdan

On Tue, Nov 27, 2018 at 2:20 AM Bogdan-Andrei Iancu 
wrote:

> Hi,
>
> uac_replace_to("sip:9876543210@$td");
>
> should do it - you need to call it only for the initial INVITE.
>
> Regards,
>
> Bogdan-Andrei Iancu
>
> OpenSIPS Founder and Developer
>   http://www.opensips-solutions.com
> OpenSIPS Bootcamp 2018
>   http://opensips.org/training/OpenSIPS_Bootcamp_2018/
>
> On 11/26/2018 09:01 PM, Vishal Pai wrote:
>
> Hi Bogdan,
>
> Thank you for your quick response.
>
> I have tried both the way still unable to overwrite the value.
>
> uac_replace_to("$tU","9876543210");
> uac_replace_to("9876543210","$tU");
>
> Can you please let me know the right way to achieve this.
>
> Thanks
>
>
> On Mon, Nov 26, 2018 at 10:59 PM Bogdan-Andrei Iancu 
> wrote:
>
>> Hi Vishal,
>>
>> use uac_replace_to() function:
>>
>> http://www.opensips.org/html/docs/modules/2.4.x/uac.html#func_uac_replace_from
>>
>> Regards,
>>
>> Bogdan-Andrei Iancu
>>
>> OpenSIPS Founder and Developer
>>   http://www.opensips-solutions.com
>> OpenSIPS Bootcamp 2018
>>   http://opensips.org/training/OpenSIPS_Bootcamp_2018/
>>
>> On 11/26/2018 06:42 PM, Vishal Pai wrote:
>>
>> Hello Everyone
>>
>> Is it possible to update the $tU value to new one. Let say $tU =
>> 1234567890 need to overwrite to $tU = 9876543210 how i can achieve that.
>>
>>
>> ___
>> Users mailing 
>> listUsers@lists.opensips.orghttp://lists.opensips.org/cgi-bin/mailman/listinfo/users
>>
>>
>>
>
___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


Re: [OpenSIPS-Users] Replace $tU value

2018-11-26 Thread Vishal Pai
Hi Bogdan,

Thank you for your quick response.

I have tried both the way still unable to overwrite the value.

uac_replace_to("$tU","9876543210");
uac_replace_to("9876543210","$tU");

Can you please let me know the right way to achieve this.

Thanks


On Mon, Nov 26, 2018 at 10:59 PM Bogdan-Andrei Iancu 
wrote:

> Hi Vishal,
>
> use uac_replace_to() function:
>
> http://www.opensips.org/html/docs/modules/2.4.x/uac.html#func_uac_replace_from
>
> Regards,
>
> Bogdan-Andrei Iancu
>
> OpenSIPS Founder and Developer
>   http://www.opensips-solutions.com
> OpenSIPS Bootcamp 2018
>   http://opensips.org/training/OpenSIPS_Bootcamp_2018/
>
> On 11/26/2018 06:42 PM, Vishal Pai wrote:
>
> Hello Everyone
>
> Is it possible to update the $tU value to new one. Let say $tU =
> 1234567890 need to overwrite to $tU = 9876543210 how i can achieve that.
>
>
> ___
> Users mailing 
> listUsers@lists.opensips.orghttp://lists.opensips.org/cgi-bin/mailman/listinfo/users
>
>
>
___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


[OpenSIPS-Users] Replace $tU value

2018-11-26 Thread Vishal Pai
Hello Everyone

Is it possible to update the $tU value to new one. Let say $tU = 1234567890
need to overwrite to $tU = 9876543210 how i can achieve that.
___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


[OpenSIPS-Users] cache store local

2018-10-29 Thread Vishal Pai
Hello everyone

I want to store $ci in local cache but i am unable to do that in Opensips
2.4

Here is what i have did

Let $ci = 220569877bd3fca37e1c37f4483e1250@192.168.1.100:5060

modparam("cachedb_local", "cachedb_url", "local://")

cache_store("local","$ci","1");

but when i am fetching it i am getting NULL / Empty value

cache_fetch("local","$ci",$avp(ci));

$avp(ci) is NULL

Can anyone help me to do this or can suggest other way to do this.

Thanks
Vishal Pai
___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


[OpenSIPS-Users] regex match

2018-10-03 Thread Vishal Pai
Hello Everyone

Is it possible to do regex match in opensips configuration file?

Let's say we have 12125789000 and we have regex expression

^(\+1|1)?([2-9][0-9][0-9][2-9][0-9][0-9])([0-9]{4})$

then the result would be

Group #1: 1
Group #2: 212578
Group #3: 9000

Need to take Group #2 value in $var(x).

Thanks
___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


Re: [OpenSIPS-Users] Get NPANXX from a number

2018-10-03 Thread Vishal Pai
Thanks for help.

On Wed, Oct 3, 2018 at 1:04 AM Bogdan-Andrei Iancu 
wrote:

> Hi Vishal,
>
> $var(x) = $(rU{s.substr,0,7));
>
> See http://www.opensips.org/Documentation/Script-Tran-2-4#toc5 ; $rU is
> the dialed username in RURI.
>
> Regards,
>
> Bogdan-Andrei Iancu
>
> OpenSIPS Founder and Developer
>   http://www.opensips-solutions.com
> OpenSIPS Bootcamp 2018
>   http://opensips.org/training/OpenSIPS_Bootcamp_2018/
>
> On 10/02/2018 09:53 PM, Vishal Pai wrote:
>
> Hi All
>
> I need a way in configuration file where i can take out NPANXX from the
> callee number.
>
> For Example
>
> Callee = 1318900
>
> Then function/code should return 318900.
>
> Thanks
>
>
> ___
> Users mailing 
> listUsers@lists.opensips.orghttp://lists.opensips.org/cgi-bin/mailman/listinfo/users
>
>
>
___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


[OpenSIPS-Users] Get NPANXX from a number

2018-10-02 Thread Vishal Pai
Hi All

I need a way in configuration file where i can take out NPANXX from the
callee number.

For Example

Callee = 1318900

Then function/code should return 318900.

Thanks
___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


Re: [OpenSIPS-Users] To get prefix from dialed number

2018-10-02 Thread Vishal Pai
Thank you

On Tue, Oct 2, 2018 at 12:26 AM Nick Altmann  wrote:

> Use s.substr transformation.
> http://www.opensips.org/Documentation/Script-Tran-2-4
>
>
> 2018-10-01 21:41 GMT+03:00 Vishal Pai :
>
>> Hi All
>>
>> I need a proper way to separate out the prefix from the dialed number.
>> For example if i am dialing number 98981234567890 then i need to store 9898
>> in a variable.
>>
>> Thanks
>>
>> ___
>> Users mailing list
>> Users@lists.opensips.org
>> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>>
>>
> ___
> Users mailing list
> Users@lists.opensips.org
> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>
___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


[OpenSIPS-Users] To get prefix from dialed number

2018-10-01 Thread Vishal Pai
Hi All

I need a proper way to separate out the prefix from the dialed number. For
example if i am dialing number 98981234567890 then i need to store 9898 in
a variable.

Thanks
___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


Re: [OpenSIPS-Users] Opensips 2.4 AAA_radius

2018-06-06 Thread Vishal Pai
Hi Bogdan

It worked.

Thanks

On Tue, Jun 5, 2018 at 2:16 PM, Bogdan-Andrei Iancu 
wrote:

> Hi Vishal,
>
> If you do not need the radius async support, just install the radiusclient
> lib + dev packages on your system. To compile the module with RADIUSCLIENT
> support do:
>
> > RADIUSCLIENT=RADIUSCLIENT make modules modules=moudles/aaa_radius
>
> Regards,
>
> Bogdan-Andrei Iancu
>
> OpenSIPS Founder and Developer
>   http://www.opensips-solutions.com
> OpenSIPS Summit 2018
>   http://www.opensips.org/events/Summit-2018Amsterdam
>
> On 06/03/2018 06:00 PM, Vishal Pai wrote:
>
> Hi All
>
> I want to compile aaa_radius on opensips 2.4. I am using External
> Libraries RADIUSCLIENT. My question is how i can compile the opensips 2.4
> source.
>
> As i read the document
>
> http://www.opensips.org/html/docs/modules/2.4.x/aaa_radius.html#idp4684960
>
> There are 3 options RADCLI, FREERADIUS, RADIUSCLIENT. need to compile only
> RADIUSCLIENT .
>
>
> Thanks
> Vishal Pai
>
>
> ___
> Users mailing 
> listUsers@lists.opensips.orghttp://lists.opensips.org/cgi-bin/mailman/listinfo/users
>
>
>
___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


[OpenSIPS-Users] Opensips 2.4 AAA_radius

2018-06-03 Thread Vishal Pai
Hi All

I want to compile aaa_radius on opensips 2.4. I am using External Libraries
RADIUSCLIENT. My question is how i can compile the opensips 2.4 source.

As i read the document

http://www.opensips.org/html/docs/modules/2.4.x/aaa_radius.html#idp4684960

There are 3 options RADCLI, FREERADIUS, RADIUSCLIENT. need to compile only
RADIUSCLIENT .


Thanks
Vishal Pai
___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


[OpenSIPS-Users] Upgrade opensips

2018-02-02 Thread Vishal Pai
Hello all,

I want to upgrade  my existing system developed on opensips version 1.10
 to opensips version 2.2.


What is best possible to do this without any issue.
___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


Re: [OpenSIPS-Users] avp_db_query for Insert, Update and Delete

2018-01-03 Thread Vishal Pai
Yeah.. I tried and it’s working like charm.


Thanks..





On Wed, 3 Jan 2018 at 7:53 PM, Bogdan-Andrei Iancu <bog...@opensips.org>
wrote:

> Hello Vishal,
>
> A Happy New Year too !
>
> With the avp_db_query() you can run any kind of raw query, so just write
> your SQL query exactly as you do in your mysql client CLI.
>
> Regards,
>
> Bogdan-Andrei Iancu
>
> OpenSIPS Founder and Developer
>   http://www.opensips-solutions.com
> OpenSIPS Summit 2018
>   http://www.opensips.org/events/Summit-2018Amsterdam
>
> On 01/01/2018 07:16 PM, Vishal Pai wrote:
>
> Hi Everyone
>
> Merry Christmas and Happy New Year to all.
>
> As i am new to opensips, I just want to know what is the best possible way
> to do Insert, Update and Delete using avp_db_query.
>
>
> Thanks
> Vishal Pai
>
>
> ___
> Users mailing 
> listUsers@lists.opensips.orghttp://lists.opensips.org/cgi-bin/mailman/listinfo/users
>
>
>
___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


[OpenSIPS-Users] avp_db_query for Insert, Update and Delete

2018-01-01 Thread Vishal Pai
Hi Everyone

Merry Christmas and Happy New Year to all.

As i am new to opensips, I just want to know what is the best possible way
to do Insert, Update and Delete using avp_db_query.


Thanks
Vishal Pai
___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


Re: [OpenSIPS-Users] Regarding avp_db_query

2017-11-27 Thread Vishal Pai
Thanks i got that


On Mon, Nov 27, 2017 at 2:03 PM, Răzvan Crainea <raz...@opensips.org> wrote:

> Hi, Vishal!
>
> You can find the answer to your question in the function's documentation[1]:
> If the result gives many rows, then multiple AVPs with corresponding name
> will be added.
>
> Consider the following query:
> avp_db_query("select group where username='$tu'", "$avp(group)");
>
> The first line of the result can be accessed using $avp(group) (or
> $(avp(group)[0])), the second line $(avp(group)[1]), and so on.
>
> [1] http://www.opensips.org/html/docs/modules/2.4.x/avpops.html#idp3469424
>
> Best regards,
>
> Răzvan Crainea
> OpenSIPS Developerwww.opensips-solutions.com
>
> On 11/24/2017 08:56 PM, Vishal Pai wrote:
>
> Hi Everyone
>
> I just want to know what is correct to fetch all the row from database
> using avp_db_query. Currently I am getting only first row in result.
>
> One more think I want to know is it possible to get array of for variable
> in Opensips configuration file.
>
>
> Thanks
>
> Vishal Pai
>
>
> ___
> Users mailing 
> listUsers@lists.opensips.orghttp://lists.opensips.org/cgi-bin/mailman/listinfo/users
>
>
>
> ___
> Users mailing list
> Users@lists.opensips.org
> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>
>
___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


Re: [OpenSIPS-Users] Opensips basic

2017-11-24 Thread Vishal Pai
Thanks Younas.

On Sat, Nov 25, 2017 at 1:25 AM, Aqs Younas <aqsyou...@gmail.com> wrote:

> There is no such command to reload configuration. You had to restart it.
>
> On 24 Nov 2017 11:51 pm, "Vishal Pai" <vishalm...@gmail.com> wrote:
>
>> Hello!
>>
>> I am newbie in OpenSIPS. I just want to know what is command to reload
>> opensips after updating .cfg file. Or I just need to restart it.
>>
>>
>>
>>
>> Thanks
>> Vishal Pai
>>
>>
>>
>>
>>
>> ___
>> Users mailing list
>> Users@lists.opensips.org
>> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>>
>>
> ___
> Users mailing list
> Users@lists.opensips.org
> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>
>
___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


[OpenSIPS-Users] Regarding avp_db_query

2017-11-24 Thread Vishal Pai
Hi Everyone

I just want to know what is correct to fetch all the row from database
using avp_db_query. Currently I am getting only first row in result.

One more think I want to know is it possible to get array of for variable
in Opensips configuration file.


Thanks

Vishal Pai
___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


[OpenSIPS-Users] Opensips basic

2017-11-24 Thread Vishal Pai
Hello!

I am newbie in OpenSIPS. I just want to know what is command to reload
opensips after updating .cfg file. Or I just need to restart it.




Thanks
Vishal Pai
___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users