[OpenSIPS-Users] user location in mongodb

2018-01-31 Thread Jayesh Nambiar
Hello,
I am running opensips 2.3.2 stable. I wanted to know if mongodb can be used
for storing the user location information with opensips cachedb_mongodb
module?
Quick googling didnt give me any clarity if it is possible or not. Before
doing anything, I wanted to know if this is possible with opensips.

Thanks,

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


[OpenSIPS-Users] raw mongodb query json parse error

2017-12-01 Thread Jayesh Nambiar
Hi All,
I've been playing around with executing raw mongodb queries with opensips
2.3.2. Though I can run and execute queries successfully I cannot figure
how to write a query that queries the objectId in mongodb directly.
The raw query basically is:

db.runCommand({ find: "customers", filter: {
"_id":ObjectId("5a212d183f1e5e1c7b11b194") } });

But When i write it in the script as:

cache_raw_query("mongodb:instance1", "{ \"find\": \"customers\",
\"filter\": { \"_id\": ObjectId(\"5a212d183f1e5e1c7b11b194\")
}}","$avp(out)");

opensips gives json parsing error. It basically expects the entire ObjectId
string to be in inverted commas to be a valid json. Any ideas on how to
successfully write the above working query in opensips to pass as a raw
query.

Thanks,

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


[OpenSIPS-Users] correct usage of the remove function in registrar module

2015-11-23 Thread Jayesh Nambiar
Hi,
Can someone please confirm if remove function in registrar module
works as expected. If my UL SHOW shows this, what shouldbe used to
remove this particular contact only form the location:
ecef74d17522a634b0412c at abc.com
Contact:: sip:ecef74d17522a634b0412c at
11.22.33.44:54332;rinstance=ca9915acb1b3e3a1;transport=tls
Q=
Expires:: 137
Callid:: YTdlZjVjNzMxYTg1ZWI5ZTZkMDgzODJiYmMyZjA5MzQ.
Cseq:: 1
User-agent:: v2.0beta_ios
Path:: 
State:: CS_NEW
Flags:: 0
Cflags:: 30
Socket:: udp:55.66.77.88:7300
Methods:: 1391

I assumed it to be remove("location", "cef74d17522a634b0412c at
abc.com", "sip:ecef74d17522a634b0412c at 11.22.33.44:54332")

I tried this but didn't work. If this is correct I'll log and check if
this is exactly what I'm passing to the remove function and check
whats wrong.

Thanks,

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


Re: [OpenSIPS-Users] remove function not working for specific contact

2015-11-20 Thread Jayesh Nambiar
Hi,
Alright, can someone please confirm if remove function in registrar module
works as expected. If my UL SHOW shows this, what should be used to remove
this particular contact only form the location:
ecef74d17522a634b04...@abc.com
Contact:: 
sip:ecef74d17522a634b0412c@11.22.33.44:54332;rinstance=ca9915acb1b3e3a1;transport=tls
Q=
Expires:: 137
Callid:: YTdlZjVjNzMxYTg1ZWI5ZTZkMDgzODJiYmMyZjA5MzQ.
Cseq:: 1
User-agent:: v2.0beta_ios
Path:: 
State:: CS_NEW
Flags:: 0
Cflags:: 30
Socket:: udp:55.66.77.88:7300
Methods:: 1391

I assumed it to be remove("location", "cef74d17522a634b04...@abc.com", "
sip:ecef74d17522a634b0412c@11.22.33.44:54332")
I tried this but didn't work. If this is correct I'll log and check if this
is exactly what I'm passing to the remove function and check whats wrong.

Thanks,
- Jayesh



On Tue, Nov 17, 2015 at 3:32 PM Jayesh Nambiar  wrote:

> Hello Razvan,
> My idea is to keep one registration per device and hence the fc1 option
> wouldn't work for me here. Meaning the account can register from multiple
> locations using multiple devices, but if the same device tries to initiate
> a new register when there is an existing record in the location, I want to
> remove the existing one and save the new one. Moreover, my clients do not
> support GRUU and hence thats not the right path for me currently.
> So here's the idea:
> 1) On a REGISTER request, my clients come with an id that is unique to a
> device.
> 2) On successful registration, I store in local-cache the contact and
> callid for this particular device-id.
> 3) For all REGISTER, I check if AOR with callid is registered using the
> 'registered("location", "AOR", "callid")' function.
> 4) If registered returns true for the current callid, I consider it to be
> a Re-REGISTER.
> 5) If registered for current  callid returns false, I fetch the contact
> for device_id from local-cache. If the contact exists, meaning the same
> device is doing a new REGISTER. In this case, I need to remove the existing
> contact for this AoR.
> 6) This mostly happens when a client is registered and loses connectivity.
> The client when restarted creates a new registration with new callid
> without un-registering the existing one on the server.
> 7) The server deletes the device-id from the location on Un-REGISTER. I
> identify this when Expires header is 0.
>
> Do let me know if this is do-able in a neater way. Thanks in advance.
>
> - Jayesh
>
> On Tue, Nov 17, 2015 at 2:48 PM Răzvan Crainea 
> wrote:
>
>> Hi, Jayesh!
>>
>> If I understood correctly, you only want to have a single contact in
>> memory, right? If so, you can use the save[1] function, with flags c and f.
>> Something like:
>>
>> save("location", "fc1");
>>
>> [1]
>> http://www.opensips.org/html/docs/modules/2.1.x/registrar.html#id294034
>>
>> Best regards,
>>
>> Răzvan Crainea
>> OpenSIPS Solutionswww.opensips-solutions.com
>>
>> On 11/17/2015 08:37 AM, Jayesh Nambiar wrote:
>>
>> Hello All,
>> Just bumping in to check if there's a better way to remove an existing
>> contact from the location. My idea was to remove from the location a record
>> with particular callid or particular contact on specific scenarios. So I do
>> the following:
>> On a successful registration I store the some id that my device has along
>> with callid and contact.
>> On a subsequent registration, I compare the id and callid, if they are
>> different from the current registration, I need to remove the existing
>> contact with this callid
>> If the id and callid is same, I do nothing.
>>
>> Thanks,
>>
>> - Jayesh
>>
>> On Tue, Nov 10, 2015 at 6:59 PM Jayesh Nambiar 
>> wrote:
>>
>>> Forgot to mention. I'm using version 2.1.
>>>
>>> Thanks,
>>>
>>> - Jayesh
>>>
>>> On Tue, Nov 10, 2015 at 6:01 PM Jayesh Nambiar 
>>> wrote:
>>>
>>>> Hello,
>>>> I've been trying to delete specific contact for AOR using the remove
>>>> function in the registrar module, but somehow it doesn't remove it from the
>>>> location.
>>>> My db_mode is 0 as I only want to store it in opensips memory. I hav
>>>> the "use_domain" param as 1. On register, the contact gets stored in the
>>>> following format:
>>>>
>>>>
>>>> sip:579e08000@203.153.53.130:49612;rinstance=477b5477848ba584;transport=tcp
>>>>
>>>> I tried multiple ways to remove this:
>>>>
>>

Re: [OpenSIPS-Users] remove function not working for specific contact

2015-11-17 Thread Jayesh Nambiar
Hello Razvan,
My idea is to keep one registration per device and hence the fc1 option
wouldn't work for me here. Meaning the account can register from multiple
locations using multiple devices, but if the same device tries to initiate
a new register when there is an existing record in the location, I want to
remove the existing one and save the new one. Moreover, my clients do not
support GRUU and hence thats not the right path for me currently.
So here's the idea:
1) On a REGISTER request, my clients come with an id that is unique to a
device.
2) On successful registration, I store in local-cache the contact and
callid for this particular device-id.
3) For all REGISTER, I check if AOR with callid is registered using the
'registered("location", "AOR", "callid")' function.
4) If registered returns true for the current callid, I consider it to be a
Re-REGISTER.
5) If registered for current  callid returns false, I fetch the contact for
device_id from local-cache. If the contact exists, meaning the same device
is doing a new REGISTER. In this case, I need to remove the existing
contact for this AoR.
6) This mostly happens when a client is registered and loses connectivity.
The client when restarted creates a new registration with new callid
without un-registering the existing one on the server.
7) The server deletes the device-id from the location on Un-REGISTER. I
identify this when Expires header is 0.

Do let me know if this is do-able in a neater way. Thanks in advance.

- Jayesh

On Tue, Nov 17, 2015 at 2:48 PM Răzvan Crainea  wrote:

> Hi, Jayesh!
>
> If I understood correctly, you only want to have a single contact in
> memory, right? If so, you can use the save[1] function, with flags c and f.
> Something like:
>
> save("location", "fc1");
>
> [1]
> http://www.opensips.org/html/docs/modules/2.1.x/registrar.html#id294034
>
> Best regards,
>
> Răzvan Crainea
> OpenSIPS Solutionswww.opensips-solutions.com
>
> On 11/17/2015 08:37 AM, Jayesh Nambiar wrote:
>
> Hello All,
> Just bumping in to check if there's a better way to remove an existing
> contact from the location. My idea was to remove from the location a record
> with particular callid or particular contact on specific scenarios. So I do
> the following:
> On a successful registration I store the some id that my device has along
> with callid and contact.
> On a subsequent registration, I compare the id and callid, if they are
> different from the current registration, I need to remove the existing
> contact with this callid
> If the id and callid is same, I do nothing.
>
> Thanks,
>
> - Jayesh
>
> On Tue, Nov 10, 2015 at 6:59 PM Jayesh Nambiar 
> wrote:
>
>> Forgot to mention. I'm using version 2.1.
>>
>> Thanks,
>>
>> - Jayesh
>>
>> On Tue, Nov 10, 2015 at 6:01 PM Jayesh Nambiar 
>> wrote:
>>
>>> Hello,
>>> I've been trying to delete specific contact for AOR using the remove
>>> function in the registrar module, but somehow it doesn't remove it from the
>>> location.
>>> My db_mode is 0 as I only want to store it in opensips memory. I hav the
>>> "use_domain" param as 1. On register, the contact gets stored in the
>>> following format:
>>>
>>>
>>> sip:579e08000@203.153.53.130:49612;rinstance=477b5477848ba584;transport=tcp
>>>
>>> I tried multiple ways to remove this:
>>>
>>> 1) remove("location", "sip:579e08...@abc.com",
>>> "sip:579e08000@203.153.53.130:49612;rinstance=477b5477848ba584;transport=tcp"
>>> 
>>> )
>>>
>>> 2) remove("location", "sip:579e08...@abc.com", "
>>> sip:579e08000@203.153.53.130:49612")
>>>
>>> Also, I'd like to mention that I have an edge proxy in the middle who
>>> proxies the REGISTER to this Registrar and I use the PATH module to route
>>> back reliably. I'm essentially trying to remove location entry for
>>> particular endpoints based on some conditions.
>>>
>>> Any help is appreciated. Thanks,
>>>
>>> - Jayesh
>>>
>>
>
> ___
> 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] remove function not working for specific contact

2015-11-16 Thread Jayesh Nambiar
Hello All,
Just bumping in to check if there's a better way to remove an existing
contact from the location. My idea was to remove from the location a record
with particular callid or particular contact on specific scenarios. So I do
the following:
On a successful registration I store the some id that my device has along
with callid and contact.
On a subsequent registration, I compare the id and callid, if they are
different from the current registration, I need to remove the existing
contact with this callid
If the id and callid is same, I do nothing.

Thanks,

- Jayesh

On Tue, Nov 10, 2015 at 6:59 PM Jayesh Nambiar  wrote:

> Forgot to mention. I'm using version 2.1.
>
> Thanks,
>
> - Jayesh
>
> On Tue, Nov 10, 2015 at 6:01 PM Jayesh Nambiar 
> wrote:
>
>> Hello,
>> I've been trying to delete specific contact for AOR using the remove
>> function in the registrar module, but somehow it doesn't remove it from the
>> location.
>> My db_mode is 0 as I only want to store it in opensips memory. I hav the
>> "use_domain" param as 1. On register, the contact gets stored in the
>> following format:
>>
>> sip:579e08000@203.153.53.130:49612
>> ;rinstance=477b5477848ba584;transport=tcp
>>
>> I tried multiple ways to remove this:
>>
>> 1) remove("location", "sip:579e08...@abc.com",
>> "sip:579e08000@203.153.53.130:49612
>> ;rinstance=477b5477848ba584;transport=tcp")
>>
>> 2) remove("location", "sip:579e08...@abc.com", "
>> sip:579e08000@203.153.53.130:49612")
>>
>> Also, I'd like to mention that I have an edge proxy in the middle who
>> proxies the REGISTER to this Registrar and I use the PATH module to route
>> back reliably. I'm essentially trying to remove location entry for
>> particular endpoints based on some conditions.
>>
>> Any help is appreciated. Thanks,
>>
>> - Jayesh
>>
>
___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


Re: [OpenSIPS-Users] remove function not working for specific contact

2015-11-10 Thread Jayesh Nambiar
Forgot to mention. I'm using version 2.1.

Thanks,

- Jayesh

On Tue, Nov 10, 2015 at 6:01 PM Jayesh Nambiar  wrote:

> Hello,
> I've been trying to delete specific contact for AOR using the remove
> function in the registrar module, but somehow it doesn't remove it from the
> location.
> My db_mode is 0 as I only want to store it in opensips memory. I hav the
> "use_domain" param as 1. On register, the contact gets stored in the
> following format:
>
> sip:579e08000@203.153.53.130:49612
> ;rinstance=477b5477848ba584;transport=tcp
>
> I tried multiple ways to remove this:
>
> 1) remove("location", "sip:579e08...@abc.com",
> "sip:579e08000@203.153.53.130:49612
> ;rinstance=477b5477848ba584;transport=tcp")
>
> 2) remove("location", "sip:579e08...@abc.com", "
> sip:579e08000@203.153.53.130:49612")
>
> Also, I'd like to mention that I have an edge proxy in the middle who
> proxies the REGISTER to this Registrar and I use the PATH module to route
> back reliably. I'm essentially trying to remove location entry for
> particular endpoints based on some conditions.
>
> Any help is appreciated. Thanks,
>
> - Jayesh
>
___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


[OpenSIPS-Users] remove function not working for specific contact

2015-11-10 Thread Jayesh Nambiar
Hello,
I've been trying to delete specific contact for AOR using the remove
function in the registrar module, but somehow it doesn't remove it from the
location.
My db_mode is 0 as I only want to store it in opensips memory. I hav the
"use_domain" param as 1. On register, the contact gets stored in the
following format:

sip:579e08000@203.153.53.130:49612;rinstance=477b5477848ba584;transport=tcp

I tried multiple ways to remove this:

1) remove("location", "sip:579e08...@abc.com",
"sip:579e08000@203.153.53.130:49612
;rinstance=477b5477848ba584;transport=tcp")

2) remove("location", "sip:579e08...@abc.com", "
sip:579e08000@203.153.53.130:49612")

Also, I'd like to mention that I have an edge proxy in the middle who
proxies the REGISTER to this Registrar and I use the PATH module to route
back reliably. I'm essentially trying to remove location entry for
particular endpoints based on some conditions.

Any help is appreciated. Thanks,

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


Re: [OpenSIPS-Users] kiiling dialogs in a specific profile

2015-09-23 Thread Jayesh Nambiar
Hello,
Just saw the variable $DLG_did to get the id hash of the  dialog in the
loose route and that'll at least be helpful in saving the parse time :)
But is the other method of ending dialogs profile wise in roadmap or am I
missing something? It would also be great to know if the interval at which
the OPTIONS message is sent to the callee/caller is configurable in the
create_dialog("Pp") function. Currently as a default behavior I believe it
goes out every 32 seconds or so.

Thanks,

- Jayesh

On Wed, Sep 23, 2015 at 1:12 PM Jayesh Nambiar  wrote:

> Hello,
> I'm looking for fifo command which can help kill the dialogs in a specific
> profile with specific value. I saw a post related to this over here
> http://opensips.org/pipermail/users/2014-April/028517.html
> Needed to know if this feature was implemented as I dont see it documented
> anywhere. I'm running opensips 2.1 stable.
> If this is not present, then would there be a way which at least returns
> the dialog hash-id on create_dialog which can be used directly later to end
> the dialog from a third party app. Currently, we got to list the dialogs
> belonging to the profile, parse the hash ids and then send a dlg_end_dlg
> command for each of them.
>
> Thanks for any pointers on doing this in an efficient way.
>
> - Jayesh
>
___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


[OpenSIPS-Users] kiiling dialogs in a specific profile

2015-09-23 Thread Jayesh Nambiar
Hello,
I'm looking for fifo command which can help kill the dialogs in a specific
profile with specific value. I saw a post related to this over here
http://opensips.org/pipermail/users/2014-April/028517.html
Needed to know if this feature was implemented as I dont see it documented
anywhere. I'm running opensips 2.1 stable.
If this is not present, then would there be a way which at least returns
the dialog hash-id on create_dialog which can be used directly later to end
the dialog from a third party app. Currently, we got to list the dialogs
belonging to the profile, parse the hash ids and then send a dlg_end_dlg
command for each of them.

Thanks for any pointers on doing this in an efficient way.

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


Re: [OpenSIPS-Users] Error compiling cachedb_mongodb with opensips_head

2015-06-03 Thread Jayesh Nambiar
Hi Liviu,
Sorry to overlook the documentation. I had installed 1.0 version.
Thanks for the quick response.

- Jayesh

On Wed, Jun 3, 2015 at 6:21 PM Liviu Chircu  wrote:

>  Hi Jayesh,
>
> Did you get mongo-c-driver v0.6, as stated in the documentation? [1]
>
> [1]:
> http://www.opensips.org/html/docs/modules/2.2.x/cachedb_mongodb.html#id249610
>
> Liviu Chircu
> OpenSIPS Developerhttp://www.opensips-solutions.com
>
> On 03.06.2015 15:27, Jayesh Nambiar wrote:
>
> Hi,
> I tried including the cachedb_mongodb with latest opensips_head and it
> gives out error saying "fatal error: mongo.h: No such file or directory"
> I have installed mongo C library and I see it copies all the ".h" files in
> /usr/local/include/libmongoc-1.0 and the filename is mongoc.h instead of
> mongo.h.
> I guess the paths and filenames need to be looked upon again for the
> cachedb_mongodb to successfully compile.
>
>  Thanks,
>
>  - Jayesh
>
>
> ___
> 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


[OpenSIPS-Users] Error compiling cachedb_mongodb with opensips_head

2015-06-03 Thread Jayesh Nambiar
Hi,
I tried including the cachedb_mongodb with latest opensips_head and it
gives out error saying "fatal error: mongo.h: No such file or directory"
I have installed mongo C library and I see it copies all the ".h" files in
/usr/local/include/libmongoc-1.0 and the filename is mongoc.h instead of
mongo.h.
I guess the paths and filenames need to be looked upon again for the
cachedb_mongodb to successfully compile.

Thanks,

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


Re: [OpenSIPS-Users] redis HMGET nil value problem

2015-05-28 Thread Jayesh Nambiar
Hi Vlad,
Thanks for the lightning fast response. I'll open up the issue on GITHUB
right away.

- Jayesh

On Thu, May 28, 2015 at 6:58 PM, Vlad Paiu  wrote:

>  Hello,
>
> Currently, only STRING and INTEGER data types are supported - no NULL
> support in the cachedb raw interface.
>
> Please open a GITHUB issue for this and will fix it as soon as possible.
>
> Best Regards,
>
> Vlad Paiu
> OpenSIPS Developerhttp://www.opensips-solutions.com
>
> On 28.05.2015 16:21, Jayesh Nambiar wrote:
>
> Hi,
> I'm using cache_raw queries to get data from redis and I have a problem
> with accessing nil values that gets returned from it.
> For eg I do the following:
> cache_raw_query("redis:myRedis HMGET one two three", "$avp(result)");
>
>  Here the value of one is abc, two is not present in redis and three is
> xyz. Now if I access the values, I ideally expect it to be the following:
> $(avp(result)[0]) = xyz, $(avp(result)[1]) =  and $(avp(result)[2])
> = abc.
> But since key two is not present in redis for whatever reasons, the result
> I get back is:
> $(avp(result)[0]) = xyz
> $(avp(result)[1]) = abc
> $(avp(result)[2]) = 
>
>  This actually makes my value matching go for a toss. Is there a better
> solution to access the array that is returned back from redis or at least
> store the value as NULL in that array element of avp. Any help is greatly
> appreciated.
>
>  Thanks,
>
>  - Jayesh
>
>
> ___
> 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


[OpenSIPS-Users] redis HMGET nil value problem

2015-05-28 Thread Jayesh Nambiar
Hi,
I'm using cache_raw queries to get data from redis and I have a problem
with accessing nil values that gets returned from it.
For eg I do the following:
cache_raw_query("redis:myRedis HMGET one two three", "$avp(result)");

Here the value of one is abc, two is not present in redis and three is xyz.
Now if I access the values, I ideally expect it to be the following:
$(avp(result)[0]) = xyz, $(avp(result)[1]) =  and $(avp(result)[2]) =
abc.
But since key two is not present in redis for whatever reasons, the result
I get back is:
$(avp(result)[0]) = xyz
$(avp(result)[1]) = abc
$(avp(result)[2]) = 

This actually makes my value matching go for a toss. Is there a better
solution to access the array that is returned back from redis or at least
store the value as NULL in that array element of avp. Any help is greatly
appreciated.

Thanks,

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


Re: [OpenSIPS-Users] default value for timerec column in dialplan table

2015-02-22 Thread Jayesh Nambiar
Hi Aron,
Thanks for the reply. I figured this. The blank timerec works. But the main
problem was that earlier the dialplan_id column was VARCHAR and it worked
well in 1.11 version. When I changed the datatype to INT it started working
fine with the 2.1.0. It was loading some random IDs when the ID column was
varchar.

Thanks for help!!

--- Jayesh

On Sun Feb 22 2015 at 7:29:09 PM Podrigal, Aron 
wrote:

>  You should be able to have this successful with a empty value.  Can you
> post your config and values you have for this column?
>
> On Fri, Feb 20, 2015 at 4:01 PM, Jayesh Nambiar 
> wrote:
>
>> Hi,
>> I recently upgraded to 2.1.0 from 1.11 and my dialplans wouldn't load
>> because of the following error:
>> *failed to parse timerec pattern*
>> I tried multiple values in this column after doing some reading here:
>> http://www.kanzaki.com/docs/ical/rrule.html
>> But none works and I have difficulties understanding RFC 2445. My
>> intention is to use the dialplans the way it was before and I'm having a
>> hard time finding a default value for this new column. The dialplans just
>> wont load because this column is not as expected.
>>
>> Thanks
>>
>> --- Jayesh
>>
>> ___
>> 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] default value for timerec column in dialplan table

2015-02-20 Thread Jayesh Nambiar
Hi,
I recently upgraded to 2.1.0 from 1.11 and my dialplans wouldn't load
because of the following error:
*failed to parse timerec pattern*
I tried multiple values in this column after doing some reading here:
http://www.kanzaki.com/docs/ical/rrule.html
But none works and I have difficulties understanding RFC 2445. My intention
is to use the dialplans the way it was before and I'm having a hard time
finding a default value for this new column. The dialplans just wont load
because this column is not as expected.

Thanks

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


Re: [OpenSIPS-Users] mi_open_reply_pipe: open error

2014-11-13 Thread Jayesh Nambiar
Yes, I'm running opensips as root.

--- Jayesh

On Thu, Nov 13, 2014 at 6:54 PM, Răzvan Crainea  wrote:

>  Are you running opensips as user root?
>
> Răzvan Crainea
> OpenSIPS Solutionswww.opensips-solutions.com
>
> On 11/12/2014 11:06 AM, Jayesh Nambiar wrote:
>
> I understand this is supposed to work out of the box, but it is not. Any
> traces, debugging or something that I can do to figure this out?? My
> installation was simple with make menuconfig where I configured the prefix
> as /usr/local/. Added some additional modules I needed and compiled and
> installed.
> I haven't made any changes in the default opensipsctlrc file and
> osipsconsolerc file. Anything to be done for these files??
>
>  Thanks for any pointers,
>
>  --- Jayesh
>
> On Sat, Nov 8, 2014 at 5:20 PM, Jayesh Nambiar 
> wrote:
>
>> Hi,
>> I am currently running opensips 2.1 version. From my script, based on a
>> certain event I execute exec command as follows:
>> exec_avp("/usr/local/sbin/opensipsctl fifo t_uac_cancel $avp(caller_cid)
>> $avp(caller_cseq)", "$avp(result)")
>> But the syslog always shows error as:
>>
>> Nov  8 11:40:05 v146 /usr/local/sbin/opensips[17362]:
>> ERROR:mi_fifo:mi_open_reply_pipe: open error (/tmp/osips_rply_598a709a): No
>> such file or directory
>>
>> Nov  8 11:40:05 v146 /usr/local/sbin/opensips[17362]:
>> ERROR:mi_fifo:mi_fifo_server: cannot open reply pipe
>> /tmp/osips_rply_598a709a
>>
>> But if I execute the same command from the shell it executes properly and
>> behaves as expected. I am running opensips as root user and root group. My
>> mi_fifo parameters are as follows:
>>
>> modparam("mi_fifo", "fifo_name", "/tmp/opensips_fifo")
>>
>> modparam("mi_fifo", "fifo_mode", 0755)
>>
>> modparam("mi_fifo", "fifo_user", "root")
>>
>>  modparam("mi_fifo", "fifo_group", "root")
>>
>> I even tried changing the reply fifo parameter to a different directory
>> and gave 0777 permission to that directory, but it didn't help. My current
>> tmp directory is also running with 0777 permissions but the error is still
>> same. Any suggestion on what opensips fifo is doing when I execute the
>> t_uac_cancel from the script directly?? I've tried all possible permission
>> related stuff but nothing seems to help here. Let me know if there's any
>> direction that I could take !!
>>
>> --- Jayesh
>>
>
>
>
> ___
> 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] mi_open_reply_pipe: open error

2014-11-12 Thread Jayesh Nambiar
I understand this is supposed to work out of the box, but it is not. Any
traces, debugging or something that I can do to figure this out?? My
installation was simple with make menuconfig where I configured the prefix
as /usr/local/. Added some additional modules I needed and compiled and
installed.
I haven't made any changes in the default opensipsctlrc file and
osipsconsolerc file. Anything to be done for these files??

Thanks for any pointers,

--- Jayesh

On Sat, Nov 8, 2014 at 5:20 PM, Jayesh Nambiar  wrote:

> Hi,
> I am currently running opensips 2.1 version. From my script, based on a
> certain event I execute exec command as follows:
> exec_avp("/usr/local/sbin/opensipsctl fifo t_uac_cancel $avp(caller_cid)
> $avp(caller_cseq)", "$avp(result)")
> But the syslog always shows error as:
>
> Nov  8 11:40:05 v146 /usr/local/sbin/opensips[17362]:
> ERROR:mi_fifo:mi_open_reply_pipe: open error (/tmp/osips_rply_598a709a): No
> such file or directory
>
> Nov  8 11:40:05 v146 /usr/local/sbin/opensips[17362]:
> ERROR:mi_fifo:mi_fifo_server: cannot open reply pipe
> /tmp/osips_rply_598a709a
>
> But if I execute the same command from the shell it executes properly and
> behaves as expected. I am running opensips as root user and root group. My
> mi_fifo parameters are as follows:
>
> modparam("mi_fifo", "fifo_name", "/tmp/opensips_fifo")
>
> modparam("mi_fifo", "fifo_mode", 0755)
>
> modparam("mi_fifo", "fifo_user", "root")
>
> modparam("mi_fifo", "fifo_group", "root")
>
> I even tried changing the reply fifo parameter to a different directory
> and gave 0777 permission to that directory, but it didn't help. My current
> tmp directory is also running with 0777 permissions but the error is still
> same. Any suggestion on what opensips fifo is doing when I execute the
> t_uac_cancel from the script directly?? I've tried all possible permission
> related stuff but nothing seems to help here. Let me know if there's any
> direction that I could take !!
>
> --- Jayesh
>
___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


[OpenSIPS-Users] mi_open_reply_pipe: open error

2014-11-08 Thread Jayesh Nambiar
Hi,
I am currently running opensips 2.1 version. From my script, based on a
certain event I execute exec command as follows:
exec_avp("/usr/local/sbin/opensipsctl fifo t_uac_cancel $avp(caller_cid)
$avp(caller_cseq)", "$avp(result)")
But the syslog always shows error as:

Nov  8 11:40:05 v146 /usr/local/sbin/opensips[17362]:
ERROR:mi_fifo:mi_open_reply_pipe: open error (/tmp/osips_rply_598a709a): No
such file or directory

Nov  8 11:40:05 v146 /usr/local/sbin/opensips[17362]:
ERROR:mi_fifo:mi_fifo_server: cannot open reply pipe
/tmp/osips_rply_598a709a

But if I execute the same command from the shell it executes properly and
behaves as expected. I am running opensips as root user and root group. My
mi_fifo parameters are as follows:

modparam("mi_fifo", "fifo_name", "/tmp/opensips_fifo")

modparam("mi_fifo", "fifo_mode", 0755)

modparam("mi_fifo", "fifo_user", "root")

modparam("mi_fifo", "fifo_group", "root")

I even tried changing the reply fifo parameter to a different directory and
gave 0777 permission to that directory, but it didn't help. My current tmp
directory is also running with 0777 permissions but the error is still
same. Any suggestion on what opensips fifo is doing when I execute the
t_uac_cancel from the script directly?? I've tried all possible permission
related stuff but nothing seems to help here. Let me know if there's any
direction that I could take !!

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


Re: [OpenSIPS-Users] Have one registration contact per device in usrloc

2014-10-08 Thread Jayesh Nambiar
Hello,
Wanted to correct the message below:
I had added fc1 in the save("location") after I got this problem to avoid
more than one registration. Before adding fc1, i had this problem of TCP
timeout. Sorry for the wrong info.

--- Jayesh

On Wed, Oct 8, 2014 at 8:01 PM, Jayesh Nambiar  wrote:

> Hi Bogdan,
> So I thought of doing this and I have another problem. Say if a device
> registered from IP 1.2.3.4, and then moved out to different network and
> re-registered from IP 4.3.2.1, there is a stale registration lying in
> opensips for the same device from 1.2.3.4.
> Now when I use TCP as transport, opensips waits till connect timed out on
> unreachable IPs before sending the call to registered contact and the
> following messages are logged in syslog:
> ERROR:core:tcp_blocking_connect: timeout 10 s elapsed from 10 s
>  ERROR:core:tcpconn_connect: tcp_blocking_connect failed
>  ERROR:core:tcp_send: connect failed
>  ERROR:tm:msg_send: tcp_send failed
>
> Looks like opensips tries to do a TCP connect first with all registered
> contacts before actually routing the call.
> I do,
> modparam("registrar", "tcp_persistent_flag", "TCP_PERSISTENT")
>
> if(is_method("REGISTER")) {
> setflag(TCP_PERSISTENT);
> setbflag(30);
> if(!save("location", "fc1")) {
> t_reply("500", "Error while saving AOR");
> }
> }
>
> --- Jayesh
>
>
>
>
>
>
> On Wed, Oct 8, 2014 at 3:10 PM, Bogdan-Andrei Iancu 
> wrote:
>
>>  Hi Jayesh,
>>
>> Basically you do not what to have more registrations from the same IP,
>> right ?
>>
>> Exactly the opposit of the is_other_contact() function :
>>
>> http://www.opensips.org/html/docs/modules/1.11.x/registrar.html#id294660
>>
>> Regards,
>>
>> Bogdan-Andrei Iancu
>> OpenSIPS Founder and Developerhttp://www.opensips-solutions.com
>>
>> On 01.10.2014 18:15, Jayesh Nambiar wrote:
>>
>>Hi,
>>  I am trying to solve a problem of having one registration per AOR per
>> device. So user 1234 can register from device A, device B and device C. But
>> the user 1234 should not have multiple contacts from device A alone.
>>  At times when the device loses network, proxy doesn't receive
>> de-register and the contact stays in opensips till its expiry time. So the
>> same device is thus capable of creating multiple contacts. I could solve
>> this by using "fc1" flag while doing a save("location") but I need multiple
>> registrations to be allowed from different devices !!
>>  So is there a way where while doing a save("location"), I set some sort
>> of device id along with it such that I identify and overwrite the existing
>> contact only if the registration comes from same device-id or else add it
>> up for parallel forking.
>>  Do let me know if I make sense here and there's a solution to this.
>> Thanks for any suggestions and directions.
>>
>> Thanks,
>>
>>  --- Jayesh
>>
>>
>> ___
>> 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] Have one registration contact per device in usrloc

2014-10-08 Thread Jayesh Nambiar
Hi Bogdan,
So I thought of doing this and I have another problem. Say if a device
registered from IP 1.2.3.4, and then moved out to different network and
re-registered from IP 4.3.2.1, there is a stale registration lying in
opensips for the same device from 1.2.3.4.
Now when I use TCP as transport, opensips waits till connect timed out on
unreachable IPs before sending the call to registered contact and the
following messages are logged in syslog:
ERROR:core:tcp_blocking_connect: timeout 10 s elapsed from 10 s
 ERROR:core:tcpconn_connect: tcp_blocking_connect failed
 ERROR:core:tcp_send: connect failed
 ERROR:tm:msg_send: tcp_send failed

Looks like opensips tries to do a TCP connect first with all registered
contacts before actually routing the call.
I do,
modparam("registrar", "tcp_persistent_flag", "TCP_PERSISTENT")

if(is_method("REGISTER")) {
setflag(TCP_PERSISTENT);
setbflag(30);
if(!save("location", "fc1")) {
t_reply("500", "Error while saving AOR");
}
}

--- Jayesh






On Wed, Oct 8, 2014 at 3:10 PM, Bogdan-Andrei Iancu 
wrote:

>  Hi Jayesh,
>
> Basically you do not what to have more registrations from the same IP,
> right ?
>
> Exactly the opposit of the is_other_contact() function :
>
> http://www.opensips.org/html/docs/modules/1.11.x/registrar.html#id294660
>
> Regards,
>
> Bogdan-Andrei Iancu
> OpenSIPS Founder and Developerhttp://www.opensips-solutions.com
>
> On 01.10.2014 18:15, Jayesh Nambiar wrote:
>
>Hi,
>  I am trying to solve a problem of having one registration per AOR per
> device. So user 1234 can register from device A, device B and device C. But
> the user 1234 should not have multiple contacts from device A alone.
>  At times when the device loses network, proxy doesn't receive de-register
> and the contact stays in opensips till its expiry time. So the same device
> is thus capable of creating multiple contacts. I could solve this by using
> "fc1" flag while doing a save("location") but I need multiple registrations
> to be allowed from different devices !!
>  So is there a way where while doing a save("location"), I set some sort
> of device id along with it such that I identify and overwrite the existing
> contact only if the registration comes from same device-id or else add it
> up for parallel forking.
>  Do let me know if I make sense here and there's a solution to this.
> Thanks for any suggestions and directions.
>
> Thanks,
>
>  --- Jayesh
>
>
> ___
> 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] Have one registration contact per device in usrloc

2014-10-01 Thread Jayesh Nambiar
Hi,
I am trying to solve a problem of having one registration per AOR per
device. So user 1234 can register from device A, device B and device C. But
the user 1234 should not have multiple contacts from device A alone.
At times when the device loses network, proxy doesn't receive de-register
and the contact stays in opensips till its expiry time. So the same device
is thus capable of creating multiple contacts. I could solve this by using
"fc1" flag while doing a save("location") but I need multiple registrations
to be allowed from different devices !!
So is there a way where while doing a save("location"), I set some sort of
device id along with it such that I identify and overwrite the existing
contact only if the registration comes from same device-id or else add it
up for parallel forking.
Do let me know if I make sense here and there's a solution to this. Thanks
for any suggestions and directions.

Thanks,

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


[OpenSIPS-Users] using TCP/TLS in a large scale deployment

2014-09-10 Thread Jayesh Nambiar
Hello,
I am in process of designing opensips which can handle a million users,
hypothetically 200,000 registrations and 500CPS capacity. I've been reading
a lot and learnt that TCP design is blocking and not suitable for huge
volumes.
My requirement was to have TLS between endpoints and Opensips and hence
riding over TCP is the only option. I needed some expert suggestions on
what things should be taken care of when planning a large deployment over
TCP.
I have built similar stuff on UDP and I trust it heavily as it has
performed perfectly as expected. But when it comes to TCP I'm a bit
clueless.
I've read about lot of global parameters that is now available for
asynchrous tcp operations. Is it really helpful when planning for scalable
environments??

Thanks for any suggestions !!

W/regards,
Jayesh
___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


Re: [OpenSIPS-Users] calling t_uac_cancel from opensips script

2014-09-10 Thread Jayesh Nambiar
Hello Razvan,
An update to the above problem:
I re-installed opensips without prefix based installation and the exec_avp
for t_uac_cancel worked fine as expected. No permission errors anywhere !!
I used to install opensips directly using the following:
make prefix=/usr/local/myOpensips include_modules="db_mysql cachedb_redis
json rest_client"
make prefix=/usr/local/myOpensips include_modules="db_mysql cachedb_redis
json rest_client" install.

Is the above method no longer supported or somethig??

Thanks,

--- Jayesh

On Wed, Sep 10, 2014 at 1:55 PM, Jayesh Nambiar 
wrote:

> Hello,
> Just an update, when I ran exec_msg function with modparam("exec",
> "async", 0), the behaviour was same as exec_avp function. Basically,
> opensips logs stay at forked_pid and nothing else works after that. No SIP
> request is processed.
>
> --- Jayesh
>
> On Tue, Sep 9, 2014 at 8:41 PM, Jayesh Nambiar 
> wrote:
>
>> When I use exec_avp opensips hangs. There's no core generated, and
>> following are the logs immediately after the command is executed:
>> Sep  9 10:17:48 v38 /usr/local/myOpensips/sbin/opensips[24843]:
>> DBG:exec:w_exec_avp: executing
>> [/usr/local/myOpensips/etc/opensips/uac_cancel.sh '.
>> 56sqM.YAwbUId0odDVrte3d6PZqa.de' '14654']
>> Sep  9 10:17:48 v38 /usr/local/myOpensips/sbin/opensips[24843]:
>> DBG:exec:exec_avp: Forked pid 24879
>> Sep  9 10:18:00 v38 /usr/local/myOpensips/sbin/opensips[24835]:
>> DBG:mi_fifo:mi_parse_tree: adding node <> ; val <.
>> 56sqM.YAwbUId0odDVrte3d6PZqa.de>
>> Sep  9 10:18:00 v38 /usr/local/myOpensips/sbin/opensips[24835]:
>> DBG:mi_fifo:mi_parse_tree: adding node <> ; val <14654>
>> Sep  9 10:18:00 v38 /usr/local/myOpensips/sbin/opensips[24835]:
>> DBG:mi_fifo:mi_parse_node: end of input tree
>> Sep  9 10:18:00 v38 /usr/local/myOpensips/sbin/opensips[24835]:
>> DBG:mi_fifo:mi_fifo_server: done parsing the mi tree
>> Sep  9 10:18:00 v38 /usr/local/myOpensips/sbin/opensips[24835]:
>> DBG:tm:t_lookup_callid: created comparable call_id header field: >Call-ID: .
>> 56sqM.YAwbUId0odDVrte3d6PZqa.de#015#012
>> <http://56sqM.YAwbUId0odDVrte3d6PZqa.de#015%23012><
>> Sep  9 10:18:00 v38 /usr/local/myOpensips/sbin/opensips[24835]:
>> DBG:tm:t_lookup_callid: created comparable cseq header field: >CSeq: 14654
>> INVITE<
>> Sep  9 10:18:00 v38 /usr/local/myOpensips/sbin/opensips[24835]:
>> DBG:tm:t_lookup_callid:  > 56sqM.YAwbUId0odDVrte3d6PZqa.de#015#012
>> <http://56sqM.YAwbUId0odDVrte3d6PZqa.de#015%23012>>  
>> Sep  9 10:18:00 v38 /usr/local/myOpensips/sbin/opensips[24835]:
>> DBG:tm:t_lookup_callid: we have a match: callid=>>Call-ID: .
>> 56sqM.YAwbUId0odDVrte3d6PZqa.de#015#012
>> <http://56sqM.YAwbUId0odDVrte3d6PZqa.de#015%23012><< cseq=>>CSeq: 14654<<
>> Sep  9 10:18:00 v38 /usr/local/myOpensips/sbin/opensips[24835]:
>> DBG:tm:t_lookup_callid: REF_UNSAFE:[0x7f449a0cbb00] after is 1
>> Sep  9 10:18:00 v38 /usr/local/myOpensips/sbin/opensips[24835]:
>> DBG:tm:t_lookup_callid: transaction found.
>> Sep  9 10:18:00 v38 /usr/local/myOpensips/sbin/opensips[24835]:
>> DBG:tm:mi_tm_cancel: cancelling transaction 0x7f449a0cbb00
>> Sep  9 10:18:00 v38 /usr/local/myOpensips/sbin/opensips[24835]:
>> DBG:tm:build_local: using FROM=> sip:1003040@198.24.63.38>;tag=NPD-XIL90Z6yNzrktn-IZWpOgnzcJ6EZ#015#012>,
>> TO=#015#012>, CSEQ_N=
>> Sep  9 10:18:00 v38 /usr/local/myOpensips/sbin/opensips[24835]:
>> DBG:tm:cancel_branch: sending cancel...
>> Sep  9 10:18:00 v38 /usr/local/myOpensips/sbin/opensips[24835]:
>> DBG:tm:set_timer: relative timeout is 50
>> Sep  9 10:18:00 v38 /usr/local/myOpensips/sbin/opensips[24835]:
>> DBG:tm:insert_timer_unsafe: [4]: 0x7f449a0cbde8 (17330)
>> Sep  9 10:18:00 v38 /usr/local/myOpensips/sbin/opensips[24835]:
>> DBG:tm:insert_timer_unsafe: [0]: 0x7f449a0cbe18 (212)
>> Sep  9 10:18:00 v38 /usr/local/myOpensips/sbin/opensips[24835]:
>> DBG:tm:mi_tm_cancel: UNREF_UNSAFE: [0x7f449a0cbb00] after is 0
>>
>> Also when I use exec_msg, the opensips doesn't hang and looks like it
>> works as expected. Although while using exec_msg function, it adds an
>> additional parameter when executing the command at the end in a
>> parentheses. For eg: my function is:
>> exec_msg("/usr/local/myOpensips/sbin/opensipsctl fifo t_uac_cancel
>> $avp(caller_cid) $avp(caller_cseq)");
>>
>> In the debug it shows command executed as:
>> /usr/local/myOpensips/etc/opensips/uac_cancel.sh
>> btf4RC2Z8tBlpG6eAG-hZK4cZxENCEud 8222

Re: [OpenSIPS-Users] calling t_uac_cancel from opensips script

2014-09-10 Thread Jayesh Nambiar
Hello,
Just an update, when I ran exec_msg function with modparam("exec", "async",
0), the behaviour was same as exec_avp function. Basically, opensips logs
stay at forked_pid and nothing else works after that. No SIP request is
processed.

--- Jayesh

On Tue, Sep 9, 2014 at 8:41 PM, Jayesh Nambiar  wrote:

> When I use exec_avp opensips hangs. There's no core generated, and
> following are the logs immediately after the command is executed:
> Sep  9 10:17:48 v38 /usr/local/myOpensips/sbin/opensips[24843]:
> DBG:exec:w_exec_avp: executing
> [/usr/local/myOpensips/etc/opensips/uac_cancel.sh '.
> 56sqM.YAwbUId0odDVrte3d6PZqa.de' '14654']
> Sep  9 10:17:48 v38 /usr/local/myOpensips/sbin/opensips[24843]:
> DBG:exec:exec_avp: Forked pid 24879
> Sep  9 10:18:00 v38 /usr/local/myOpensips/sbin/opensips[24835]:
> DBG:mi_fifo:mi_parse_tree: adding node <> ; val <.
> 56sqM.YAwbUId0odDVrte3d6PZqa.de>
> Sep  9 10:18:00 v38 /usr/local/myOpensips/sbin/opensips[24835]:
> DBG:mi_fifo:mi_parse_tree: adding node <> ; val <14654>
> Sep  9 10:18:00 v38 /usr/local/myOpensips/sbin/opensips[24835]:
> DBG:mi_fifo:mi_parse_node: end of input tree
> Sep  9 10:18:00 v38 /usr/local/myOpensips/sbin/opensips[24835]:
> DBG:mi_fifo:mi_fifo_server: done parsing the mi tree
> Sep  9 10:18:00 v38 /usr/local/myOpensips/sbin/opensips[24835]:
> DBG:tm:t_lookup_callid: created comparable call_id header field: >Call-ID: .
> 56sqM.YAwbUId0odDVrte3d6PZqa.de#015#012
> <http://56sqM.YAwbUId0odDVrte3d6PZqa.de#015%23012><
> Sep  9 10:18:00 v38 /usr/local/myOpensips/sbin/opensips[24835]:
> DBG:tm:t_lookup_callid: created comparable cseq header field: >CSeq: 14654
> INVITE<
> Sep  9 10:18:00 v38 /usr/local/myOpensips/sbin/opensips[24835]:
> DBG:tm:t_lookup_callid:   56sqM.YAwbUId0odDVrte3d6PZqa.de#015#012
> <http://56sqM.YAwbUId0odDVrte3d6PZqa.de#015%23012>>  
> Sep  9 10:18:00 v38 /usr/local/myOpensips/sbin/opensips[24835]:
> DBG:tm:t_lookup_callid: we have a match: callid=>>Call-ID: .
> 56sqM.YAwbUId0odDVrte3d6PZqa.de#015#012
> <http://56sqM.YAwbUId0odDVrte3d6PZqa.de#015%23012><< cseq=>>CSeq: 14654<<
> Sep  9 10:18:00 v38 /usr/local/myOpensips/sbin/opensips[24835]:
> DBG:tm:t_lookup_callid: REF_UNSAFE:[0x7f449a0cbb00] after is 1
> Sep  9 10:18:00 v38 /usr/local/myOpensips/sbin/opensips[24835]:
> DBG:tm:t_lookup_callid: transaction found.
> Sep  9 10:18:00 v38 /usr/local/myOpensips/sbin/opensips[24835]:
> DBG:tm:mi_tm_cancel: cancelling transaction 0x7f449a0cbb00
> Sep  9 10:18:00 v38 /usr/local/myOpensips/sbin/opensips[24835]:
> DBG:tm:build_local: using FROM= sip:1003040@198.24.63.38>;tag=NPD-XIL90Z6yNzrktn-IZWpOgnzcJ6EZ#015#012>,
> TO=#015#012>, CSEQ_N=
> Sep  9 10:18:00 v38 /usr/local/myOpensips/sbin/opensips[24835]:
> DBG:tm:cancel_branch: sending cancel...
> Sep  9 10:18:00 v38 /usr/local/myOpensips/sbin/opensips[24835]:
> DBG:tm:set_timer: relative timeout is 50
> Sep  9 10:18:00 v38 /usr/local/myOpensips/sbin/opensips[24835]:
> DBG:tm:insert_timer_unsafe: [4]: 0x7f449a0cbde8 (17330)
> Sep  9 10:18:00 v38 /usr/local/myOpensips/sbin/opensips[24835]:
> DBG:tm:insert_timer_unsafe: [0]: 0x7f449a0cbe18 (212)
> Sep  9 10:18:00 v38 /usr/local/myOpensips/sbin/opensips[24835]:
> DBG:tm:mi_tm_cancel: UNREF_UNSAFE: [0x7f449a0cbb00] after is 0
>
> Also when I use exec_msg, the opensips doesn't hang and looks like it
> works as expected. Although while using exec_msg function, it adds an
> additional parameter when executing the command at the end in a
> parentheses. For eg: my function is:
> exec_msg("/usr/local/myOpensips/sbin/opensipsctl fifo t_uac_cancel
> $avp(caller_cid) $avp(caller_cseq)");
>
> In the debug it shows command executed as:
> /usr/local/myOpensips/etc/opensips/uac_cancel.sh
> btf4RC2Z8tBlpG6eAG-hZK4cZxENCEud 8222 (23430)
>
> I'm not sure what (23430) is in the above command because of which most
> likely the t_uac_cancel fails. Because If I run this command directly it
> gives me syntax error:
> -bash: syntax error near unexpected token `('
>
> I dont even have an option to single quote that parameter as it comes
> automatically when the function is executed.
>
> --- Jayesh
>
>
> On Tue, Sep 9, 2014 at 8:22 PM, Răzvan Crainea 
> wrote:
>
>>  Hi, Jayesh!
>>
>> Do you see any cores generated? Is there anything logged by your MI
>> command?
>>
>> Best regards,
>>
>> Răzvan Crainea
>> OpenSIPS Solutionswww.opensips-solutions.com
>>
>> On 09/09/2014 05:27 PM, Jayesh Nambiar wrote:
>>
>>   Hello Razvan,
>>  I extracted the source opensips-1.11.2-4c08b62_src.tar.gz create

Re: [OpenSIPS-Users] calling t_uac_cancel from opensips script

2014-09-09 Thread Jayesh Nambiar
When I use exec_avp opensips hangs. There's no core generated, and
following are the logs immediately after the command is executed:
Sep  9 10:17:48 v38 /usr/local/myOpensips/sbin/opensips[24843]:
DBG:exec:w_exec_avp: executing
[/usr/local/myOpensips/etc/opensips/uac_cancel.sh '.
56sqM.YAwbUId0odDVrte3d6PZqa.de' '14654']
Sep  9 10:17:48 v38 /usr/local/myOpensips/sbin/opensips[24843]:
DBG:exec:exec_avp: Forked pid 24879
Sep  9 10:18:00 v38 /usr/local/myOpensips/sbin/opensips[24835]:
DBG:mi_fifo:mi_parse_tree: adding node <> ; val <.
56sqM.YAwbUId0odDVrte3d6PZqa.de>
Sep  9 10:18:00 v38 /usr/local/myOpensips/sbin/opensips[24835]:
DBG:mi_fifo:mi_parse_tree: adding node <> ; val <14654>
Sep  9 10:18:00 v38 /usr/local/myOpensips/sbin/opensips[24835]:
DBG:mi_fifo:mi_parse_node: end of input tree
Sep  9 10:18:00 v38 /usr/local/myOpensips/sbin/opensips[24835]:
DBG:mi_fifo:mi_fifo_server: done parsing the mi tree
Sep  9 10:18:00 v38 /usr/local/myOpensips/sbin/opensips[24835]:
DBG:tm:t_lookup_callid: created comparable call_id header field: >Call-ID: .
56sqM.YAwbUId0odDVrte3d6PZqa.de#015#012<
Sep  9 10:18:00 v38 /usr/local/myOpensips/sbin/opensips[24835]:
DBG:tm:t_lookup_callid: created comparable cseq header field: >CSeq: 14654
INVITE<
Sep  9 10:18:00 v38 /usr/local/myOpensips/sbin/opensips[24835]:
DBG:tm:t_lookup_callid:  

Sep  9 10:18:00 v38 /usr/local/myOpensips/sbin/opensips[24835]:
DBG:tm:t_lookup_callid: we have a match: callid=>>Call-ID: .
56sqM.YAwbUId0odDVrte3d6PZqa.de#015#012<< cseq=>>CSeq: 14654<<
Sep  9 10:18:00 v38 /usr/local/myOpensips/sbin/opensips[24835]:
DBG:tm:t_lookup_callid: REF_UNSAFE:[0x7f449a0cbb00] after is 1
Sep  9 10:18:00 v38 /usr/local/myOpensips/sbin/opensips[24835]:
DBG:tm:t_lookup_callid: transaction found.
Sep  9 10:18:00 v38 /usr/local/myOpensips/sbin/opensips[24835]:
DBG:tm:mi_tm_cancel: cancelling transaction 0x7f449a0cbb00
Sep  9 10:18:00 v38 /usr/local/myOpensips/sbin/opensips[24835]:
DBG:tm:build_local: using FROM=;tag=NPD-XIL90Z6yNzrktn-IZWpOgnzcJ6EZ#015#012>,
TO=#015#012>, CSEQ_N=
Sep  9 10:18:00 v38 /usr/local/myOpensips/sbin/opensips[24835]:
DBG:tm:cancel_branch: sending cancel...
Sep  9 10:18:00 v38 /usr/local/myOpensips/sbin/opensips[24835]:
DBG:tm:set_timer: relative timeout is 50
Sep  9 10:18:00 v38 /usr/local/myOpensips/sbin/opensips[24835]:
DBG:tm:insert_timer_unsafe: [4]: 0x7f449a0cbde8 (17330)
Sep  9 10:18:00 v38 /usr/local/myOpensips/sbin/opensips[24835]:
DBG:tm:insert_timer_unsafe: [0]: 0x7f449a0cbe18 (212)
Sep  9 10:18:00 v38 /usr/local/myOpensips/sbin/opensips[24835]:
DBG:tm:mi_tm_cancel: UNREF_UNSAFE: [0x7f449a0cbb00] after is 0

Also when I use exec_msg, the opensips doesn't hang and looks like it works
as expected. Although while using exec_msg function, it adds an additional
parameter when executing the command at the end in a parentheses. For eg:
my function is:
exec_msg("/usr/local/myOpensips/sbin/opensipsctl fifo t_uac_cancel
$avp(caller_cid) $avp(caller_cseq)");

In the debug it shows command executed as:
/usr/local/myOpensips/etc/opensips/uac_cancel.sh
btf4RC2Z8tBlpG6eAG-hZK4cZxENCEud 8222 (23430)

I'm not sure what (23430) is in the above command because of which most
likely the t_uac_cancel fails. Because If I run this command directly it
gives me syntax error:
-bash: syntax error near unexpected token `('

I dont even have an option to single quote that parameter as it comes
automatically when the function is executed.

--- Jayesh


On Tue, Sep 9, 2014 at 8:22 PM, Răzvan Crainea  wrote:

>  Hi, Jayesh!
>
> Do you see any cores generated? Is there anything logged by your MI
> command?
>
> Best regards,
>
> Răzvan Crainea
> OpenSIPS Solutionswww.opensips-solutions.com
>
> On 09/09/2014 05:27 PM, Jayesh Nambiar wrote:
>
>   Hello Razvan,
>  I extracted the source opensips-1.11.2-4c08b62_src.tar.gz created on Sept
> 7th and tried again. This time, as soon as the exec_avp command is fired,
> the opensips stops processing anything after that. The service doesn't even
> stop when tried to stop cleanly. It just hangs. After a minute or so, it
> shuts down with the following in the logs:
> Sep  9 10:23:17 v38 /usr/local/myOpensips/sbin/opensips[24832]:
> DBG:core:pool_remove: connection still kept in the pool
> Sep  9 10:23:17 v38 /usr/local/myOpensips/sbin/opensips[24832]:
> DBG:core:pool_remove: removing connection from the pool
>
> Sep  9 10:23:17 v38 /usr/local/myOpensips/sbin/opensips[24832]:
> DBG:core:pool_remove: removing connection from the pool
> Sep  9 10:24:17 v38 /usr/local/myOpensips/sbin/opensips[24832]:
> CRITICAL:core:sig_alarm_abort: BUG - shutdown timeout triggered, dying...
> Sep  9 10:24:17 v38 kernel: [24880095.291228] device eth0 left promiscuous
> mode
>
>  Should I try with an older stable version instead?? I th

Re: [OpenSIPS-Users] calling t_uac_cancel from opensips script

2014-09-09 Thread Jayesh Nambiar
Hello Razvan,
I extracted the source opensips-1.11.2-4c08b62_src.tar.gz created on Sept
7th and tried again. This time, as soon as the exec_avp command is fired,
the opensips stops processing anything after that. The service doesn't even
stop when tried to stop cleanly. It just hangs. After a minute or so, it
shuts down with the following in the logs:
Sep  9 10:23:17 v38 /usr/local/myOpensips/sbin/opensips[24832]:
DBG:core:pool_remove: connection still kept in the pool
Sep  9 10:23:17 v38 /usr/local/myOpensips/sbin/opensips[24832]:
DBG:core:pool_remove: removing connection from the pool

Sep  9 10:23:17 v38 /usr/local/myOpensips/sbin/opensips[24832]:
DBG:core:pool_remove: removing connection from the pool
Sep  9 10:24:17 v38 /usr/local/myOpensips/sbin/opensips[24832]:
CRITICAL:core:sig_alarm_abort: BUG - shutdown timeout triggered, dying...
Sep  9 10:24:17 v38 kernel: [24880095.291228] device eth0 left promiscuous
mode

Should I try with an older stable version instead?? I think there is
something wrong with the way this is going. Let me know if I can be of any
help to troubleshoot this further.

Thanks,

--- Jayesh

On Tue, Sep 9, 2014 at 7:19 PM, Răzvan Crainea  wrote:

>  Can you please update your sources? Bogdan made a fix on 24th of August that
> might be related to this.
>
> Best regards,
>
> Răzvan Crainea
> OpenSIPS Solutionswww.opensips-solutions.com
>
> On 09/09/2014 04:42 PM, Jayesh Nambiar wrote:
>
>  Hello Razvan,
> I am running 1.11.2 extracted from the following source file:
> opensips-1.11.2-4fda9a1_src.tar.gz
>
>  A little more background on the problem:
>  The caller is connected on TCP and relayed over UDP. The transaction
> that I am trying to cancel is an UDP transaction. I dont believe this
> should have any concern with the problem I'm facing but still mentioning.
> Basically I want to cancel this transaction, get the caller into the
> failure route and relay it to a different destination !!
>
> Thanks for the prompt replies.
>
>  --- Jayesh
>
> On Tue, Sep 9, 2014 at 7:07 PM, Răzvan Crainea 
> wrote:
>
>>  Hi, Jayesh!
>>
>> No, it should not be present. It is created by opensipsctl when a command
>> is issued. What version of OpenSIPS are you running?
>>
>> Best regards,
>>
>> Răzvan Crainea
>> OpenSIPS Solutionswww.opensips-solutions.com
>>
>>   On 09/09/2014 04:30 PM, Jayesh Nambiar wrote:
>>
>>  Hi,
>>  Just as an update, I only see opensips_fifo in the /tmp/ directory. Is
>> the opensips_receiver supposed to be present??
>>
>>  --- Jayesh
>>
>> On Tue, Sep 9, 2014 at 6:49 PM, Jayesh Nambiar 
>> wrote:
>>
>>>  Yes, running opensips with user root. Still the same problem.
>>>
>>>  --- Jayesh
>>>
>>> On Tue, Sep 9, 2014 at 6:22 PM, Răzvan Crainea 
>>> wrote:
>>>
>>>>  Hi, Jayesh!
>>>>
>>>> I think there is a permissions issue here. What is the user you are
>>>> running opensips with? Is it the same as the one you are trying to execute
>>>> the shell script?
>>>>
>>>> Best regards,
>>>>
>>>> Răzvan Crainea
>>>> OpenSIPS Solutionswww.opensips-solutions.com
>>>>
>>>>  On 09/09/2014 03:44 PM, Jayesh Nambiar wrote:
>>>>
>>>> Hello,
>>>>  I try to cancel a running transaction in opensips based on certain
>>>> conditions. When I try this from the script:
>>>>  exec_avp("/usr/local/myOpensips/sbin/opensipsctl fifo t_uac_cancel
>>>> $avp(caller_cid) $avp(caller_cseq)", "$avp(result)");
>>>>  The callid and cseq is properly substituted in the appropriate AVPs.
>>>>  I get, ** ERROR: error opening read fifo /tmp/opensips_receiver_24405
>>>> in the resulting AVP. Whereas when I run this command directly from my
>>>> shell it runs fine and cancels the transaction as expected.
>>>>  Tried to google around the problem and couldn't find much. I read
>>>> about some selinux thing that might block opensips from executing the MI
>>>> command, but I'm pretty sure selinux is disabled on my machine. Where else
>>>> do I look for a fix such that my script is able to execute this !!
>>>>
>>>>  Thanks in advance for any pointers.
>>>>
>>>>  --- Jayesh
>>>>
>>>>
>>>>  ___
>>>> Users mailing 
>>>> listUsers@lists.opensips.orghttp://lists.opensips.org/cgi-bin/mailman/listinfo/users
>>>>
>>>>
>>>

Re: [OpenSIPS-Users] calling t_uac_cancel from opensips script

2014-09-09 Thread Jayesh Nambiar
Hello Razvan,
I am running 1.11.2 extracted from the following source file:
opensips-1.11.2-4fda9a1_src.tar.gz

A little more background on the problem:
The caller is connected on TCP and relayed over UDP. The transaction that I
am trying to cancel is an UDP transaction. I dont believe this should have
any concern with the problem I'm facing but still mentioning. Basically I
want to cancel this transaction, get the caller into the failure route and
relay it to a different destination !!

Thanks for the prompt replies.

--- Jayesh

On Tue, Sep 9, 2014 at 7:07 PM, Răzvan Crainea  wrote:

>  Hi, Jayesh!
>
> No, it should not be present. It is created by opensipsctl when a command
> is issued. What version of OpenSIPS are you running?
>
> Best regards,
>
> Răzvan Crainea
> OpenSIPS Solutionswww.opensips-solutions.com
>
> On 09/09/2014 04:30 PM, Jayesh Nambiar wrote:
>
>  Hi,
>  Just as an update, I only see opensips_fifo in the /tmp/ directory. Is
> the opensips_receiver supposed to be present??
>
>  --- Jayesh
>
> On Tue, Sep 9, 2014 at 6:49 PM, Jayesh Nambiar 
> wrote:
>
>>  Yes, running opensips with user root. Still the same problem.
>>
>>  --- Jayesh
>>
>> On Tue, Sep 9, 2014 at 6:22 PM, Răzvan Crainea 
>> wrote:
>>
>>>  Hi, Jayesh!
>>>
>>> I think there is a permissions issue here. What is the user you are
>>> running opensips with? Is it the same as the one you are trying to execute
>>> the shell script?
>>>
>>> Best regards,
>>>
>>> Răzvan Crainea
>>> OpenSIPS Solutionswww.opensips-solutions.com
>>>
>>>  On 09/09/2014 03:44 PM, Jayesh Nambiar wrote:
>>>
>>> Hello,
>>>  I try to cancel a running transaction in opensips based on certain
>>> conditions. When I try this from the script:
>>>  exec_avp("/usr/local/myOpensips/sbin/opensipsctl fifo t_uac_cancel
>>> $avp(caller_cid) $avp(caller_cseq)", "$avp(result)");
>>>  The callid and cseq is properly substituted in the appropriate AVPs.
>>>  I get, ** ERROR: error opening read fifo /tmp/opensips_receiver_24405
>>> in the resulting AVP. Whereas when I run this command directly from my
>>> shell it runs fine and cancels the transaction as expected.
>>>  Tried to google around the problem and couldn't find much. I read about
>>> some selinux thing that might block opensips from executing the MI command,
>>> but I'm pretty sure selinux is disabled on my machine. Where else do I look
>>> for a fix such that my script is able to execute this !!
>>>
>>>  Thanks in advance for any pointers.
>>>
>>>  --- Jayesh
>>>
>>>
>>>  ___
>>> 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 
> 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] calling t_uac_cancel from opensips script

2014-09-09 Thread Jayesh Nambiar
Hi,
Just as an update, I only see opensips_fifo in the /tmp/ directory. Is the
opensips_receiver supposed to be present??

--- Jayesh

On Tue, Sep 9, 2014 at 6:49 PM, Jayesh Nambiar  wrote:

> Yes, running opensips with user root. Still the same problem.
>
> --- Jayesh
>
> On Tue, Sep 9, 2014 at 6:22 PM, Răzvan Crainea 
> wrote:
>
>>  Hi, Jayesh!
>>
>> I think there is a permissions issue here. What is the user you are
>> running opensips with? Is it the same as the one you are trying to execute
>> the shell script?
>>
>> Best regards,
>>
>> Răzvan Crainea
>> OpenSIPS Solutionswww.opensips-solutions.com
>>
>> On 09/09/2014 03:44 PM, Jayesh Nambiar wrote:
>>
>>Hello,
>>  I try to cancel a running transaction in opensips based on certain
>> conditions. When I try this from the script:
>>  exec_avp("/usr/local/myOpensips/sbin/opensipsctl fifo t_uac_cancel
>> $avp(caller_cid) $avp(caller_cseq)", "$avp(result)");
>>  The callid and cseq is properly substituted in the appropriate AVPs.
>>  I get, ** ERROR: error opening read fifo /tmp/opensips_receiver_24405 in
>> the resulting AVP. Whereas when I run this command directly from my shell
>> it runs fine and cancels the transaction as expected.
>>  Tried to google around the problem and couldn't find much. I read about
>> some selinux thing that might block opensips from executing the MI command,
>> but I'm pretty sure selinux is disabled on my machine. Where else do I look
>> for a fix such that my script is able to execute this !!
>>
>>  Thanks in advance for any pointers.
>>
>>  --- Jayesh
>>
>>
>> ___
>> 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] calling t_uac_cancel from opensips script

2014-09-09 Thread Jayesh Nambiar
Yes, running opensips with user root. Still the same problem.

--- Jayesh

On Tue, Sep 9, 2014 at 6:22 PM, Răzvan Crainea  wrote:

>  Hi, Jayesh!
>
> I think there is a permissions issue here. What is the user you are
> running opensips with? Is it the same as the one you are trying to execute
> the shell script?
>
> Best regards,
>
> Răzvan Crainea
> OpenSIPS Solutionswww.opensips-solutions.com
>
> On 09/09/2014 03:44 PM, Jayesh Nambiar wrote:
>
>Hello,
>  I try to cancel a running transaction in opensips based on certain
> conditions. When I try this from the script:
>  exec_avp("/usr/local/myOpensips/sbin/opensipsctl fifo t_uac_cancel
> $avp(caller_cid) $avp(caller_cseq)", "$avp(result)");
>  The callid and cseq is properly substituted in the appropriate AVPs.
>  I get, ** ERROR: error opening read fifo /tmp/opensips_receiver_24405 in
> the resulting AVP. Whereas when I run this command directly from my shell
> it runs fine and cancels the transaction as expected.
>  Tried to google around the problem and couldn't find much. I read about
> some selinux thing that might block opensips from executing the MI command,
> but I'm pretty sure selinux is disabled on my machine. Where else do I look
> for a fix such that my script is able to execute this !!
>
>  Thanks in advance for any pointers.
>
>  --- Jayesh
>
>
> ___
> 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


[OpenSIPS-Users] calling t_uac_cancel from opensips script

2014-09-09 Thread Jayesh Nambiar
Hello,
I try to cancel a running transaction in opensips based on certain
conditions. When I try this from the script:
exec_avp("/usr/local/myOpensips/sbin/opensipsctl fifo t_uac_cancel
$avp(caller_cid) $avp(caller_cseq)", "$avp(result)");
The callid and cseq is properly substituted in the appropriate AVPs.
I get, ** ERROR: error opening read fifo /tmp/opensips_receiver_24405 in
the resulting AVP. Whereas when I run this command directly from my shell
it runs fine and cancels the transaction as expected.
Tried to google around the problem and couldn't find much. I read about
some selinux thing that might block opensips from executing the MI command,
but I'm pretty sure selinux is disabled on my machine. Where else do I look
for a fix such that my script is able to execute this !!

Thanks in advance for any pointers.

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


Re: [OpenSIPS-Users] insert dialog end reason into DB

2014-08-25 Thread Jayesh Nambiar
I dont know why I thought of not having the pseudo variable directly in the
modparam. Thank you very much for such a simple solution. I'm just feeling
stupid about why I didn't think about this before :(

Thanks again.

--- Jayesh


On Mon, Aug 25, 2014 at 8:32 AM, Bogdan-Andrei Iancu 
wrote:

>  Hi Jayesh,
>
> have you tried to do directly:
>
> modparam("acc", "db_extra_bye", "sip_dlg_end_reason=$DLG_end_reason")
>
> Regards,
>
> Bogdan-Andrei Iancu
> OpenSIPS Founder and Developerhttp://www.opensips-solutions.com
>
> On 23.08.2014 14:25, Jayesh Nambiar wrote:
>
>  Hello,
>  How do you insert the $DLG_end_reason in a particular column in acc
> table?? I basically did set a db_extra_bye modparam as follows:
> modparam("acc", "db_extra_bye", "sip_dlg_end_reason=$avp(dlg_end_reason)")
>
>  The problem is; when I do this before the loose route:
>
>  if(is_method("BYE")) {
> $avp(dlg_end_reason) = $DLG_end_reason
> xlog("L_INFO", "Dialog End Reason is $avp(dlg_end_reason)");
>  }
>
>  The $DLG_end_reason returns NULL, since the dialog is not ended yet. And
> if I do the same after loose route, the xlog shows up proper dialog end
> reason but the same is not inserted into the DB since once the transaction
> enters into loose route and probably it cannot set the values for cdr.
>  So I am in kind of a deadlock here. Is there a solution to this??
>
> Thanks in advance,
>
>  --- Jayesh
>
>
> ___
> 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] insert dialog end reason into DB

2014-08-23 Thread Jayesh Nambiar
Hello,
How do you insert the $DLG_end_reason in a particular column in acc table??
I basically did set a db_extra_bye modparam as follows:
modparam("acc", "db_extra_bye", "sip_dlg_end_reason=$avp(dlg_end_reason)")

The problem is; when I do this before the loose route:

if(is_method("BYE")) {
   $avp(dlg_end_reason) = $DLG_end_reason
   xlog("L_INFO", "Dialog End Reason is $avp(dlg_end_reason)");
}

The $DLG_end_reason returns NULL, since the dialog is not ended yet. And if
I do the same after loose route, the xlog shows up proper dialog end reason
but the same is not inserted into the DB since once the transaction enters
into loose route and probably it cannot set the values for cdr.
So I am in kind of a deadlock here. Is there a solution to this??

Thanks in advance,

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


Re: [OpenSIPS-Users] skip version table check

2014-08-22 Thread Jayesh Nambiar
Thanks for the quick response. Will keep note of it.

--- Jayesh


On Fri, Aug 22, 2014 at 8:47 PM, Bogdan-Andrei Iancu 
wrote:

>  Hi,
>
> No you cannot and it not wise to do it (even if you have a customized
> structure) - when you upgrade and the check will fail, at least it will be
> a warning to check the structure to see what changed.
>
> Regards,
>
> Bogdan-Andrei Iancu
> OpenSIPS Founder and Developerhttp://www.opensips-solutions.com
>
> On 22.08.2014 18:01, Jayesh Nambiar wrote:
>
>  Hello,
>  Is there a way I can avoid opensips script check the version table for
> specific modules while starting up. My database structure is customized and
> doesn't use default opensips DB structure. I have to keep the version table
> just because opensips checks it on the startup.
>
> Thanks,
>
>  W/regards,
> Jayesh
>
>
> ___
> 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] skip version table check

2014-08-22 Thread Jayesh Nambiar
Hello,
Is there a way I can avoid opensips script check the version table for
specific modules while starting up. My database structure is customized and
doesn't use default opensips DB structure. I have to keep the version table
just because opensips checks it on the startup.

Thanks,

W/regards,
Jayesh
___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


Re: [OpenSIPS-Users] send params in mi_json

2014-07-23 Thread Jayesh Nambiar
Thanks Razvan. So the correct format is:
GET /json/dlg_end_dlg?params=1368%2C1091608310 if your h_entry is 1368 and
h_id is 1091608310.
This works fine. Thanks again.

--- Jayesh


On Wed, Jul 23, 2014 at 1:08 PM, Răzvan Crainea  wrote:

> Hi, Jayesh!
>
> According to the examples in the documentation[1], parameters should be
> separated using comma.
>
> [1] http://www.opensips.org/html/docs/modules/1.11.x/mi_json.html#id249590
>
> Best regards,
>
> Razvan Crainea
> OpenSIPS Core Developer
> http://www.opensips-solutions.com
>
>
> On 07/22/2014 06:20 PM, Jayesh Nambiar wrote:
>
>> Hello,
>> Can somebody please help me in passing parameters in HTTP GET Request.
>> I'm using mi_json to send commands to opensips. I wanted to end a
>> running dialog based on certain conditions. For example, if my dialog-id
>> is 1368:1091608310; I would normally run opensipsctl fifo dlg_end_dlg
>> 1368 1091608310 from the CLI.
>>
>> I tried the following from the http client:
>> GET /json/dlg_end_dlg?params=1368%201091608310 (Adding a space with %20)
>> GET /json/dlg_end_dlg?params=1368:1091608310 (sending the colon)
>> GET /json/dlg_end_dlg?params=1368%3A1091608310 (URL encoded the colon)
>>
>> But nothing above works. Somehow the params dont reach as expected to
>> the opensips. When I run a command that dont expect any params it works
>> well.
>> For eg: GET /json/dlg_list works well and returns the running dialogs in
>> json format as expected. But commands with parameters just fails !!
>>
>> I tried googling for examples but couldn't find much and I'm just doing
>> trial and error for a while :(
>>
>> --- Jayesh
>>
>>
>>
>> ___
>> 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] send params in mi_json

2014-07-22 Thread Jayesh Nambiar
Hello,
Can somebody please help me in passing parameters in HTTP GET Request. I'm
using mi_json to send commands to opensips. I wanted to end a running
dialog based on certain conditions. For example, if my dialog-id is
1368:1091608310; I would normally run opensipsctl fifo dlg_end_dlg 1368
1091608310 from the CLI.

I tried the following from the http client:
GET /json/dlg_end_dlg?params=1368%201091608310 (Adding a space with %20)
GET /json/dlg_end_dlg?params=1368:1091608310 (sending the colon)
GET /json/dlg_end_dlg?params=1368%3A1091608310 (URL encoded the colon)

But nothing above works. Somehow the params dont reach as expected to the
opensips. When I run a command that dont expect any params it works well.
For eg: GET /json/dlg_list works well and returns the running dialogs in
json format as expected. But commands with parameters just fails !!

I tried googling for examples but couldn't find much and I'm just doing
trial and error for a while :(

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


Re: [OpenSIPS-Users] httpd module only listening on localhost

2014-07-22 Thread Jayesh Nambiar
This took like 2 hours to figure out. Another dev had already defined the
modparams close to bottom of the file :(
Sorry for the false issue raised. Serious carelessness !!

--- Jayesh


On Tue, Jul 22, 2014 at 7:20 PM, Ovidiu Sas  wrote:

> Probably you are loading a wrong config file (wrong location perhaps).
> On Jul 22, 2014 9:46 AM, "Jayesh Nambiar"  wrote:
>
>> Hi Ovidiu,
>> Thanks for the response. In opensipsctl ps following shows up for HTTPD:
>> Process::  ID=1 PID=1932 Type=HTTPD 127.0.0.1:8080
>>
>> Whereas, I have set the httpd parameter as follows:
>> modparam("httpd", "ip", "203.XXX.53.XXX")
>> modparam("httpd", "port", 8000)
>>
>> It is not listening to the IP I've mentioned as well as it runs on 8080
>> port by default. It doesn't obey the modparams defined :(
>> My http client is sitting remote and wants to send MI Commands to control
>> it over mi_json. Dont know what I'm doing wrong here !!
>>
>> Thanks for any response !!
>>
>> --- Jayesh
>>
>>
>> On Tue, Jul 22, 2014 at 6:04 PM, Ovidiu Sas 
>> wrote:
>>
>>> There are no limitations in terms of IP binding. If you run 'opensipsctl
>>> ps' you will see the httpd process listed with the listening IP and port.
>>>
>>> Regards,
>>> Ovidiu Sas
>>> On Jul 22, 2014 7:03 AM, "Jayesh Nambiar"  wrote:
>>>
>>>> Hello,
>>>> I am trying to load the httpd module and trying to execute some
>>>> commands from a remote server towards opensips http server. But the problem
>>>> is, opensips by default only listens on localhost. I tried setting the
>>>> following parameter:
>>>> modparam("httpd", "ip", "1.2.3.4")
>>>> modparam("httpd", "port", "8000")
>>>>
>>>> But when starting up it still shows that its only listening on
>>>> localhost !! netstat also confirms that port 8000 is only being used by
>>>> localhost.
>>>>
>>>> Am i missing something here or is something wrong with the module
>>>> parameter.
>>>>
>>>> Thanks for pointers,
>>>>
>>>> --- Jayesh
>>>>
>>>> ___
>>>> 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
>>
>>
> ___
> 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] httpd module only listening on localhost

2014-07-22 Thread Jayesh Nambiar
Hi Ovidiu,
Thanks for the response. In opensipsctl ps following shows up for HTTPD:
Process::  ID=1 PID=1932 Type=HTTPD 127.0.0.1:8080

Whereas, I have set the httpd parameter as follows:
modparam("httpd", "ip", "203.XXX.53.XXX")
modparam("httpd", "port", 8000)

It is not listening to the IP I've mentioned as well as it runs on 8080
port by default. It doesn't obey the modparams defined :(
My http client is sitting remote and wants to send MI Commands to control
it over mi_json. Dont know what I'm doing wrong here !!

Thanks for any response !!

--- Jayesh


On Tue, Jul 22, 2014 at 6:04 PM, Ovidiu Sas  wrote:

> There are no limitations in terms of IP binding. If you run 'opensipsctl
> ps' you will see the httpd process listed with the listening IP and port.
>
> Regards,
> Ovidiu Sas
> On Jul 22, 2014 7:03 AM, "Jayesh Nambiar"  wrote:
>
>> Hello,
>> I am trying to load the httpd module and trying to execute some commands
>> from a remote server towards opensips http server. But the problem is,
>> opensips by default only listens on localhost. I tried setting the
>> following parameter:
>> modparam("httpd", "ip", "1.2.3.4")
>> modparam("httpd", "port", "8000")
>>
>> But when starting up it still shows that its only listening on localhost
>> !! netstat also confirms that port 8000 is only being used by localhost.
>>
>> Am i missing something here or is something wrong with the module
>> parameter.
>>
>> Thanks for pointers,
>>
>> --- Jayesh
>>
>> ___
>> 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] httpd module only listening on localhost

2014-07-22 Thread Jayesh Nambiar
Hello,
I am trying to load the httpd module and trying to execute some commands
from a remote server towards opensips http server. But the problem is,
opensips by default only listens on localhost. I tried setting the
following parameter:
modparam("httpd", "ip", "1.2.3.4")
modparam("httpd", "port", "8000")

But when starting up it still shows that its only listening on localhost !!
netstat also confirms that port 8000 is only being used by localhost.

Am i missing something here or is something wrong with the module parameter.

Thanks for pointers,

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


Re: [OpenSIPS-Users] Getting core dialog info from script

2014-07-18 Thread Jayesh Nambiar
Cool, Thanks a lot.

--- Jayesh


On Fri, Jul 18, 2014 at 6:29 PM, Bogdan-Andrei Iancu 
wrote:

>  Hi,
>
> Take a look at $DLG_did:
> http://www.opensips.org/html/docs/modules/1.11.x/dialog.html#id297123
>
> Regards,
>
> Bogdan-Andrei Iancu
> OpenSIPS Founder and Developerhttp://www.opensips-solutions.com
>
> On 18.07.2014 15:47, Jayesh Nambiar wrote:
>
>   Hi All,
>  Is it possible to get the dialog information like hash and state from the
> script. The idea is to store such values in a cachedb and some application
> can directly fetch these values and execute dlg_end_dlg kind of things
> towards opensips over mi_json or something similar !!
>  Currently, the application sends a profile_list_dlg, then fetches the
> hash values of dialogs and then again sends another mi command dlg_end_dlg
> to disconnect the call.
> Any easy way to get such dialog attributes from the script??
>
> Thanks in advance,
>
>  --- Jayesh
>
>
> ___
> 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] Getting core dialog info from script

2014-07-18 Thread Jayesh Nambiar
Hi All,
Is it possible to get the dialog information like hash and state from the
script. The idea is to store such values in a cachedb and some application
can directly fetch these values and execute dlg_end_dlg kind of things
towards opensips over mi_json or something similar !!
Currently, the application sends a profile_list_dlg, then fetches the hash
values of dialogs and then again sends another mi command dlg_end_dlg to
disconnect the call.
Any easy way to get such dialog attributes from the script??

Thanks in advance,

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


Re: [OpenSIPS-Users] Parking a Call using b2b modules

2014-06-18 Thread Jayesh Nambiar
Thank you Bogdan. I'll try and implement this tomorrow and see how it goes.
Thanks again.

--- Jayesh


On Wed, Jun 18, 2014 at 7:28 PM, Bogdan-Andrei Iancu 
wrote:

>  Jayesh,
>
> Using the t_was_cancelled() function in failure route will tell you if the
> CANCEL was local or received from the caller side:
> http://www.opensips.org/html/docs/modules/1.11.x/tm.html#id295325
>
> The call_center module is designed to reject calls if there is no agent
> logged in. Even if we change that, to be sure the right call is distributed
> to right agent, you will end up creating one flow/queue per user, which is
> not really scalable.
>
> Regards,
>
> Bogdan-Andrei Iancu
> OpenSIPS Founder and Developerhttp://www.opensips-solutions.com
>
> On 18.06.2014 14:02, Jayesh Nambiar wrote:
>
> Hi Bogdan,
> Thanks for your response. I get your idea of sending the call to an
> unexisting destination which might work in my case. Would the failure route
> have a way to distinguish between the CANCEL generated by the script and
> the caller itself, such that I might not end up trying to route a call to
> the callee, when the caller has Cancelled it !!
>
>  Another hypothetical question which may or may not be related:
> I see a new callcenter module which queues the caller till the call is
> answered by an Agent with registered endpoint. Can't the callcenter module
> queue a call, if there are no agents logged in?? Because if it can, it
> looks similar to the problem I mentioned, which waits for the agent to be
> registered and route the call as soon as the user registers (logs in as an
> agent).
>
>  Just a thought for figuring out a neater solution to my problem. Thanks
> for all your suggestions.
>
>  --- Jayesh
>
>
>
>
>
>
> On Wed, Jun 18, 2014 at 2:51 PM, Bogdan-Andrei Iancu 
> wrote:
>
>>  Hi Jayesh,
>>
>> I see your point - if you do not want to send media to the caller (while
>> in park), when you decide to park the call you can simply send back an 180
>> ringing and then relay to call to a fake unexisting destination with
>> timeout == "how long to keep the call in parking". That branch will timeout
>> (as there is no UAS) and return to failure route (if not picked up in the
>> mean while). if the target user registers in the mean while, you do the
>> cancel stuff as initially described.
>>
>> Once again, the b2b is not useful here - why? as there you your handling
>> is at transaction level (call is not accepted, you play with multiple
>> branches) and not at call level (handling 1 or more accepted calls)
>>
>>
>> Regards,
>>
>> Bogdan-Andrei Iancu
>> OpenSIPS Founder and Developerhttp://www.opensips-solutions.com
>>
>>   On 18.06.2014 08:42, Jayesh Nambiar wrote:
>>
>> Hi Bogdan,
>> Thanks for the reply. But the challenge with me is that I don't want to
>> use an additional component like a Media Server in this setup. The idea is
>> to get away with too many components which can act like point of failures.
>> Hence I was exploring the idea of parking the call in Opensips itself and
>> do the routing within Opensips without the need of an external media server.
>> Any possibility of this being done within opensips?? And the only option
>> that I can see for this is the b2b modules.
>>
>>  --- Jayesh
>>
>>
>>  On Tue, Jun 17, 2014 at 8:44 PM, Bogdan-Andrei Iancu <
>> bog...@opensips.org> wrote:
>>
>>>  Hi Jayesh,
>>>
>>> For such scenario you do not need b2b at all. You can do it at signaling
>>> level. How ?
>>> - determine that the incoming call needs to be parked
>>> - send the call to a media server to play some ringing via 183 early
>>> media (call still not accepted); also push DB record to with the callid +
>>> user the call belongs to;
>>> - if target user registers -> check in DB for parked calls -> if yes,
>>> run a script to trigger the cancelling of that branch to media server (see
>>> t_uac_cancel MI command
>>> http://www.opensips.org/html/docs/modules/1.11.x/tm.html#id295912)
>>> - original call will go into failure route (because of the canceling) ->
>>> from there you can create a new branch to the newly registered user.
>>>
>>> I haven't tried, but it should work :)
>>>
>>> Regards,
>>>
>>> Bogdan-Andrei Iancu
>>> OpenSIPS Founder and Developerhttp://www.opensips-solutions.com
>>>
>>>  On 17.06.2014 12:57, Jayesh Nambiar wrote:
>>>
>>>  Hello All,
>>> I was trying to

Re: [OpenSIPS-Users] Parking a Call using b2b modules

2014-06-18 Thread Jayesh Nambiar
Hi Bogdan,
Thanks for your response. I get your idea of sending the call to an
unexisting destination which might work in my case. Would the failure route
have a way to distinguish between the CANCEL generated by the script and
the caller itself, such that I might not end up trying to route a call to
the callee, when the caller has Cancelled it !!

Another hypothetical question which may or may not be related:
I see a new callcenter module which queues the caller till the call is
answered by an Agent with registered endpoint. Can't the callcenter module
queue a call, if there are no agents logged in?? Because if it can, it
looks similar to the problem I mentioned, which waits for the agent to be
registered and route the call as soon as the user registers (logs in as an
agent).

Just a thought for figuring out a neater solution to my problem. Thanks for
all your suggestions.

--- Jayesh






On Wed, Jun 18, 2014 at 2:51 PM, Bogdan-Andrei Iancu 
wrote:

>  Hi Jayesh,
>
> I see your point - if you do not want to send media to the caller (while
> in park), when you decide to park the call you can simply send back an 180
> ringing and then relay to call to a fake unexisting destination with
> timeout == "how long to keep the call in parking". That branch will timeout
> (as there is no UAS) and return to failure route (if not picked up in the
> mean while). if the target user registers in the mean while, you do the
> cancel stuff as initially described.
>
> Once again, the b2b is not useful here - why? as there you your handling
> is at transaction level (call is not accepted, you play with multiple
> branches) and not at call level (handling 1 or more accepted calls)
>
>
> Regards,
>
> Bogdan-Andrei Iancu
> OpenSIPS Founder and Developerhttp://www.opensips-solutions.com
>
> On 18.06.2014 08:42, Jayesh Nambiar wrote:
>
> Hi Bogdan,
> Thanks for the reply. But the challenge with me is that I don't want to
> use an additional component like a Media Server in this setup. The idea is
> to get away with too many components which can act like point of failures.
> Hence I was exploring the idea of parking the call in Opensips itself and
> do the routing within Opensips without the need of an external media server.
> Any possibility of this being done within opensips?? And the only option
> that I can see for this is the b2b modules.
>
>  --- Jayesh
>
>
>  On Tue, Jun 17, 2014 at 8:44 PM, Bogdan-Andrei Iancu  > wrote:
>
>>  Hi Jayesh,
>>
>> For such scenario you do not need b2b at all. You can do it at signaling
>> level. How ?
>> - determine that the incoming call needs to be parked
>> - send the call to a media server to play some ringing via 183 early
>> media (call still not accepted); also push DB record to with the callid +
>> user the call belongs to;
>> - if target user registers -> check in DB for parked calls -> if yes, run
>> a script to trigger the cancelling of that branch to media server (see
>> t_uac_cancel MI command
>> http://www.opensips.org/html/docs/modules/1.11.x/tm.html#id295912)
>> - original call will go into failure route (because of the canceling) ->
>> from there you can create a new branch to the newly registered user.
>>
>> I haven't tried, but it should work :)
>>
>> Regards,
>>
>> Bogdan-Andrei Iancu
>> OpenSIPS Founder and Developerhttp://www.opensips-solutions.com
>>
>>  On 17.06.2014 12:57, Jayesh Nambiar wrote:
>>
>>  Hello All,
>> I was trying to explore an option of parking a call on opensips using b2b
>> modules with a trying or ringing response. More precisely, I was trying to
>> do something like this:
>> http://lists.opensips.org/pipermail/users/2010-October/014849.html
>>
>>  As soon as the call comes in, use b2b_logic to park the call. If the
>> called user is registered, route the call; else keep the caller parked for
>> 45 seconds, and within this duration if the called user registers, raise a
>> E_REGISTERED event.
>> Identify if there is a call parked for the user that just registered and
>> if yes route the call or else respond with 408 timeout to the caller.
>> I thought, it should be possible using the b2b modules and the event
>> interface that opensips got. Am I thinking in the right direction from
>> possibility perspective?? Can someone help me understand if this logic can
>> be implemented within the script??
>>
>>  Thanks in advance,
>>
>>  --- Jayesh
>>
>>
>>  ___
>> 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] Parking a Call using b2b modules

2014-06-17 Thread Jayesh Nambiar
Hi Bogdan,
Thanks for the reply. But the challenge with me is that I don't want to use
an additional component like a Media Server in this setup. The idea is to
get away with too many components which can act like point of failures.
Hence I was exploring the idea of parking the call in Opensips itself and
do the routing within Opensips without the need of an external media server.
Any possibility of this being done within opensips?? And the only option
that I can see for this is the b2b modules.

--- Jayesh


On Tue, Jun 17, 2014 at 8:44 PM, Bogdan-Andrei Iancu 
wrote:

>  Hi Jayesh,
>
> For such scenario you do not need b2b at all. You can do it at signaling
> level. How ?
> - determine that the incoming call needs to be parked
> - send the call to a media server to play some ringing via 183 early media
> (call still not accepted); also push DB record to with the callid + user
> the call belongs to;
> - if target user registers -> check in DB for parked calls -> if yes, run
> a script to trigger the cancelling of that branch to media server (see
> t_uac_cancel MI command
> http://www.opensips.org/html/docs/modules/1.11.x/tm.html#id295912)
> - original call will go into failure route (because of the canceling) ->
> from there you can create a new branch to the newly registered user.
>
> I haven't tried, but it should work :)
>
> Regards,
>
> Bogdan-Andrei Iancu
> OpenSIPS Founder and Developerhttp://www.opensips-solutions.com
>
> On 17.06.2014 12:57, Jayesh Nambiar wrote:
>
> Hello All,
> I was trying to explore an option of parking a call on opensips using b2b
> modules with a trying or ringing response. More precisely, I was trying to
> do something like this:
> http://lists.opensips.org/pipermail/users/2010-October/014849.html
>
>  As soon as the call comes in, use b2b_logic to park the call. If the
> called user is registered, route the call; else keep the caller parked for
> 45 seconds, and within this duration if the called user registers, raise a
> E_REGISTERED event.
> Identify if there is a call parked for the user that just registered and
> if yes route the call or else respond with 408 timeout to the caller.
> I thought, it should be possible using the b2b modules and the event
> interface that opensips got. Am I thinking in the right direction from
> possibility perspective?? Can someone help me understand if this logic can
> be implemented within the script??
>
>  Thanks in advance,
>
>  --- Jayesh
>
>
> ___
> 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] Parking a Call using b2b modules

2014-06-17 Thread Jayesh Nambiar
Hello All,
I was trying to explore an option of parking a call on opensips using b2b
modules with a trying or ringing response. More precisely, I was trying to
do something like this:
http://lists.opensips.org/pipermail/users/2010-October/014849.html

As soon as the call comes in, use b2b_logic to park the call. If the called
user is registered, route the call; else keep the caller parked for 45
seconds, and within this duration if the called user registers, raise a
E_REGISTERED event.
Identify if there is a call parked for the user that just registered and if
yes route the call or else respond with 408 timeout to the caller.
I thought, it should be possible using the b2b modules and the event
interface that opensips got. Am I thinking in the right direction from
possibility perspective?? Can someone help me understand if this logic can
be implemented within the script??

Thanks in advance,

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


[OpenSIPS-Users] BYE routed incorrectly when applications on same host

2014-05-16 Thread Jayesh Nambiar
Hi All,
I have a Freeswitch, OpenSIPS and Oversip all on the same server and
different ports. Freeswitch originates a call, goes to OpenSIPS,
OpenSIPS looks up into location and figures that it supposed to be routed
to Oversip and routes it to Oversip and the call is connected with a WebRTC
JsSip client.
But when the call is disconnected from the WebRTC client, the Oversip
directly routes the BYE to Freeswitch instead of going Via OpenSIPS.
Basically the BYE originated from JS-SIP itself has Freeswitch IP and Port
in the URI :(
But if I run Oversip on a different server, the routing of BYE from WebRTC
client is as expected which is from Oversip to OpenSIPS to Freeswitch.

Can someone point me to why this happens when the application runs on the
same host !! Should I add some additional functions when running
applications on same host.

My default route contains this for all calls:
# record routing
if (!is_method("REGISTER|MESSAGE")) {
record_route();
}

Thanks in advance;

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


Re: [OpenSIPS-Users] Audio calls not working on 3G

2014-03-07 Thread Jayesh Nambiar
Your work firewall must be blocking packets when you test on 3G. The Wifi
must be within your work network !! I hope you are using RTPProxy or
MediaProxy to handle media when originated from NATed clients. If yes, you
dont need STUN and TURN as of now.

--- Jayesh


On Fri, Mar 7, 2014 at 5:01 PM, Rajesh Babu wrote:

> Hi All,
>
>
>
>   I use Opensips 1.9.1 and have enabled RTP and Nating in the
> configuration, Whenever I use to connect the calls using my 3G connection,
> call gets connected but my voice is not being heard, whereas though wifi
> everything is working fine. I tried connecting with Linphone I didn't face
> any issue, where as whenever I try connecting using my app which on top of
> CSip I am getting this issue. This issue is not getting replicated over
> wifi, I am getting this issue only on 3G. My carrier is not blocking any
> packets from my side as different opensource client is letting me make
> calls over the SIP.
>
>
>
> Some blogs stated that configuring Stun will solve this issue, I tried
> doing it but no luck. In some other blog they where stating I can go with
> TURN Server, I need to know whether Turn servers solve these issues and
> someone can put me over the installation and using guide for the same.
>
>
>
> Can someone please direct me on the right track please?
>
>
>
> -Thanks
>
> Rajesh
>
> ___
> 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] [RELEASES] Planing OpenSIPS 1.11.0 major release

2014-03-07 Thread Jayesh Nambiar
Great News !!

--- Jayesh


On Fri, Mar 7, 2014 at 4:09 PM, Bogdan-Andrei Iancu wrote:

> sorry, I meant 1.11 beta, not 1.10 :)
>
>
> Bogdan-Andrei Iancu
> OpenSIPS Founder and Developer
> http://www.opensips-solutions.com
>
> On 07.03.2014 12:34, Bogdan-Andrei Iancu wrote:
>
>> Hello,
>>
>> The beta release for 1.10 got green light for 20th of March - still many
>> things to do, many new exciting features to added, many fixes to be done.
>>
>> I really want to thanks to all the people contributing to this
>> tremendous work - providing patches, testing, reporting, fixing bug. It
>> is a real community effort.
>>
>> Regards,
>>
>> Bogdan-Andrei Iancu
>> OpenSIPS Founder and Developer
>> http://www.opensips-solutions.com
>>
>> On 13.02.2014 18:49, Bogdan-Andrei Iancu wrote:
>>
>>> Hello all ,
>>>
>>> We made a new evaluation of the thinks we plan to have ready for 1.11
>>> and time is not enough. In order to get a valuable and consistent release,
>>> the decision was to delay the 1.11 release for mid March - this will
>>> allow us to complete the ongoing tasks and have a really good set of
>>> features for 1.11
>>>
>>> If there are any comments to this, please let us know.
>>>
>>> Best regards,
>>>
>>> Bogdan-Andrei Iancu
>>> OpenSIPS Founder and Developer
>>> http://www.opensips-solutions.com
>>>
>>> On 04.11.2013 19:58, Bogdan-Andrei Iancu wrote:
>>>
 Hi all,

 I would like to start a discussion about the next OpenSIPS major release
 - and in this discussion anyone is welcomed with options, ideas,
 critics
 and other. Your feedback is important to drive the project into a
 direction that reflects the user's needs!.

 So, I will list here the starting points, for both release planing and
 release content.


 Content
 ---
 What was done:
  http://www.opensips.org/About/Version-1-11-0#toc2
 What is planned:
  http://www.opensips.org/About/Version-1-11-0#toc9
 Planned items have priorities (for being addressed); it is a must to
 have all items done for the next release, as we need to fit into a time
 frame. Whatever is not done, will be left for the next release (1.12 ?)

 Additional thinks (not listed on web) we are considering are:
  - new "call queuing" module
  - new SMPP module
  - async operations at script level (doing async db ops, exec, rest
 queries)
  - dropping avpops module (and replacing with dbops module)
  - simplify scripting/logic by dropping the usage of AVPs (defined
 as
 module params) in favor of explicit func. params
  - better handling of UAC transactions (being able to set failure
 routes for them, to fire new requests from script)
  - Quality routing in Dynamic Routing
 Also we target so work in the RTPProxy area (still under heavy planing)
 like restart persistence, replication and statistics .


 Planing
 ---
 Release candidate:
  second half of January 2014, depending on the progress with the
 items to be done.
 Testing phase:
  1 month allocated (it may be extended if critical problems show up)
 Stable release:
  second half of February (after the testing phase is done).


 Once again, your feedback on these matters is important to us.


 Best regards,


>>>
>>> ___
>>> 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
>
___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


Re: [OpenSIPS-Users] Fwd: uac_auth() segfault

2014-02-21 Thread Jayesh Nambiar
Hi,
This is how I do it on 1.11 dev version and it works absolutely as expected:

modparam("uac_auth","credential","username:domain:password")
modparam("uac_auth","auth_realm_avp","$avp(domain)")
modparam("uac_auth","auth_username_avp","$avp(username)")
modparam("uac_auth","auth_password_avp","$avp(password)")

route[uac_auth] {
$avp(username) = "abc";
$avp(password) = "12344556";
$avp(domain) = "abc.com";

 uac_replace_from("sip:$avp(username)@$avp(domain)");
$rd = $avp(siptrunk_domain);
$avp(outbound_proxy) = "1.2.3.4" # ---This is the
destination IP---

$var(duri) = "sip:"+$rU+"@"+$avp(outbound_proxy);
 $du = $var(duri);

t_on_failure("UAC_AUTH_FAIL");
if(!t_relay()) {
 sl_reply_error();
exit;
 }
exit;
}

failure_route[UAC_AUTH_FAIL] {
  if (t_check_status("40[17]")) {
 xlog("got challenged \n");

uac_auth();
xlog("L_INFO", "Return code is $retcode");
 $rd = $avp(outbound_proxy);
t_relay();
 exit;
}
}


On Fri, Feb 21, 2014 at 4:28 AM, James Palic  wrote:

> Bogdan-Andrei Iancu  writes:
>
> >
> >
> > Hello,
> > Do you have still have the corefile ? Are you able to extract a
> > backtrace from it . See:
> >
> > http://www.opensips.org/Documentation/TroubleShooting-Crash
> > Regards,
> >   Bogdan-Andrei Iancu
> > OpenSIPS Founder and Developer
> > http://www.opensips-solutions.com
> >   On 21.01.2014 15:35, Justin Zondagh wrote:
> >
> >
> >
> >
> >   Hi All,
> >
> > I'm running a compiled version of openSIPS 1.10 on
> >   Ubuntu 12.04.
> >
> > I'm getting a segfault in the uac_auth() function and
> >   not too sure why. I am setting the username, password and
> >   realm avps before I call it.
> >
> > The 401 comes in back from the UAS and then hits the
> >   failure_route[1], does some stuff and then crashes in what
> >   seems like uac_auth()...
> >
> >
> >  Back trace =
> >
> > available upon request
> >
> >
> >
> > Any ideas?
> >
> > Regards,
> >
> >
> >
> >
> >   Justin Zondaghzondagh-
> re5jqeeqqe8avxtiumw...@public.gmane.org
> >   Cape Town | South Africa
> >
> > skype: jrzondagh
> >   m: +27 72 598
> >   4887 | f: +27 86 546
> >   1405
> >
> >   uk: +44 20 328
> >   99610
> >   ___
> > Users mailing list
> > Users@lists.opensips.org
> > http://lists.opensips.org/cgi-bin/mailman/listinfo/users
> >
>
> Hi Bogdan,
>
> I'm am also experiencing a segfault with uac_auth() in OpenSIPS 1.10
> (running on Debian). Following the Troubleshooting directions, bt full
> shows:
>
> #0 0x in ?? ()
> No symbol table info available.
> #1 0x7fa4987ee370 in ?? ()
> No symbol table info available.
> #2 0x7fa4987ee370 in ?? ()
> No symbol table info available.
> #3 0x00479383 in ?? ()
> No symbol table info available.
> #3 0x in ?? ()
> No symbol table info available.
>
> Doesn't seem that useful for debugging.  What am I missing using gdb?
>
> Jim
>
>
>
>
>
>
> ___
> 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] Initializing SIP messages from routing

2014-02-13 Thread Jayesh Nambiar
Hi,
CRBT is caller ring back tone. What you are primarily looking at is sending
the INVITE to some b2bua like FreeSWITCH or Asterisk where you control both
legs of the call. So when you get a ringing signal from the B-leg, you play
some media file on the A-leg.

--- Jayesh

On Friday, February 7, 2014, Bogdan-Andrei Iancu 
wrote:

>  Hello,
>
> No sure what CRBT stands for, but it looks to me that you need to use B2B
> module - what you are trying to do is something more than simply proxying a
> call.
>
> Regards,
>
> Bogdan-Andrei Iancu
> OpenSIPS Founder and Developerhttp://www.opensips-solutions.com
>
> On 07.02.2014 19:00, H Yavari wrote:
>
>  Hi Bogdan,
> thanks for your answer. I want to implement CRBT. For this I want when the
> invite received,I send an invite to media server and play something.
> I can do this with B2BUA? I write a module for this or do with script?
> script running has side effect on performance when load is high?
>
>  Regards,
> H.Yavari
>
>   --
>
>  Hello,
>
> Typically you process in OpenSIPS script an incoming request (and you fwd
> or reply it). It is unusual to generate a new request while processing
> another one.
>
> May I ask about your scenario ?
>
> Regards,
>
> Bogdan-Andrei Iancu
> OpenSIPS Founder and Developerhttp://www.opensips-solutions.com
>
> On 28.01.2014 10:02, H Yavari wrote:
>
>  Hi to all openSIPSer,
> I want to initialize a sip message from routing, is it possible?
> If only way that do this is writing script, is this efficient when load on
> openSIPS is high?
> If answer is yes, can you give me some example to how do this?
>
>  Regards,
> H.Yavari
>
>
> ___
> Users mailing listus...@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] redis for db_cachedb

2013-12-03 Thread Jayesh Nambiar
Hello,
Since now you can execute raw redis queries directly from Opensips, is it
also possible to use redis for user_location and dialog storage like you
can do with mongo??

Thanks,

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


Re: [OpenSIPS-Users] db pasword contains @

2013-10-30 Thread Jayesh Nambiar
Thank you. Will wait for an update.

--- Jayesh
On Oct 30, 2013 2:12 PM, "Bogdan-Andrei Iancu"  wrote:

> **
> Hello Jayesh,
>
> I checked the parser for the db_url and escaping is not supported,
> unfortunately. I understand your frustration - already been there, but I
> had to luck of the option to change the passwd.
>
> Let me make an extension to the parse to allow escaped chars via '\' . Be
> back with you.
>
> Thank and regards,
>
> Bogdan-Andrei Iancu
> OpenSIPS Founder and Developerhttp://www.opensips-solutions.com
>
>
> On 10/24/2013 09:26 AM, Jayesh Nambiar wrote:
>
> Nothing works here. I guess the format of specifying this should be
> changed where the username and password can be allowed to be put in single
> quotes which sounds most appropriate for now.
> Like you mentioned, I could change the DB password but not everyone has
> that luxury!!
>
>  --- Jayesh
>
>
> On Wed, Oct 23, 2013 at 4:05 PM, David J  wrote:
>
>> OK then for sure URL encode the @ symbol. Changing password would be
>> ideal but not everyone has the luxury
>>  On Oct 23, 2013 6:13 AM, "Schneur Rosenberg" 
>> wrote:
>>
>>> Didn't work for me at the time, maybe it has been fixed since
>>> On Oct 23, 2013 1:10 PM, "David J"  wrote:
>>>
>>>> Or just do user:'p@ssword' in quotes and it should work without
>>>> changing anything
>>>> On Oct 23, 2013 6:05 AM, "Schneur Rosenberg" 
>>>> wrote:
>>>>
>>>>> I had this problem in the past and all I did was change my password,
>>>>> if you need to keep this password then add another MySQL user and give it
>>>>> correct permissions and use that in your script
>>>>> On Oct 23, 2013 1:01 PM, "Jayesh Nambiar" 
>>>>> wrote:
>>>>>
>>>>>> Yes, still doesn't work.
>>>>>>
>>>>>>  --- Jayesh
>>>>>>
>>>>>>
>>>>>> On Wed, Oct 23, 2013 at 2:35 PM, Aamir  wrote:
>>>>>>
>>>>>>> Have you tried with backslash/slosh.
>>>>>>>
>>>>>>>
>>>>>>> Thanks & Regards,
>>>>>>>
>>>>>>> Aamir Chougule
>>>>>>> Cell: 08097989101
>>>>>>> Skype-ID: aamir_ryu
>>>>>>>
>>>>>>> --- Sent from my BlackBerry ---
>>>>>>>
>>>>>>> -Original Message-
>>>>>>> From: Jayesh Nambiar 
>>>>>>> Sender: users-boun...@lists.opensips.org
>>>>>>> Date: Wed, 23 Oct 2013 14:25:45
>>>>>>> To: OpenSIPS users mailling list
>>>>>>> Reply-To: OpenSIPS users mailling list 
>>>>>>> Subject: [OpenSIPS-Users] db pasword contains @
>>>>>>>
>>>>>>> ___
>>>>>>> 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
>>>>>>
>>>>>>
>>>>> ___
>>>>> 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
>>>
>>>
>> ___
>> Users mailing list
>> Users@lists.opensips.org
>> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>>
>>
>
> ___
> 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] db pasword contains @

2013-10-23 Thread Jayesh Nambiar
Nothing works here. I guess the format of specifying this should be changed
where the username and password can be allowed to be put in single quotes
which sounds most appropriate for now.
Like you mentioned, I could change the DB password but not everyone has
that luxury!!

--- Jayesh


On Wed, Oct 23, 2013 at 4:05 PM, David J  wrote:

> OK then for sure URL encode the @ symbol. Changing password would be ideal
> but not everyone has the luxury
> On Oct 23, 2013 6:13 AM, "Schneur Rosenberg" 
> wrote:
>
>> Didn't work for me at the time, maybe it has been fixed since
>> On Oct 23, 2013 1:10 PM, "David J"  wrote:
>>
>>> Or just do user:'p@ssword' in quotes and it should work without
>>> changing anything
>>> On Oct 23, 2013 6:05 AM, "Schneur Rosenberg" 
>>> wrote:
>>>
>>>> I had this problem in the past and all I did was change my password, if
>>>> you need to keep this password then add another MySQL user and give it
>>>> correct permissions and use that in your script
>>>> On Oct 23, 2013 1:01 PM, "Jayesh Nambiar"  wrote:
>>>>
>>>>> Yes, still doesn't work.
>>>>>
>>>>> --- Jayesh
>>>>>
>>>>>
>>>>> On Wed, Oct 23, 2013 at 2:35 PM, Aamir  wrote:
>>>>>
>>>>>> Have you tried with backslash/slosh.
>>>>>>
>>>>>>
>>>>>> Thanks & Regards,
>>>>>>
>>>>>> Aamir Chougule
>>>>>> Cell: 08097989101
>>>>>> Skype-ID: aamir_ryu
>>>>>>
>>>>>> --- Sent from my BlackBerry ---
>>>>>>
>>>>>> -Original Message-
>>>>>> From: Jayesh Nambiar 
>>>>>> Sender: users-boun...@lists.opensips.org
>>>>>> Date: Wed, 23 Oct 2013 14:25:45
>>>>>> To: OpenSIPS users mailling list
>>>>>> Reply-To: OpenSIPS users mailling list 
>>>>>> Subject: [OpenSIPS-Users] db pasword contains @
>>>>>>
>>>>>> ___
>>>>>> 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
>>>>>
>>>>>
>>>> ___
>>>> 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
>>
>>
> ___
> 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] db pasword contains @

2013-10-23 Thread Jayesh Nambiar
Yes, still doesn't work.

--- Jayesh


On Wed, Oct 23, 2013 at 2:35 PM, Aamir  wrote:

> Have you tried with backslash/slosh.
>
>
> Thanks & Regards,
>
> Aamir Chougule
> Cell: 08097989101
> Skype-ID: aamir_ryu
>
> --- Sent from my BlackBerry ---
>
> -Original Message-
> From: Jayesh Nambiar 
> Sender: users-boun...@lists.opensips.org
> Date: Wed, 23 Oct 2013 14:25:45
> To: OpenSIPS users mailling list
> Reply-To: OpenSIPS users mailling list 
> Subject: [OpenSIPS-Users] db pasword contains @
>
> ___
> 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] db pasword contains @

2013-10-23 Thread Jayesh Nambiar
Hello,
My mysql database password contains '@' in it. How do I inititialize the db
url in that case. So I want do something like:
db_default_url="mysql://user:pass@pwd@mysqlhost:3306"

The above line gives me error since opensips thinks the mysql host start
from first @.
Any suggestions on how to do this.

Thanks,

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


Re: [OpenSIPS-Users] about send request to other app

2013-09-12 Thread Jayesh Nambiar
Try using the new event interface. Also rest_client is now available in the
1.10 version which can be used to pass data to any webapp.

--- Jayesh

On Monday, September 9, 2013, hualong@busap.com wrote:

> **
> Hello  all,
>I want to send  request to other app  in opensips.cfg , how
> should i do ?
>  Best regards,
>  yin
> --
>  hualong@busap.com  'hualong@busap.com');>
>
___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


Re: [OpenSIPS-Users] opensips Redis problem

2013-09-09 Thread Jayesh Nambiar
Hi,
Opensips currently only supports raw queries for mongo-db. For redis it
wont support hget and other native commands now. They will add it in near
future.

--- Jayesh


On Thu, Sep 5, 2013 at 12:27 PM, hualong@busap.com <
hualong@busap.com> wrote:

> **
>
> Hello everyone
>I have a problem about opensips-cache .
>Our application used redis to store datas (key/hash)
>Can opensips support "hget" operation
>
> --
>  hualong@busap.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


Re: [OpenSIPS-Users] using rest_post in onreply_route

2013-09-05 Thread Jayesh Nambiar
Great. Does this mean that I can call rest_post() function in the
onreply_route now??

--- Jayesh


On Wed, Sep 4, 2013 at 5:00 PM, Liviu Chircu  wrote:

>  Hello Jayesh,
>
> As you well noticed, the HTTP requests are not related to SIP at all. I
> have committed a fix for this.
>
> Best regards,
>
> Liviu Chircu
> OpenSIPS Devhttp://www.opensips-solutions.com
>
> On 09/03/2013 05:22 PM, Jayesh Nambiar wrote:
>
> Hello,
> I had a requirement of calling rest_post in the reply route. Basically, I
> get a SIP Header in 18X response which I am supposed to pass as a parameter
> while I call the POST request.
> Is there any specific reason that this cannot be called from onreply_route?
>
>  Thanks,
>
>  --- Jayesh
>
>
> ___
> 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


[OpenSIPS-Users] using rest_post in onreply_route

2013-09-03 Thread Jayesh Nambiar
Hello,
I had a requirement of calling rest_post in the reply route. Basically, I
get a SIP Header in 18X response which I am supposed to pass as a parameter
while I call the POST request.
Is there any specific reason that this cannot be called from onreply_route?

Thanks,

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


Re: [OpenSIPS-Users] executing redis commands

2013-08-13 Thread Jayesh Nambiar
Hi Vlad,
OK, Thanks for the clarity.

--- Jayesh


On Tue, Aug 13, 2013 at 3:36 PM, Vlad Paiu  wrote:

>  Hello,
>
> Currently, only MongoDB has support for raw querying against the DB.
> We have plans for adding raw query support for Redis and Cassandra for the
> next release.
>
> Best Regards,
>
> Vlad Paiu
> OpenSIPS Developerhttp://www.opensips-solutions.com
>
> On 08/13/2013 12:55 PM, Jayesh Nambiar wrote:
>
> Hello All,
> Just came across:
> cache_raw_query( storage_id, raw_query,result_avp)
> Is this used to execute native commands. So can I run native commands in
> redis using this function?
>
>  --- Jayesh
>
>
> On Tue, Aug 13, 2013 at 11:09 AM, Jayesh Nambiar wrote:
>
>> Hello All,
>> Currently I cannot execute redis commands directly from the script. I am
>> limited to core commands to handle values in redis. Do we have this feature
>> of executing redis commands directly from the script in the roadmap? This
>> would definitely give more flexibility and efficiency to handle the values
>> stored in the redis cache !!
>>
>>  Thanks.
>>
>>  --- Jayesh
>>
>
>
>
> ___
> 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] executing redis commands

2013-08-13 Thread Jayesh Nambiar
Hello All,
Just came across:
cache_raw_query( storage_id, raw_query,result_avp)
Is this used to execute native commands. So can I run native commands in
redis using this function?

--- Jayesh


On Tue, Aug 13, 2013 at 11:09 AM, Jayesh Nambiar wrote:

> Hello All,
> Currently I cannot execute redis commands directly from the script. I am
> limited to core commands to handle values in redis. Do we have this feature
> of executing redis commands directly from the script in the roadmap? This
> would definitely give more flexibility and efficiency to handle the values
> stored in the redis cache !!
>
> Thanks.
>
> --- Jayesh
>
___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


[OpenSIPS-Users] executing redis commands

2013-08-12 Thread Jayesh Nambiar
Hello All,
Currently I cannot execute redis commands directly from the script. I am
limited to core commands to handle values in redis. Do we have this feature
of executing redis commands directly from the script in the roadmap? This
would definitely give more flexibility and efficiency to handle the values
stored in the redis cache !!

Thanks.

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


Re: [OpenSIPS-Users] likely bug in mathops module

2013-08-10 Thread Jayesh Nambiar
Thanks Liviu. Also a small change in the documentation at
http://www.opensips.org/html/docs/modules/1.10.x/mathops.html#id249034

The parameter needs to be set as:

modparam("mathops", "decimal_digits", 10)

The documentation suggests to put the 10 in inverted commas i.e. "10" which
throws an error in syslog saying:
ERROR:core:set_mod_param_regex: parameter  not found in
module 

--- Jayesh

On Fri, Aug 9, 2013 at 9:14 PM, Liviu Chircu  wrote:

>  Hello Jayesh,
>
> Thank you for reporting! This is now fixed.
>
> Best regards,
>
> Liviu Chircu
> OpenSIPS Devhttp://www.opensips-solutions.com
>
> On 08/09/2013 06:00 PM, Jayesh Nambiar wrote:
>
> Hi,
> I was testing the mathops module and observed the following:
>
>  math_eval("2.332 / 1.039", "$avp(result)");
>  The above expression gives proper result. But:
>
>  math_eval("2.332 / 0.039", "$avp(result)");
>  This results in following error in the syslog:
>
>  WARNING:mathops:convert_to_rpn: Parse expr error: Invalid operator! <0>
>  ERROR:mathops:evaluate_exp: Failed to convert expression to RPN form!
>
>  Basically the division with a float point value starting with '0.'
> doesn't work. Can somebody please help me in confirming this. I have
> downloaded from 1.10beta from source and installed.
>
>  Thanks,
>
>  --- Jayesh
>
>
>
> ___
> 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


[OpenSIPS-Users] likely bug in mathops module

2013-08-09 Thread Jayesh Nambiar
Hi,
I was testing the mathops module and observed the following:

math_eval("2.332 / 1.039", "$avp(result)");
The above expression gives proper result. But:

math_eval("2.332 / 0.039", "$avp(result)");
This results in following error in the syslog:

WARNING:mathops:convert_to_rpn: Parse expr error: Invalid operator! <0>
ERROR:mathops:evaluate_exp: Failed to convert expression to RPN form!

Basically the division with a float point value starting with '0.' doesn't
work. Can somebody please help me in confirming this. I have downloaded
from 1.10beta from source and installed.

Thanks,

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


Re: [OpenSIPS-Users] opensipsdbctl: creating Database on remote machine with defined port

2013-07-23 Thread Jayesh Nambiar
mysql://username:password@/


On Fri, Jul 19, 2013 at 9:48 PM, Chandra Prakash <
chandraprak...@virtualemployee.com> wrote:

> Hello,
>
> ** **
>
> I’m able to create opensips db on remote machine using default port but
> how I can do when mysql port is defined on remote machine.
>
> ** **
>
> ** **
>
> 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


Re: [OpenSIPS-Users] how to integrate on DB call barring

2013-07-23 Thread Jayesh Nambiar
Alex,
Just create a DB table with some sort of status column for each customer
with destinations in it. Before processing every call use avp_db_query to
query the status column corresponding to the destination and take
appropriate action. Destination can be matched using country code, area
code and so on. Its all about your business logic and nothing related to
the opensips configuration. opensips allows you to query the tables and do
some good comparison in the script to achieve such functionalities.

--- Jayesh


On Fri, Jul 19, 2013 at 4:11 PM, alex  wrote:

> hi all,
> i explain my situation: i want create a user mask on open sip that allow
> the
> user to select the type of call thet he wants allow or dany, for example
> implementing a checkbox whit the choiches to allow or deny international
> call, special number (hot line etc), etc.
> my question is: where can i write this information on the DB (the relative
> table)??
>
> can anyone help me?
> thx for your support.
>
>
>
> --
> View this message in context:
> http://opensips-open-sip-server.1449251.n2.nabble.com/how-to-integrate-on-DB-call-barring-tp7587223.html
> Sent from the OpenSIPS - Users mailing list archive at Nabble.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] Mediaproxy on AWS

2013-07-16 Thread Jayesh Nambiar
Hi,
I think this must have been asked several times but I just need an expert
advice again. I am currently running media-relays on virtual machines
virtualized using KVM and it is running good with opensips. I wanted to
take this on Amazon Cloud and wanted to know what would be the tradeoffs?
I understand that a public IP is a requirement for media-relay, but can we
make it run on virtualized machines of AWS.

Any suggestions are really appreciated.

Thanks,

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


Re: [OpenSIPS-Users] raise event when a registered user is unreachable

2013-03-14 Thread Jayesh Nambiar
Thank you for the solid explanation.

--- Jayesh
On Mar 14, 2013 10:37 PM, "Bogdan-Andrei Iancu"  wrote:

> **
> Hi Jayesh,
>
> Firing an event is not a problem - the problem is in NAT pinging, there is
> no state for the tractions. Basically the modules doing NAT do not care of
> the replies (as for pining is not relevant), so you do not know which ping
> and for what contact it failed, in order to trigger the event.
>
> Switching to statefull pinging may be expensive from resources point of
> view
>
> Best regards,
>
> Bogdan-Andrei Iancu
> OpenSIPS Founder and Developerhttp://www.opensips-solutions.com
>
>
> On 03/13/2013 08:28 AM, Jayesh Nambiar wrote:
>
> Hi All,
> The 1.9 has an awesome event interface and I really appreciate the great
> work by the developers. I was looking at an option to raise an event when a
> registered user becomes unreachable.
> Say, for eg: I use keep-alive method as OPTIONS in the nat_traversal
> module and if I do not get a response from any UA, is it possible that
> opensips can raise an event for the same. Is it somehow possible from the
> script, or additional work on the code will be required.
> I think, this feature might be useful in many ways !!
>
>  Thanks for any pointers.
>
>  --- Jayesh
>
>
> ___
> 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] querying float point values in opensips-1.9 gives error

2013-03-13 Thread Jayesh Nambiar
Hi Vlad,
In this case I am actually calling a stored procedure inside avp_db_query()
function to query data from mysql. The stored procedure goes into multiple
tables and based on many conditions it gives the output. The datatypes of
the the columns in question are actually all DECIMAL(8,4) in the mysql
database.
Also in the procedure when the output variables are defined, they are
defined as DECIMAL(8,4), so I am sure its returning as DECIMAL format only
from the database to opensips. And it has been returning like this since
opensips version 1.6 till 1.8.2 :)

--- Jayesh




On Wed, Mar 13, 2013 at 3:11 PM, Vlad Paiu  wrote:

> Hi Jayesh,
>
> The first thing that comes to mind is that you can cast your floats to
> string directly from the mysql query ( with something like cast(your_field
> as char) ).
> Could you please send us an example of the avp_db_query that was
> previously working, along with the 'show create table' for the table you
> are querying ?
>
> Feel free to change whatever relevant columns names, I just want to
> replicate this issue on my own machine :)
>
> Best Regards,
>
> Vlad Paiu
> OpenSIPS Developer
> http://www.opensips-solutions.**com <http://www.opensips-solutions.com>
>
>
>
> On 03/13/2013 04:56 AM, Ovidiu Sas wrote:
>
>> Make sure that the values are stored as strings in the table, not as
>> float.
>>
>> -ovidiu
>>
>> On Tue, Mar 12, 2013 at 10:40 PM, Jayesh Nambiar
>>  wrote:
>>
>>> Hi Ovidiu,
>>> Thanks for your reply. But I just expect them to be stored as string in
>>> my
>>> AVPs. Even in 1.8.2, when I dumped those AVPs back into a database
>>> table, it
>>> always put the exact value like 1. or 0.0123 etc. So it was indeed
>>> storing the entire value as string in the AVPs and not as 1 or 0. Is this
>>> behaviour changed now?
>>>
>>>
>>> --- Jayesh
>>>
>>>
>>> On Tuesday, March 12, 2013, Ovidiu Sas wrote:
>>>
>>>> You are trying to store a float into an int.  Prior to 1.9, there
>>>> wasn't a strict check on the conversion and whatever the result was,
>>>> it was stored (i.e. 1.000 was stored as 1 and 0.0123 was stored as 0).
>>>> For more info: 
>>>> http://linux.die.net/man/3/**strtol<http://linux.die.net/man/3/strtol>
>>>> Starting with 1.9, there is a strict check for invalid characters and
>>>> therefore the conversion fails: 1.000 and 0.0123 are not a valid
>>>> integers.
>>>>
>>>> Regards,
>>>> Ovidiu Sas
>>>>
>>>> On Tue, Mar 12, 2013 at 10:36 AM, Jayesh Nambiar
>>>> wrote:
>>>>
>>>>> Hi,
>>>>> I am testing out Opensips-1.9 currently. While I was using
>>>>> opensips-1.8.2, I
>>>>> used avp_db_query to query some values from database tables which were
>>>>> float
>>>>> point values and used those values to insert into acc table. Obviously
>>>>> for
>>>>> billing reasons. But after upgrading to 1.9 it gives error.
>>>>> Eg: I am querying a table containing values 1., 0.0123 etc. and
>>>>> storing
>>>>> it into AVPs. But the 1.9 version gives the following error:
>>>>> ERROR:core:db_str2int: Unexpected characters: [.]
>>>>> ERROR:db_mysql:db_mysql_**str2val: error while converting integer
>>>>> value
>>>>> from
>>>>> string
>>>>>
>>>>> Can someone help me to take corrective actions inorder to avoid these
>>>>> errors. Any help is much appreciated.
>>>>>
>>>>> Thanks,
>>>>>
>>>>> --- Jayesh
>>>>>
>>>> __**_
>> Users mailing list
>> Users@lists.opensips.org
>> http://lists.opensips.org/cgi-**bin/mailman/listinfo/users<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<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] raise event when a registered user is unreachable

2013-03-12 Thread Jayesh Nambiar
Hi All,
The 1.9 has an awesome event interface and I really appreciate the great
work by the developers. I was looking at an option to raise an event when a
registered user becomes unreachable.
Say, for eg: I use keep-alive method as OPTIONS in the nat_traversal module
and if I do not get a response from any UA, is it possible that opensips
can raise an event for the same. Is it somehow possible from the script, or
additional work on the code will be required.
I think, this feature might be useful in many ways !!

Thanks for any pointers.

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


Re: [OpenSIPS-Users] querying float point values in opensips-1.9 gives error

2013-03-12 Thread Jayesh Nambiar
Oh Ok. Got it. Thanks for the inputs.

--- Jayesh


On Wed, Mar 13, 2013 at 8:26 AM, Ovidiu Sas  wrote:

> Make sure that the values are stored as strings in the table, not as float.
>
> -ovidiu
>
> On Tue, Mar 12, 2013 at 10:40 PM, Jayesh Nambiar 
> wrote:
> > Hi Ovidiu,
> > Thanks for your reply. But I just expect them to be stored as string in
> my
> > AVPs. Even in 1.8.2, when I dumped those AVPs back into a database
> table, it
> > always put the exact value like 1. or 0.0123 etc. So it was indeed
> > storing the entire value as string in the AVPs and not as 1 or 0. Is this
> > behaviour changed now?
> >
> >
> > --- Jayesh
> >
> >
> > On Tuesday, March 12, 2013, Ovidiu Sas wrote:
> >>
> >> You are trying to store a float into an int.  Prior to 1.9, there
> >> wasn't a strict check on the conversion and whatever the result was,
> >> it was stored (i.e. 1.000 was stored as 1 and 0.0123 was stored as 0).
> >> For more info: http://linux.die.net/man/3/strtol
> >> Starting with 1.9, there is a strict check for invalid characters and
> >> therefore the conversion fails: 1.000 and 0.0123 are not a valid
> >> integers.
> >>
> >> Regards,
> >> Ovidiu Sas
> >>
> >> On Tue, Mar 12, 2013 at 10:36 AM, Jayesh Nambiar 
> >> wrote:
> >> > Hi,
> >> > I am testing out Opensips-1.9 currently. While I was using
> >> > opensips-1.8.2, I
> >> > used avp_db_query to query some values from database tables which were
> >> > float
> >> > point values and used those values to insert into acc table. Obviously
> >> > for
> >> > billing reasons. But after upgrading to 1.9 it gives error.
> >> > Eg: I am querying a table containing values 1., 0.0123 etc. and
> >> > storing
> >> > it into AVPs. But the 1.9 version gives the following error:
> >> > ERROR:core:db_str2int: Unexpected characters: [.]
> >> > ERROR:db_mysql:db_mysql_str2val: error while converting integer value
> >> > from
> >> > string
> >> >
> >> > Can someone help me to take corrective actions inorder to avoid these
> >> > errors. Any help is much appreciated.
> >> >
> >> > Thanks,
> >> >
> >> > --- Jayesh
>
> ___
> 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] querying float point values in opensips-1.9 gives error

2013-03-12 Thread Jayesh Nambiar
Hi Ovidiu,
Thanks for your reply. But I just expect them to be stored as string in my
AVPs. Even in 1.8.2, when I dumped those AVPs back into a database table,
it always put the exact value like 1. or 0.0123 etc. So it was indeed
storing the entire value as string in the AVPs and not as 1 or 0. Is this
behaviour changed now?


--- Jayesh

On Tuesday, March 12, 2013, Ovidiu Sas wrote:

> You are trying to store a float into an int.  Prior to 1.9, there
> wasn't a strict check on the conversion and whatever the result was,
> it was stored (i.e. 1.000 was stored as 1 and 0.0123 was stored as 0).
> For more info: http://linux.die.net/man/3/strtol
> Starting with 1.9, there is a strict check for invalid characters and
> therefore the conversion fails: 1.000 and 0.0123 are not a valid
> integers.
>
> Regards,
> Ovidiu Sas
>
> On Tue, Mar 12, 2013 at 10:36 AM, Jayesh Nambiar 
> >
> wrote:
> > Hi,
> > I am testing out Opensips-1.9 currently. While I was using
> opensips-1.8.2, I
> > used avp_db_query to query some values from database tables which were
> float
> > point values and used those values to insert into acc table. Obviously
> for
> > billing reasons. But after upgrading to 1.9 it gives error.
> > Eg: I am querying a table containing values 1., 0.0123 etc. and
> storing
> > it into AVPs. But the 1.9 version gives the following error:
> > ERROR:core:db_str2int: Unexpected characters: [.]
> > ERROR:db_mysql:db_mysql_str2val: error while converting integer value
> from
> > string
> >
> > Can someone help me to take corrective actions inorder to avoid these
> > errors. Any help is much appreciated.
> >
> > Thanks,
> >
> > --- Jayesh
> >
>
> ___
> 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] querying float point values in opensips-1.9 gives error

2013-03-12 Thread Jayesh Nambiar
Hi,
I am testing out Opensips-1.9 currently. While I was using opensips-1.8.2,
I used avp_db_query to query some values from database tables which were
float point values and used those values to insert into acc table.
Obviously for billing reasons. But after upgrading to 1.9 it gives error.
Eg: I am querying a table containing values 1., 0.0123 etc. and storing
it into AVPs. But the 1.9 version gives the following error:
ERROR:core:db_str2int: Unexpected characters: [.]
ERROR:db_mysql:db_mysql_str2val: error while converting integer value from
string

Can someone help me to take corrective actions inorder to avoid these
errors. Any help is much appreciated.

Thanks,

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


[OpenSIPS-Users] substitute variable names within variables

2012-12-27 Thread Jayesh Nambiar
Hi,
I define some values using the varset parameters of cfgutils module.
modparam("cfgutils", "varset", "media1=1.2.3.4")
modparam("cfgutils", "varset", "media2=4.3.2.1")
modparam("cfgutils", "varset", "media3=5.6.7.8")

I need a logic to dynamically select the the variables. Say for example:
I select a value from DB and store it in an AVP say $avp(db_val) which I
know can be either 1,2 or 3. Based on that value, I need to select among
variables media1, media2 or media3.
I need to find a way where I can substitute the avp(db_val) value in the
name of the variable. Basically something like this:
$avp(variable_to_be_used) = $var(media$avp(db_val))
So here if $avp(db_val) is 1, avp(variable_to_be_used) becomes $var(media1)
which will be 1.2.3.4

Is something like this possible or allowed? Is there an alternative to do
something similar dynamically !! I know, I cud have stored those values in
DB and retrieved directly but I am looking at this feature for many other
purposes too !!

Any help is much appreciated. Thanks,

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


[OpenSIPS-Users] set_count in opensips 1.8.2

2012-11-08 Thread Jayesh Nambiar
Hi All,
Just upgraded to opensips 1.8.2 and it wont start since I have used
set_count function in the script. It gives an error:
 unknown command , missing loadmodule?
I have the module cfgutils loaded. Guess it is a problem in 1.8.2.

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


Re: [OpenSIPS-Users] Parallel forking and per branch manipulation

2012-09-04 Thread Jayesh Nambiar
Hi Bogdan,
Firstly I am using Opensips 1.7.2. And here the observations after I tried
several things as suggested by you.
Observation 1:

lookup("location");
#$branch = $ru;

You suggested the above line is not required as it will automatically be
treated as branch 0 and hence I commented it, but is not behaving as
expected. So when I comment the above line and then add the code as below:

avp_db_query("SELECT cli, phone_number FROM users WHERE user_id = '$rU',
"$avp(cli), $avp(parallel_number)");

$rU = $avp(parallel_number);
$rd = my_gateway_ip;
$var(uri) = "sip:"+$rU+"@"+$rd;

$branch = $var(ruri);
xlog("L_INFO", "Branch URI 0=$(branch(uri)[0]) AND Branch URI
1=$(branch(uri)[1])");

The above line prints in syslog "Branch URI
0=sip:123456789@mygateway_ipand Branch URI 1 = NULL"
This means that when I actually call "$branch = some_uri" that is when the
branch is created with an id. Because I checked adding that $branch = $ru
line again and then syslog printed  "Branch URI
0=sip:@1.2.3.4:25380and Branch URI 1=sip:123456789@mygateway_ip
".

t_on_branch("1");
t_relay();
exit;

Observation 2:
Inside the branch route I write the following code:
   branch_route[1] {
  $var(branch_id) = $T_branch_idx;
  if($var(branch_id) == "1") {
 xlog("L_INFO", "Branch-ID=$T_branch_idx")
 insert_hf("Forwarded: Yes\r\n", "Call-ID");
 uac_replace_from("sip:$avp(cli)@mydomain.com");
  }
   }


Now here I can confirm that when the branch_id is 1, it gets into this
condition since the xlog prints  "Branch-ID=1" properly when its inside the
branch route; but when branch_0 gets relayed out this header gets inserted
and From header gets replaced whereas when branch_1 is relayed the header
mentioned in this condition is not inserted and also the From header is not
replaced.
Basically, it behaves exactly opposite as expected !! Please note in this
case I am creating branch twice using the $branch command so that
$branch(uri)[0] is the one fetched from location and $branch(uri)[1] is the
PSTN uri where the call has to be parallel forwarded.
Is there something I am still doing wrong because as I understood; inside
the branch_route based on branch_id I am inserting a custom header and
replacing From header but this custom header and From header is being
replaced on the unintended branch !!
Could be that something is wrong in opensips-1.7.x. Please help me out here.

Thanks,

--- Jayesh


On Tue, Sep 4, 2012 at 12:18 AM, Jayesh Nambiar wrote:

> Thanks Bogdan. Will definitely try this out.
>
> --- Jayesh
>
>
> On Monday, September 3, 2012, Bogdan-Andrei Iancu wrote:
>
>> **
>> Hi Jayesh,
>>
>> See my inline comments.
>>
>> Regards,
>>
>> Bogdan-Andrei Iancu
>> OpenSIPS Founder and Developerhttp://www.opensips-solutions.com
>>
>>
>> On 08/31/2012 03:02 PM, Jayesh Nambiar wrote:
>>
>>  Hi Binan,
>> Thank you very much for your reply. What you wrote is what I understand
>> from all the documentation present but probably the concept is not working
>> for me or probably just not getting into my head. This is a snippet of what
>> I'm trying to do:
>>
>>  lookup("location");
>> $branch = $ru;
>>
>> You do not need this last line as the $ru will be automatically be
>> considered branch 0.
>>
>>
>>  avp_db_query("SELECT cli, phone_number FROM users WHERE user_id =
>> '$rU', "$avp(cli), $avp(parallel_number)");
>> $rU = $avp(parallel_number);
>> $rd = my_gateway_ip;
>> $var(uri) = "sip:"+$rU+"@"+$rd;
>>
>>  $branch = $var(ruri);
>>
>>  t_on_branch("1"); # --This is confusing me---
>>
>> This is correct, you are arming the branch 1, which will be executed
>> inside t_relay(), once for each branch.
>>
>>  t_relay();
>> exit;
>>
>>  branch_route[1] { #---Need to know how to check for branch id here---
>>if(branch_id == 1) { #--- How do I check for this condition??
>>
>> See $T_branch_idx (
>> http://www.opensips.org/html/docs/modules/1.8.x/tm.html#id294499)
>>
>>uac_replace_from("sip:$avp(cli)@mydomain.com");
>>}
>> }
>>
>>  The problem is I dont know how to identify the branch id in the branch
>> route. Even if I set branch flag for second branch using setbflag(1,1) and
>> I check for this flag in the branch route using isbflagset(1,1), by the
>> time the first branch goes into branch_route, the secon

Re: [OpenSIPS-Users] Parallel forking and per branch manipulation

2012-09-03 Thread Jayesh Nambiar
Thanks Bogdan. Will definitely try this out.

--- Jayesh

On Monday, September 3, 2012, Bogdan-Andrei Iancu wrote:

> **
> Hi Jayesh,
>
> See my inline comments.
>
> Regards,
>
> Bogdan-Andrei Iancu
> OpenSIPS Founder and Developerhttp://www.opensips-solutions.com
>
>
> On 08/31/2012 03:02 PM, Jayesh Nambiar wrote:
>
>  Hi Binan,
> Thank you very much for your reply. What you wrote is what I understand
> from all the documentation present but probably the concept is not working
> for me or probably just not getting into my head. This is a snippet of what
> I'm trying to do:
>
>  lookup("location");
> $branch = $ru;
>
> You do not need this last line as the $ru will be automatically be
> considered branch 0.
>
>
>  avp_db_query("SELECT cli, phone_number FROM users WHERE user_id = '$rU',
> "$avp(cli), $avp(parallel_number)");
> $rU = $avp(parallel_number);
> $rd = my_gateway_ip;
> $var(uri) = "sip:"+$rU+"@"+$rd;
>
>  $branch = $var(ruri);
>
>  t_on_branch("1"); # --This is confusing me---
>
> This is correct, you are arming the branch 1, which will be executed
> inside t_relay(), once for each branch.
>
>  t_relay();
> exit;
>
>  branch_route[1] { #---Need to know how to check for branch id here---
>if(branch_id == 1) { #--- How do I check for this condition??
>
> See $T_branch_idx (
> http://www.opensips.org/html/docs/modules/1.8.x/tm.html#id294499)
>
>uac_replace_from("sip:$avp(cli)@mydomain.com");
>}
> }
>
>  The problem is I dont know how to identify the branch id in the branch
> route. Even if I set branch flag for second branch using setbflag(1,1) and
> I check for this flag in the branch route using isbflagset(1,1), by the
> time the first branch goes into branch_route, the second branch is created
> and the condition isbflagset(1,1) becomes true and the uac_replace_from()
> gets executed for first branch also. My requirement is to execute this
> branch_route only for second branch which is branch_id 1.
> Isn't there any straight forward way of checking the id of the branch when
> it comes to the branch route??
>
>  Any help is really appreciated. Thanks.
>
>  --- Jayesh
>
>> Hi,
>>
>> lets say you have 2 branches 0 towards user in location and 1 towards
>> PSTN.
>> ?
>> I suggest to use branch flags which are used to activate some functions
>> in branch level
>>
>> when creating the branches in main route use this variable $branch() to
>> set branch flags to each indivisual branch depending on its index 0 for
>> branch 0 and 1 for branch 1.
>>
>> use branch routing blocks to execute certain logic (it could be the
>> manipulation ) for each branch before forwarding the request.
>>
>> // Binan
>>
>> --- On Thu, 8/30/12, Jayesh Nambiar > 'cvml', 'jayesh.v...@gmail.com');>>
>> wrote:
>>
>> From: Jayesh Nambiar > 'jayesh.v...@gmail.com');>>
>> Subject: [OpenSIPS-Users] Parallel forking and per branch manipulation
>> To: "OpenSIPS users mailling list" 
>> > 'users@lists.opensips.org');>
>> >
>> Date: Thursday, August 30, 2012, 8:11 AM
>>
>> Hi All,I have a scenario to do parellel forking between the user found in
>> location and towards a PSTN gateway. The requirement here is, I have unique
>> manipulations to be done before routing the call which I believe can be
>> done using branch routes, but I'm just wondering how.?
>> For eg: The branch that goes to the user found from location should have
>> no FROM Header manipulation and the branch that goes out to PSTN gateway
>> needs a uac_replace_from("sip:123456789@1.2.3.4 > 'cvml', 'sip%3A123456789@1.2.3.4');>"), and
>> insert_hf("P-Asserted_Identity: sip:123456789@1.2.3.4 > 'cvml', 'sip%3A123456789@1.2.3.4');>\r\n") before calling t_relay().
>> There are many other manipulations like this.
>> How do I take the script logic to individual branch routes before calling
>> t_relay, because whats happening with me is once the location is looked up,
>> I go ahead for manipulations that is supposed to be done for the gateway
>> branch, but it gets applicable for the branch that goes out to the user as
>> well !!
>>
>> Probably I am missing something on my understanding on how to call
>> branch_routes while doing parallel forking.
>> Thanks for any help.
>> --- Jayesh
>>
>>
> ___
> Users mailing listus...@lists.opensips.org  '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] Parallel forking and per branch manipulation

2012-08-31 Thread Jayesh Nambiar
Hi Binan,
Thank you very much for your reply. What you wrote is what I understand
from all the documentation present but probably the concept is not working
for me or probably just not getting into my head. This is a snippet of what
I'm trying to do:

lookup("location");
$branch = $ru;

avp_db_query("SELECT cli, phone_number FROM users WHERE user_id = '$rU',
"$avp(cli), $avp(parallel_number)");
$rU = $avp(parallel_number);
$rd = my_gateway_ip;
$var(uri) = "sip:"+$rU+"@"+$rd;

$branch = $var(ruri);

t_on_branch("1"); # --This is confusing me---
t_relay();
exit;

branch_route[1] { #---Need to know how to check for branch id here---
   if(branch_id == 1) { #--- How do I check for this condition??
  uac_replace_from("sip:$avp(cli)@mydomain.com");
   }
}

The problem is I dont know how to identify the branch id in the branch
route. Even if I set branch flag for second branch using setbflag(1,1) and
I check for this flag in the branch route using isbflagset(1,1), by the
time the first branch goes into branch_route, the second branch is created
and the condition isbflagset(1,1) becomes true and the uac_replace_from()
gets executed for first branch also. My requirement is to execute this
branch_route only for second branch which is branch_id 1.
Isn't there any straight forward way of checking the id of the branch when
it comes to the branch route??

Any help is really appreciated. Thanks.

--- Jayesh

> Hi,
>
> lets say you have 2 branches 0 towards user in location and 1 towards PSTN.
> ?
> I suggest to use branch flags which are used to activate some functions in
> branch level
>
> when creating the branches in main route use this variable $branch() to
> set branch flags to each indivisual branch depending on its index 0 for
> branch 0 and 1 for branch 1.
>
> use branch routing blocks to execute certain logic (it could be the
> manipulation ) for each branch before forwarding the request.
>
> // Binan
>
> --- On Thu, 8/30/12, Jayesh Nambiar  wrote:
>
> From: Jayesh Nambiar 
> Subject: [OpenSIPS-Users] Parallel forking and per branch manipulation
> To: "OpenSIPS users mailling list" 
> Date: Thursday, August 30, 2012, 8:11 AM
>
> Hi All,I have a scenario to do parellel forking between the user found in
> location and towards a PSTN gateway. The requirement here is, I have unique
> manipulations to be done before routing the call which I believe can be
> done using branch routes, but I'm just wondering how.?
> For eg: The branch that goes to the user found from location should have
> no FROM Header manipulation and the branch that goes out to PSTN gateway
> needs a uac_replace_from("sip:123456789@1.2.3.4"), and
> insert_hf("P-Asserted_Identity: sip:123456789@1.2.3.4\r\n") before
> calling t_relay(). There are many other manipulations like this.
> How do I take the script logic to individual branch routes before calling
> t_relay, because whats happening with me is once the location is looked up,
> I go ahead for manipulations that is supposed to be done for the gateway
> branch, but it gets applicable for the branch that goes out to the user as
> well !!
>
> Probably I am missing something on my understanding on how to call
> branch_routes while doing parallel forking.
> Thanks for any help.
> --- Jayesh
>
>
___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


[OpenSIPS-Users] Parallel forking and per branch manipulation

2012-08-30 Thread Jayesh Nambiar
Hi All,
I have a scenario to do parellel forking between the user found in location
and towards a PSTN gateway. The requirement here is, I have unique
manipulations to be done before routing the call which I believe can be
done using branch routes, but I'm just wondering how.
For eg: The branch that goes to the user found from location should have no
FROM Header manipulation and the branch that goes out to PSTN gateway needs
a uac_replace_from("sip:123456789@1.2.3.4"), and
insert_hf("P-Asserted_Identity: sip:123456789@1.2.3.4\r\n") before calling
t_relay(). There are many other manipulations like this.
How do I take the script logic to individual branch routes before calling
t_relay, because whats happening with me is once the location is looked up,
I go ahead for manipulations that is supposed to be done for the gateway
branch, but it gets applicable for the branch that goes out to the user as
well !!

Probably I am missing something on my understanding on how to call
branch_routes while doing parallel forking.

Thanks for any help.

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


[OpenSIPS-Users] Using two Opensips Proxy in Redundant mode

2012-06-11 Thread Jayesh Nambiar
Hi,
I am trying to setup two opensips proxies with identical configuration so
that the endpoints can REGISTER on either of the proxy. Wat is the best way
to handle REGISTER in such scenarios. I read a lot of posts but all
explaining about a proxy P1 which relays to multiple Registrars with Path
headers in it. I just need to have two proxies and both having USRLOC with
DB Mode 1 preferably. Since there are NATed clients in the picture, the
calls can to the endpoints only from the proxy where they registered to as
keep-alives are being called from that IP. Also the database that these
proxies are looking at is in circular-replication. I had a few approaches:
1) If REGISTER arrives on P1, P1 should ideally authorize and save into
location and  replicate this information to P2 using t_replicate. On P2, I
do not authorize REGISTER coming from P1 and just do save("location"). But
on P2, the socket shows P2_Public_IP only. Theoretically the socket
information should not change right !!
2) While doing lookup("location") is it possible to fetch the socket
information and send the INVITE to P1 appropriately, so that P1 can relay
that call ahead to the NATed endpoint?

I have seen a few examples of handling NATed clients in the NAT_Traversal
module, but all are cases where there is one Proxy responsible of accepting
calls and relaying call to endpoints while there can be multiple proxies
handling the requests for load balancing.

My requirement was that the endpoints can either Register on P1 or P2, when
the call arrives in for any endpoint on P1; P1 checks if the endpoint had
sent REGISTER to P1 (Basically identifying the socket); if yes relay the
call; Or else if the endpoint is registered with P2 then relay the call to
P2 and let P2 relay it to the endpoint. Same is applicable if the call
arrives on P2 for any endpoint.

Any help regarding this setup is appreciated!!

Thanks in advance.

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


[OpenSIPS-Users] Calling MediaProxy twice for same call results in no voice

2012-06-08 Thread Jayesh Nambiar
Hi All,
I have a following scenario:
1) I have one opensips proxy(proxy1) where sip endpoints register and sends
calls to.
2) The calls from proxy1 is sent to another opensips proxy(proxy2) which
routes calls to PSTN carriers.
3) Both the proxy1 and proxy2 have mediaproxy module loaded and the
dispatcher on each server is connected to the same media-relay(Relay1).
The problem is here:
1) When a call comes to Proxy1, I call engage_media_proxy. This allocates
media ports from Relay1 and sends the call to Proxy2 for call completion.
2) Now the Proxy2 is again calling engage_media_proxy, since the Proxy2 is
configured in such a way that it calls engage_media_relay for every call
signaled through it.
3) Now since the Proxy2 is also configured to use the same media-relay that
Proxy1 was using, the Relay1 allocates media ports for same call from the
same media-relay again.
4) Theoretically, I assumed that this should work but it results in No
Audio on both ends.
5) But, When I enabled a condition in Proxy2 which says that if the call is
initiated from Proxy1, don't call "engage_media_proxy", the voice is good
and both parties can hear.

I understand that it is not right to call media_proxy twice for the same
call even if it is from different opensips proxies, I am only curios to
know what goes wrong in this scenario.
These are two different opensips calling "engage_media_proxy", so why and
where does the mediaproxy get confused??

Any ideas in making me understand this concept will be very helpful !!

Thanks in advance,

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


Re: [OpenSIPS-Users] Managing Opensipsctl for different instances on same server

2012-05-29 Thread Jayesh Nambiar
Hi Razvan,
Thank you very much. This was exactly what I was looking for.
Just recollecting the other part; will this method affect the performance
of opensips in any ways. Since all these three instances uses the same
opensips installation !!

--- Jayesh


> Hello, Jayesh!
>
> Opensipsctl uses the opensipsctlrc configuration file in order to detect
> which FIFO file it should use. If the OSIPS_FIFO parameter is not set in
> opensipsctlrc, it uses the default value of /tmp/opensips_fifo.
> In order to run different instances of opensipsctl, you first have to
> make sure that the opensipsctlrc file doesn't have the OSIPS_FIFO
> parameter set. If it does, you can't overwrite it and the following
> solution won't work. Then if you want to send for examnple the 'ps' MI
> command to an OpenSIPS instance that has the /tmp/opensips_fifo_1 file
> set, you should use the following code:
>
> OSIPS_FIFO=/tmp/opensips_fifo_1 /path/to/opensipsctl fifo ps
>
> In this way you specify opensipsctl to use a different FIFO than the
> default one.
>
> Regards,
>
> --
> Ra(zvan Crainea
> OpenSIPS Developer
> http://www.opensips-solutions.com
>
>
> On 05/28/2012 02:09 PM, Jayesh Nambiar wrote:
> > Hello All,
> > I am using three intances of Opensips on a single server using same
> > binaries and libraries. Meaning, I have configured and intalled
> > opensips once and I have three init files each which starts opensips
> > looking at different configuration files viz. lcr.cfg, b2b.cfg,
> > proxy.cfg. Although this runs good, I have a problem in managing them.
> > The "opensipsctl" utility only monitors any one instance of opensips.
> > How is it possible to manage all instances of opensips using this method.
> > I give different fifo paths in each configuration file but I dont
> > understand how to manage them differently. For example, I need to know
> > how many transactions are running on my LCR instance and at the same
> > time I need to know how many users are registered on my proxy
> > instance. I wanted to understand if this approach is even recommended
> > or does it have any drawbacks that I might be missing.
> >
> > Thanks for any suggestions in this regards,
> >
> > --- Jayesh
> >
> >
> > ___
>
___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


[OpenSIPS-Users] Managing Opensipsctl for different instances on same server

2012-05-28 Thread Jayesh Nambiar
Hello All,
I am using three intances of Opensips on a single server using same
binaries and libraries. Meaning, I have configured and intalled opensips
once and I have three init files each which starts opensips looking at
different configuration files viz. lcr.cfg, b2b.cfg, proxy.cfg. Although
this runs good, I have a problem in managing them. The "opensipsctl"
utility only monitors any one instance of opensips. How is it possible to
manage all instances of opensips using this method.
I give different fifo paths in each configuration file but I dont
understand how to manage them differently. For example, I need to know how
many transactions are running on my LCR instance and at the same time I
need to know how many users are registered on my proxy instance. I wanted
to understand if this approach is even recommended or does it have any
drawbacks that I might be missing.

Thanks for any suggestions in this regards,

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


Re: [OpenSIPS-Users] ERROR:sipcapture:hep_msg_received: unknow protocol

2012-04-07 Thread Jayesh Nambiar
Just for the information, the error is generated by the opensips that acts
as a Capture Server !! The opensips instance that sends HEP messages to the
capture server is fine.

--- Jayesh

On Fri, Apr 6, 2012 at 12:36 PM, Jayesh Nambiar wrote:

> Hi,
> I was testing the sip_capture module in opensips 1.8 with HEP and it looks
> to be working fine. One instance of opensips uses the siptrace module to
> send the HEP captures to other instance of opensips which acts as a capture
> server. The capture server inserts the required information into the
> sip_capture table and the Webhomer interface also displays the data as
> expected.
> Only confusion is about the this message coming in the syslog:
> ERROR:sipcapture:hep_msg_received: unknow protocol
>
> Can this error be eliminated as this is generated for every HEP request
> sent to the capture server !!
>
> --- Jayesh
>
___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


[OpenSIPS-Users] ERROR:sipcapture:hep_msg_received: unknow protocol

2012-04-06 Thread Jayesh Nambiar
Hi,
I was testing the sip_capture module in opensips 1.8 with HEP and it looks
to be working fine. One instance of opensips uses the siptrace module to
send the HEP captures to other instance of opensips which acts as a capture
server. The capture server inserts the required information into the
sip_capture table and the Webhomer interface also displays the data as
expected.
Only confusion is about the this message coming in the syslog:
ERROR:sipcapture:hep_msg_received: unknow protocol

Can this error be eliminated as this is generated for every HEP request
sent to the capture server !!

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


Re: [OpenSIPS-Users] Call Pickup using dialoginfo or dialog modules

2012-03-07 Thread Jayesh Nambiar
t_nat_test("7")) {
add_rr_param(";nat=yes"); #---To identify the NATed clients and
Record Route properly---
}
}

if (has_totag()) {
if (loose_route()) {
if (is_method("INVITE") || is_method("UPDATE") ||
is_method("ACK") || is_method("BYE")) {
if (search("^Route:.*;nat=yes")) {
force_rport();
fix_nated_contact();
}
}
t_relay();
exit;
} else {
if ( is_method("ACK") ) {
if ( t_check_trans() ) {
t_relay();
exit;
} else {
exit;
}
}
sl_send_reply("404","Not here");
}
exit;
}


if (is_method("CANCEL"))
{
if (t_check_trans()) {
route(nat_check);
t_relay();
}
exit;
}

t_check_trans();

if (loose_route()) {
if (!is_method("ACK"))
sl_send_reply("403","Preload Route denied");
exit;
}

if (is_method("INVITE")) {
create_dialog();
route(invite_requests);
exit;
}

if (is_method("REGISTER"))
{
route(nat_check);
if (!save("location"))
sl_reply_error();

exit;
}
}


route[1] {

    if (!t_relay()) {
sl_reply_error();
};
exit;
}

route[nat_check] {
if (client_nat_test("7")) {
force_rport();
fix_nated_contact();
nat_keepalive();
}
}

route[invite_requests] {
route(nat_check);

if(!lookup("location")) {
sl_send_reply("404", "User Not Found");
exit;
}

$var(caller) = "sip:"+$fU+"@203.XXX.53.XXX";
$var(callee) = "sip:"+$rU+"@203.XXX.53.XXX";

$avp(caller) = $var(caller);
$avp(callee) = $var(callee);

dialoginfo_set("B");
t_on_reply("1");
t_relay();
}

route[presence_requests] {
route(nat_check);

if(is_method("PUBLISH")) {
handle_publish();
}

if(is_method("SUBSCRIBE")) {
handle_subscribe("1");
}
}

onreply_route[1] {
if(client_nat_test("1")) {
fix_nated_contact();
}

if(t_was_cancelled()) {
exit;
}
}

On Mon, Mar 5, 2012 at 12:02 PM, Jayesh Nambiar wrote:

> Hello Everyone,
> I have been reading all the posts and examples regarding the call pickup
> implementation using opensips but still could not get a clear idea on how
> make it work in a simplified way.
> Basically I have the following questions:
> 1) Does it require for the endpoint to SUBSCRIBE for the users whose
> dialog state it needs to learn?
> 2) Is it possible that we enter some values in a database which opensips
> can look into and decide which all users should get a NOTIFY for the dialog
> states of a particular user? Some values in xcap table probably, which will
> tell opensips about whom to NOTIFY when there is a call for a specific user.
> 3) If I am looking at only implementing the pickup scenario and no other
> presence related features, is it possible that only the dialog-event states
> are PUBLISHED and no other Presence events are required to be PUBLISHED and
> NOTIFIED?
> 4) Please correct me if I am wrong; When A calls B and C needs to Pick it
> up, C should first receive a NOTIFY from Opensips consisting of
> local/remote elements, C can then send an INVITE with replaces header and
> the call will be Picked up. I just wanted to make sure if my understanding
> is correct here.
>
> Finally, is it in some way possible to just use the dialog module and
> patch/bridge the call of the caller with the one who is trying to pick up
> as we are aware of the ongoing dialogs? Something like it is explained here:
> http://opensips.org/pipermail/users/2012-January/020476.html
> In the above post, the call can be caught in the failure route, but can it
> be bridged to the person who is trying to PickUp. Any examples of how to
> achieve this will be very much appreciated.
>
> Thanks,
>
> --- Jayesh
>
___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


[OpenSIPS-Users] Call Pickup using dialoginfo or dialog modules

2012-03-04 Thread Jayesh Nambiar
Hello Everyone,
I have been reading all the posts and examples regarding the call pickup
implementation using opensips but still could not get a clear idea on how
make it work in a simplified way.
Basically I have the following questions:
1) Does it require for the endpoint to SUBSCRIBE for the users whose dialog
state it needs to learn?
2) Is it possible that we enter some values in a database which opensips
can look into and decide which all users should get a NOTIFY for the dialog
states of a particular user? Some values in xcap table probably, which will
tell opensips about whom to NOTIFY when there is a call for a specific user.
3) If I am looking at only implementing the pickup scenario and no other
presence related features, is it possible that only the dialog-event states
are PUBLISHED and no other Presence events are required to be PUBLISHED and
NOTIFIED?
4) Please correct me if I am wrong; When A calls B and C needs to Pick it
up, C should first receive a NOTIFY from Opensips consisting of
local/remote elements, C can then send an INVITE with replaces header and
the call will be Picked up. I just wanted to make sure if my understanding
is correct here.

Finally, is it in some way possible to just use the dialog module and
patch/bridge the call of the caller with the one who is trying to pick up
as we are aware of the ongoing dialogs? Something like it is explained here:
http://opensips.org/pipermail/users/2012-January/020476.html
In the above post, the call can be caught in the failure route, but can it
be bridged to the person who is trying to PickUp. Any examples of how to
achieve this will be very much appreciated.

Thanks,

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


Re: [OpenSIPS-Users] Identify CDR accounting on dialog-timeout

2012-01-19 Thread Jayesh Nambiar
Hi,
Just missed in the snippet below, I do call create_dialog("B") before
setting the $dlg_val(timeout) and the problems mentioned below are still
there.

--- Jayesh

2012/1/19 Jayesh Nambiar 

> Hi Razvan,
> I copied the acc directory of revision 8673 into my opensips-1.7.1 and
> also applied the patch and it compiled properly. But I guess it does not
> work as expected. I did the following:
>
> modparam("acc", "db_extra_bye", "timeout=$dlg_val(timeout)")
>
> if(has_totag()) {
>  if(match_dialog()) { # --- Match dialog to associate sequential
> requests ---
>if(is_method("BYE")) {
>$dlg_val(timeout) = "0";
>xlog("L_INFO", "Bye received and timeout is
> $dlg_val(timeout)");
>}
> t_relay();
>  }
> }
>
> if(is_method("INVITE")) {
>$dlg_val(timeout) = "1";
>route(call_logic);
>exit;
> }
>
> Now here, When BYE is received, I can see the XLOG logging the values
> correct, but the value entered in the DB is still 1. Morepver now when
> dialog times out, no CDR record is generated and I can see the following in
> the syslog:
>
> ERROR:acc:acc_dlg_callback: not enough info
>
> Any pointers or directions that you can give me to test this properly. For
> information, I use the topology_hiding function in dialog module to route
> the calls. Also I have another 14 extra values that I enter in acc table
> using the normal db_extra parameter.
>
> Thanks,
>
> --- Jayesh
>
>
>
> 2012/1/19 Jayesh Nambiar 
>
>> Thank you very much Razvan. I will try this out.
>>
>> --- Jayesh
>>
>>
>> On Wed, Jan 18, 2012 at 8:34 PM, Razvan Crainea <
>> razvancrai...@opensips.org> wrote:
>>
>>>  Hi, Jayesh!
>>>
>>> First of all, there are not so many changes between the 1.7.1 and trunk
>>> for the accounting module. Only this new parameter was added as far as I
>>> know, and it should be pretty stable. If you do want to use the module from
>>> trunk, you can simply copy it in your OpenSIPS 1.7.1 folder, and apply the
>>> patch I've attached in order to compile properly.
>>>
>>> If you are using the automatic CDR accounting, then the scenario you
>>> described above can not be implemented. The accounting backend is only set
>>> at the initial invite.
>>>
>>> Regards,
>>>
>>> --
>>> Răzvan Crainea
>>> OpenSIPS Developer
>>>
>>>
>>> On 01/18/2012 04:53 PM, Jayesh Nambiar wrote:
>>>
>>> Hi Razvan,
>>> Not a very relevant question to ask, but is it possible to disable
>>> accounting when dialog times out?? So that no record is entered in the DB
>>> because of dialog timeout. I can probably setflag for syslog accounting
>>> where such calls will also get logged !!
>>>
>>> --- Jayesh
>>>
>>> On Wed, Jan 18, 2012 at 7:14 PM, Jayesh Nambiar 
>>> wrote:
>>>
>>>> Hi Razvan,
>>>> Thanks for your reply. Is it possible to use only the acc module of
>>>> trunk version with the 1.7.1 stable version or do I have to download and
>>>> configure the entire latest trunk version of opensips.
>>>> I intend to use this in production setup, so just a little more worried
>>>> about the reliability.
>>>>
>>>> Thanks again,
>>>>
>>>> --- Jayesh
>>>>
>>>>
>>>>> Hello, Jayesh!
>>>>>
>>>>> You can not achieve this scenario in OpenSIPS 1.7.1, but you can wit
>>>>> the
>>>>> acc module from trunk version. There you have a new parameter,
>>>>> db_extra_bye[1], that can evaluate the pseudo variables after the BYE
>>>>> message is received.
>>>>>
>>>>> An easier way to implement this, is to initialize a dlg_val with the
>>>>> value 1, and if you receive a BYE message, change it to 0. If you don't
>>>>> receive any BYE and a timeout is triggered, then the value will remain
>>>>> 1
>>>>> and that is what you will see in the database. Otherwise, for a normal
>>>>> hang up, you should set it to 0 and this will  reflect in the DB. But
>>>>> once again, this will only work with the trunk version, adding the
>>>>> dlg_val to the db_extra_bye parameter.
>>>>>
>>>>> [1] http://www.opensips.org/html/docs/modules/devel

Re: [OpenSIPS-Users] Identify CDR accounting on dialog-timeout

2012-01-18 Thread Jayesh Nambiar
Hi Razvan,
I copied the acc directory of revision 8673 into my opensips-1.7.1 and also
applied the patch and it compiled properly. But I guess it does not work as
expected. I did the following:

modparam("acc", "db_extra_bye", "timeout=$dlg_val(timeout)")

if(has_totag()) {
 if(match_dialog()) { # --- Match dialog to associate sequential
requests ---
   if(is_method("BYE")) {
   $dlg_val(timeout) = "0";
   xlog("L_INFO", "Bye received and timeout is
$dlg_val(timeout)");
   }
t_relay();
 }
}

if(is_method("INVITE")) {
   $dlg_val(timeout) = "1";
   route(call_logic);
   exit;
}

Now here, When BYE is received, I can see the XLOG logging the values
correct, but the value entered in the DB is still 1. Morepver now when
dialog times out, no CDR record is generated and I can see the following in
the syslog:

ERROR:acc:acc_dlg_callback: not enough info

Any pointers or directions that you can give me to test this properly. For
information, I use the topology_hiding function in dialog module to route
the calls. Also I have another 14 extra values that I enter in acc table
using the normal db_extra parameter.

Thanks,

--- Jayesh


2012/1/19 Jayesh Nambiar 

> Thank you very much Razvan. I will try this out.
>
> --- Jayesh
>
>
> On Wed, Jan 18, 2012 at 8:34 PM, Razvan Crainea <
> razvancrai...@opensips.org> wrote:
>
>>  Hi, Jayesh!
>>
>> First of all, there are not so many changes between the 1.7.1 and trunk
>> for the accounting module. Only this new parameter was added as far as I
>> know, and it should be pretty stable. If you do want to use the module from
>> trunk, you can simply copy it in your OpenSIPS 1.7.1 folder, and apply the
>> patch I've attached in order to compile properly.
>>
>> If you are using the automatic CDR accounting, then the scenario you
>> described above can not be implemented. The accounting backend is only set
>> at the initial invite.
>>
>> Regards,
>>
>> --
>> Răzvan Crainea
>> OpenSIPS Developer
>>
>>
>> On 01/18/2012 04:53 PM, Jayesh Nambiar wrote:
>>
>> Hi Razvan,
>> Not a very relevant question to ask, but is it possible to disable
>> accounting when dialog times out?? So that no record is entered in the DB
>> because of dialog timeout. I can probably setflag for syslog accounting
>> where such calls will also get logged !!
>>
>> --- Jayesh
>>
>> On Wed, Jan 18, 2012 at 7:14 PM, Jayesh Nambiar wrote:
>>
>>> Hi Razvan,
>>> Thanks for your reply. Is it possible to use only the acc module of
>>> trunk version with the 1.7.1 stable version or do I have to download and
>>> configure the entire latest trunk version of opensips.
>>> I intend to use this in production setup, so just a little more worried
>>> about the reliability.
>>>
>>> Thanks again,
>>>
>>> --- Jayesh
>>>
>>>
>>>> Hello, Jayesh!
>>>>
>>>> You can not achieve this scenario in OpenSIPS 1.7.1, but you can wit the
>>>> acc module from trunk version. There you have a new parameter,
>>>> db_extra_bye[1], that can evaluate the pseudo variables after the BYE
>>>> message is received.
>>>>
>>>> An easier way to implement this, is to initialize a dlg_val with the
>>>> value 1, and if you receive a BYE message, change it to 0. If you don't
>>>> receive any BYE and a timeout is triggered, then the value will remain 1
>>>> and that is what you will see in the database. Otherwise, for a normal
>>>> hang up, you should set it to 0 and this will  reflect in the DB. But
>>>> once again, this will only work with the trunk version, adding the
>>>> dlg_val to the db_extra_bye parameter.
>>>>
>>>> [1] http://www.opensips.org/html/docs/modules/devel/acc.html#id293815
>>>>
>>>> Regards,
>>>>
>>>> --
>>>> Ra(zvan Crainea
>>>> OpenSIPS Developer
>>>>
>>>>
>>>>
>>>> On 01/18/2012 01:35 PM, Jayesh Nambiar wrote:
>>>> > Hi,
>>>> > I am using CDR accounting with mysql in my script. I want a way to
>>>> > know if the CDR record is because of a dialog_timeout. Is there some
>>>> > standard way of notifying it from the script. I was thinking of
>>>> > something like this:
>>>> > I have an extra column "time

Re: [OpenSIPS-Users] Identify CDR accounting on dialog-timeout

2012-01-18 Thread Jayesh Nambiar
Thank you very much Razvan. I will try this out.

--- Jayesh

On Wed, Jan 18, 2012 at 8:34 PM, Razvan Crainea
wrote:

>  Hi, Jayesh!
>
> First of all, there are not so many changes between the 1.7.1 and trunk
> for the accounting module. Only this new parameter was added as far as I
> know, and it should be pretty stable. If you do want to use the module from
> trunk, you can simply copy it in your OpenSIPS 1.7.1 folder, and apply the
> patch I've attached in order to compile properly.
>
> If you are using the automatic CDR accounting, then the scenario you
> described above can not be implemented. The accounting backend is only set
> at the initial invite.
>
> Regards,
>
> --
> Răzvan Crainea
> OpenSIPS Developer
>
>
> On 01/18/2012 04:53 PM, Jayesh Nambiar wrote:
>
> Hi Razvan,
> Not a very relevant question to ask, but is it possible to disable
> accounting when dialog times out?? So that no record is entered in the DB
> because of dialog timeout. I can probably setflag for syslog accounting
> where such calls will also get logged !!
>
> --- Jayesh
>
> On Wed, Jan 18, 2012 at 7:14 PM, Jayesh Nambiar wrote:
>
>> Hi Razvan,
>> Thanks for your reply. Is it possible to use only the acc module of trunk
>> version with the 1.7.1 stable version or do I have to download and
>> configure the entire latest trunk version of opensips.
>> I intend to use this in production setup, so just a little more worried
>> about the reliability.
>>
>> Thanks again,
>>
>> --- Jayesh
>>
>>
>>> Hello, Jayesh!
>>>
>>> You can not achieve this scenario in OpenSIPS 1.7.1, but you can wit the
>>> acc module from trunk version. There you have a new parameter,
>>> db_extra_bye[1], that can evaluate the pseudo variables after the BYE
>>> message is received.
>>>
>>> An easier way to implement this, is to initialize a dlg_val with the
>>> value 1, and if you receive a BYE message, change it to 0. If you don't
>>> receive any BYE and a timeout is triggered, then the value will remain 1
>>> and that is what you will see in the database. Otherwise, for a normal
>>> hang up, you should set it to 0 and this will  reflect in the DB. But
>>> once again, this will only work with the trunk version, adding the
>>> dlg_val to the db_extra_bye parameter.
>>>
>>> [1] http://www.opensips.org/html/docs/modules/devel/acc.html#id293815
>>>
>>> Regards,
>>>
>>> --
>>> Ra(zvan Crainea
>>> OpenSIPS Developer
>>>
>>>
>>>
>>> On 01/18/2012 01:35 PM, Jayesh Nambiar wrote:
>>> > Hi,
>>> > I am using CDR accounting with mysql in my script. I want a way to
>>> > know if the CDR record is because of a dialog_timeout. Is there some
>>> > standard way of notifying it from the script. I was thinking of
>>> > something like this:
>>> > I have an extra column "timeout" in  my acc table which is inserted
>>> > using db_extra parameter $avp(timeout) which is initialized to 0. If I
>>> > know somewhere in the script that dialog has timed out, I set this
>>> > $avp(timeout) to 1, so that the record inserted will have timeout
>>> > column value as 1 and it will be easily identifiable.
>>> >
>>> > I understand that AVPs are not dialog persistent, but probably I can
>>> > use some dlg_val variables. Also I dont find any function that
>>> > indicates the dialog_timeout event. Another idea was to set the
>>> > bye_on_timeout flag by calling create_dialog("B") and in local_route
>>> > catch the BYE request and set the dlg_val variables there.
>>> >
>>> > Wanted to know if any of these ideas can work or is there some more
>>> > standard way of doing it.
>>> >
>>> > --- Jayesh
>>> >
>>> >
>>>
>>
>>
>
___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


Re: [OpenSIPS-Users] Identify CDR accounting on dialog-timeout

2012-01-18 Thread Jayesh Nambiar
Hi Razvan,
Not a very relevant question to ask, but is it possible to disable
accounting when dialog times out?? So that no record is entered in the DB
because of dialog timeout. I can probably setflag for syslog accounting
where such calls will also get logged !!

--- Jayesh

On Wed, Jan 18, 2012 at 7:14 PM, Jayesh Nambiar wrote:

> Hi Razvan,
> Thanks for your reply. Is it possible to use only the acc module of trunk
> version with the 1.7.1 stable version or do I have to download and
> configure the entire latest trunk version of opensips.
> I intend to use this in production setup, so just a little more worried
> about the reliability.
>
> Thanks again,
>
> --- Jayesh
>
>
>> Hello, Jayesh!
>>
>> You can not achieve this scenario in OpenSIPS 1.7.1, but you can wit the
>> acc module from trunk version. There you have a new parameter,
>> db_extra_bye[1], that can evaluate the pseudo variables after the BYE
>> message is received.
>>
>> An easier way to implement this, is to initialize a dlg_val with the
>> value 1, and if you receive a BYE message, change it to 0. If you don't
>> receive any BYE and a timeout is triggered, then the value will remain 1
>> and that is what you will see in the database. Otherwise, for a normal
>> hang up, you should set it to 0 and this will  reflect in the DB. But
>> once again, this will only work with the trunk version, adding the
>> dlg_val to the db_extra_bye parameter.
>>
>> [1] http://www.opensips.org/html/docs/modules/devel/acc.html#id293815
>>
>> Regards,
>>
>> --
>> Ra(zvan Crainea
>> OpenSIPS Developer
>>
>>
>>
>> On 01/18/2012 01:35 PM, Jayesh Nambiar wrote:
>> > Hi,
>> > I am using CDR accounting with mysql in my script. I want a way to
>> > know if the CDR record is because of a dialog_timeout. Is there some
>> > standard way of notifying it from the script. I was thinking of
>> > something like this:
>> > I have an extra column "timeout" in  my acc table which is inserted
>> > using db_extra parameter $avp(timeout) which is initialized to 0. If I
>> > know somewhere in the script that dialog has timed out, I set this
>> > $avp(timeout) to 1, so that the record inserted will have timeout
>> > column value as 1 and it will be easily identifiable.
>> >
>> > I understand that AVPs are not dialog persistent, but probably I can
>> > use some dlg_val variables. Also I dont find any function that
>> > indicates the dialog_timeout event. Another idea was to set the
>> > bye_on_timeout flag by calling create_dialog("B") and in local_route
>> > catch the BYE request and set the dlg_val variables there.
>> >
>> > Wanted to know if any of these ideas can work or is there some more
>> > standard way of doing it.
>> >
>> > --- Jayesh
>> >
>> >
>>
>
>
___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


Re: [OpenSIPS-Users] Identify CDR accounting on dialog-timeout

2012-01-18 Thread Jayesh Nambiar
Hi Razvan,
Thanks for your reply. Is it possible to use only the acc module of trunk
version with the 1.7.1 stable version or do I have to download and
configure the entire latest trunk version of opensips.
I intend to use this in production setup, so just a little more worried
about the reliability.

Thanks again,

--- Jayesh


> Hello, Jayesh!
>
> You can not achieve this scenario in OpenSIPS 1.7.1, but you can wit the
> acc module from trunk version. There you have a new parameter,
> db_extra_bye[1], that can evaluate the pseudo variables after the BYE
> message is received.
>
> An easier way to implement this, is to initialize a dlg_val with the
> value 1, and if you receive a BYE message, change it to 0. If you don't
> receive any BYE and a timeout is triggered, then the value will remain 1
> and that is what you will see in the database. Otherwise, for a normal
> hang up, you should set it to 0 and this will  reflect in the DB. But
> once again, this will only work with the trunk version, adding the
> dlg_val to the db_extra_bye parameter.
>
> [1] http://www.opensips.org/html/docs/modules/devel/acc.html#id293815
>
> Regards,
>
> --
> Ra(zvan Crainea
> OpenSIPS Developer
>
>
> On 01/18/2012 01:35 PM, Jayesh Nambiar wrote:
> > Hi,
> > I am using CDR accounting with mysql in my script. I want a way to
> > know if the CDR record is because of a dialog_timeout. Is there some
> > standard way of notifying it from the script. I was thinking of
> > something like this:
> > I have an extra column "timeout" in  my acc table which is inserted
> > using db_extra parameter $avp(timeout) which is initialized to 0. If I
> > know somewhere in the script that dialog has timed out, I set this
> > $avp(timeout) to 1, so that the record inserted will have timeout
> > column value as 1 and it will be easily identifiable.
> >
> > I understand that AVPs are not dialog persistent, but probably I can
> > use some dlg_val variables. Also I dont find any function that
> > indicates the dialog_timeout event. Another idea was to set the
> > bye_on_timeout flag by calling create_dialog("B") and in local_route
> > catch the BYE request and set the dlg_val variables there.
> >
> > Wanted to know if any of these ideas can work or is there some more
> > standard way of doing it.
> >
> > --- Jayesh
> >
> >
>
___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


[OpenSIPS-Users] Identify CDR accounting on dialog-timeout

2012-01-18 Thread Jayesh Nambiar
Hi,
I am using CDR accounting with mysql in my script. I want a way to know if
the CDR record is because of a dialog_timeout. Is there some standard way
of notifying it from the script. I was thinking of something like this:
I have an extra column "timeout" in  my acc table which is inserted using
db_extra parameter $avp(timeout) which is initialized to 0. If I know
somewhere in the script that dialog has timed out, I set this $avp(timeout)
to 1, so that the record inserted will have timeout column value as 1 and
it will be easily identifiable.

I understand that AVPs are not dialog persistent, but probably I can use
some dlg_val variables. Also I dont find any function that indicates the
dialog_timeout event. Another idea was to set the bye_on_timeout flag by
calling create_dialog("B") and in local_route catch the BYE request and set
the dlg_val variables there.

Wanted to know if any of these ideas can work or is there some more
standard way of doing it.

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


Re: [OpenSIPS-Users] cdr accounting on opensips restart

2011-12-19 Thread Jayesh Nambiar
Hi Razwan,
This is the pastebin of logs after shutdown:
http://pastebin.com/tvmrSqwB

This is the pastebin of logs after start which is huge:
http://pastebin.com/C6K4Jt5y

--- Jayesh


On Wed, Dec 7, 2011 at 5:46 PM, Razvan Crainea
wrote:

>  Hi, Jayesh!
>
> I need the logs after opensips restarts. The result might also be pretty
> large.
>
>
> Regards,
>
> --
> Răzvan Crainea
> OpenSIPS Developer
>
>
> On 12/07/2011 02:14 PM, Jayesh Nambiar wrote:
>
> Hi Razwan,
> I have applied the patch and made it working. Do you still only need the
> logs after opensips shutdown or also the logs after opensips restarts.
>
> --- Jayesh
>
> On Wed, Dec 7, 2011 at 4:35 PM, Razvan Crainea  > wrote:
>
>>  Hi, Jayesh!
>>
>> It seems like the problem appears while parsing the string got from the
>> database, so after opensips is restarted. The patch attached should give us
>> more information about the error.
>>
>>
>> Regards,
>>
>> --
>> Răzvan Crainea
>> OpenSIPS Developer
>>
>>
>>   On 12/07/2011 12:37 PM, Jayesh Nambiar wrote:
>>
>> This is the string what I see when I query the dialog table for vars:
>>
>> accX_flags#   |accX_db#(  2 1
>>  11 1002
>>  12013386166
>>  919833171405 0 203.153.53.158 203.153.53.136 0 17 0 2 IP India - Mobile
>> 919 9198 2 1 2 4 0.0150 0.0130 0 0. 0.0226 1. 6 1 6 1 1 2 2 2
>>  Aal Izz Well
>>  Aal Izz Well 1 3 1.2.3.4|accX_leg#|accX_core# INVITE/
>> 100eb870-9e3599cb-13c4-50029-3b71-60de50d0-3b71\#
>> 97.208.30.751120+1+31850054+b8c0a68/
>> 100f7670-9e3599cb-13c4-50029-3b71-3c625412-3b71 200 O á=ÃN
>> |accX_created#Ã=ÃN|
>>
>> --- Jayesh
>>
>> On Wed, Dec 7, 2011 at 4:00 PM, Razvan Crainea <
>> razvancrai...@opensips.org> wrote:
>>
>>>  Hi, Jayesh!
>>>
>>> And what is the string in the database? You can see it in the database
>>> after you kill opensips with the following command:
>>>
>>> select vars from dialog;
>>>
>>>
>>> Regards,
>>>
>>> --
>>> Răzvan Crainea
>>> OpenSIPS Developer
>>>
>>>
>>>   On 12/07/2011 12:24 PM, Jayesh Nambiar wrote:
>>>
>>> Hi Razvan,
>>> Applied the patch and re-tested it. Here the logs that you are
>>> interested in specifically:
>>>
>>> Dec  7 15:50:33 dev /usr/local/sbin/opensips[8011]:
>>> DBG:dialog:write_pair: Dumping var name:  value: <#026>
>>> Dec  7 15:50:33 dev /usr/local/sbin/opensips[8011]:
>>> DBG:dialog:write_pair: compare char 22 - 0 - 11
>>> Dec  7 15:50:33 dev /usr/local/sbin/opensips[8011]:
>>> DBG:dialog:write_pair: compare char 0 - 1 - 12
>>> Dec  7 15:50:33 dev /usr/local/sbin/opensips[8011]:
>>> DBG:dialog:write_pair: compare char 0 - 2 - 13
>>> Dec  7 15:50:33 dev /usr/local/sbin/opensips[8011]:
>>> DBG:dialog:write_pair: compare char 0 - 3 - 14
>>> Dec  7 15:50:33 dev /usr/local/sbin/opensips[8011]:
>>> DBG:dialog:write_pair: Serialized string  (16)
>>> Dec  7 15:50:33 dev /usr/local/sbin/opensips[8011]:
>>> DBG:dialog:write_pair: 0) char: a hex: 61
>>> Dec  7 15:50:33 dev /usr/local/sbin/opensips[8011]:
>>> DBG:dialog:write_pair: 1) char: c hex: 63
>>> Dec  7 15:50:33 dev /usr/local/sbin/opensips[8011]:
>>> DBG:dialog:write_pair: 2) char: c hex: 63
>>> Dec  7 15:50:33 dev /usr/local/sbin/opensips[8011]:
>>> DBG:dialog:write_pair: 3) char: X hex: 58
>>> Dec  7 15:50:33 dev /usr/local/sbin/opensips[8011]:
>>> DBG:dialog:write_pair: 4) char: _ hex: 5F
>>> Dec  7 15:50:33 dev /usr/local/sbin/opensips[8011]:
>>> DBG:dialog:write_pair: 5) char: f hex: 66
>>> Dec  7 15:50:33 dev /usr/local/sbin/opensips[8011]:
>>> DBG:dialog:write_pair: 6) char: l hex: 6C
>>> Dec  7 15:50:33 dev /usr/local/sbin/opensips[8011]:
>>> DBG:dialog:write_pair: 7) char: a hex: 61
>>> Dec  7 15:50:33 dev /usr/local/sbin/opensips[8011]:
>>> DBG:dialog:write_pair: 8) char: g hex: 67
>>> Dec  7 15:50:33 dev /usr/local/sbin/opensips[8011]:
>>> DBG:dialog:write_pair: 9) char: s hex: 73
>>> Dec  7 15:50:33 dev /usr/local/sbin/opensips[8011]:
>>> DBG:dialog:write_pair: 10) char: # hex: 23
>>> Dec  7 15:50:33 dev /usr/local/sbin/opensips[8011]:
>>> DBG:dialog:write_pair: 11) char: #026 hex: 16
>>> Dec  7 15:50:33 dev /usr/local/sbin/opensips[8011]:
>>> DBG:dialog:write_pair: 12) char: #000 hex: 00
>>> Dec  7 15:5

Re: [OpenSIPS-Users] cdr accounting on opensips restart

2011-12-07 Thread Jayesh Nambiar
Hi Razvan,
This actually solved the problem. Thank you very much. It was defined as
VARCHAR instead of TEXT.
Thank you very much for all the efforts. Really appreciate it. Need to get
hold of my DB guy for the stupid mistake !!

--- Jayesh

On Wed, Dec 7, 2011 at 8:13 PM, Razvan Crainea
wrote:

> Hi, Jayesh!
>
> Can you check in your mysql database if the vars column from the dialog
> table is declared as TEXT or BLOB and not CHAR? If not, please change your
> column into BLOB:
>
> ALTER TABLE dialog CHANGE vars vars BLOB;
>
> Regards,
>
> --
> Răzvan Crainea
> OpenSIPS Developer
>
>
> On 12/07/2011 02:27 PM, Jayesh Nambiar wrote:
>
>> Hi Razwan,
>>
>> This is the pastebin of logs after shutdown:
>> http://pastebin.com/tvmrSqwB
>>
>> This is the pastebin of logs after start which is huge:
>> http://pastebin.com/C6K4Jt5y
>>
>> --- Jayesh
>>
>
___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


Re: [OpenSIPS-Users] cdr accounting on opensips restart

2011-12-07 Thread Jayesh Nambiar
Hi Razwan,
I have applied the patch and made it working. Do you still only need the
logs after opensips shutdown or also the logs after opensips restarts.

--- Jayesh

On Wed, Dec 7, 2011 at 4:35 PM, Razvan Crainea
wrote:

>  Hi, Jayesh!
>
> It seems like the problem appears while parsing the string got from the
> database, so after opensips is restarted. The patch attached should give us
> more information about the error.
>
>
> Regards,
>
> --
> Răzvan Crainea
> OpenSIPS Developer
>
>
> On 12/07/2011 12:37 PM, Jayesh Nambiar wrote:
>
> This is the string what I see when I query the dialog table for vars:
>
> accX_flags#   |accX_db#(  2 1
>  11 1002
>  12013386166
>  919833171405 0 203.153.53.158 203.153.53.136 0 17 0 2 IP India - Mobile
> 919 9198 2 1 2 4 0.0150 0.0130 0 0. 0.0226 1. 6 1 6 1 1 2 2 2
>  Aal Izz Well
>  Aal Izz Well 1 3 1.2.3.4|accX_leg#|accX_core# INVITE/
> 100eb870-9e3599cb-13c4-50029-3b71-60de50d0-3b71\#
> 97.208.30.751120+1+31850054+b8c0a68/
> 100f7670-9e3599cb-13c4-50029-3b71-3c625412-3b71 200 O á=ÃN
> |accX_created#Ã=ÃN|
>
> --- Jayesh
>
> On Wed, Dec 7, 2011 at 4:00 PM, Razvan Crainea  > wrote:
>
>>  Hi, Jayesh!
>>
>> And what is the string in the database? You can see it in the database
>> after you kill opensips with the following command:
>>
>> select vars from dialog;
>>
>>
>> Regards,
>>
>> --
>> Răzvan Crainea
>> OpenSIPS Developer
>>
>>
>>   On 12/07/2011 12:24 PM, Jayesh Nambiar wrote:
>>
>> Hi Razvan,
>> Applied the patch and re-tested it. Here the logs that you are interested
>> in specifically:
>>
>> Dec  7 15:50:33 dev /usr/local/sbin/opensips[8011]:
>> DBG:dialog:write_pair: Dumping var name:  value: <#026>
>> Dec  7 15:50:33 dev /usr/local/sbin/opensips[8011]:
>> DBG:dialog:write_pair: compare char 22 - 0 - 11
>> Dec  7 15:50:33 dev /usr/local/sbin/opensips[8011]:
>> DBG:dialog:write_pair: compare char 0 - 1 - 12
>> Dec  7 15:50:33 dev /usr/local/sbin/opensips[8011]:
>> DBG:dialog:write_pair: compare char 0 - 2 - 13
>> Dec  7 15:50:33 dev /usr/local/sbin/opensips[8011]:
>> DBG:dialog:write_pair: compare char 0 - 3 - 14
>> Dec  7 15:50:33 dev /usr/local/sbin/opensips[8011]:
>> DBG:dialog:write_pair: Serialized string  (16)
>> Dec  7 15:50:33 dev /usr/local/sbin/opensips[8011]:
>> DBG:dialog:write_pair: 0) char: a hex: 61
>> Dec  7 15:50:33 dev /usr/local/sbin/opensips[8011]:
>> DBG:dialog:write_pair: 1) char: c hex: 63
>> Dec  7 15:50:33 dev /usr/local/sbin/opensips[8011]:
>> DBG:dialog:write_pair: 2) char: c hex: 63
>> Dec  7 15:50:33 dev /usr/local/sbin/opensips[8011]:
>> DBG:dialog:write_pair: 3) char: X hex: 58
>> Dec  7 15:50:33 dev /usr/local/sbin/opensips[8011]:
>> DBG:dialog:write_pair: 4) char: _ hex: 5F
>> Dec  7 15:50:33 dev /usr/local/sbin/opensips[8011]:
>> DBG:dialog:write_pair: 5) char: f hex: 66
>> Dec  7 15:50:33 dev /usr/local/sbin/opensips[8011]:
>> DBG:dialog:write_pair: 6) char: l hex: 6C
>> Dec  7 15:50:33 dev /usr/local/sbin/opensips[8011]:
>> DBG:dialog:write_pair: 7) char: a hex: 61
>> Dec  7 15:50:33 dev /usr/local/sbin/opensips[8011]:
>> DBG:dialog:write_pair: 8) char: g hex: 67
>> Dec  7 15:50:33 dev /usr/local/sbin/opensips[8011]:
>> DBG:dialog:write_pair: 9) char: s hex: 73
>> Dec  7 15:50:33 dev /usr/local/sbin/opensips[8011]:
>> DBG:dialog:write_pair: 10) char: # hex: 23
>> Dec  7 15:50:33 dev /usr/local/sbin/opensips[8011]:
>> DBG:dialog:write_pair: 11) char: #026 hex: 16
>> Dec  7 15:50:33 dev /usr/local/sbin/opensips[8011]:
>> DBG:dialog:write_pair: 12) char: #000 hex: 00
>> Dec  7 15:50:33 dev /usr/local/sbin/opensips[8011]:
>> DBG:dialog:write_pair: 13) char: #000 hex: 00
>> Dec  7 15:50:33 dev /usr/local/sbin/opensips[8011]:
>> DBG:dialog:write_pair: 14) char: #000 hex: 00
>> Dec  7 15:50:33 dev /usr/local/sbin/opensips[8011]:
>> DBG:dialog:write_pair: 15) char: | hex: 7C
>> Dec  7 15:50:33 dev /usr/local/sbin/opensips[8011]:
>> DBG:dialog:write_pair: Dumping var name:  value: <(>
>>
>> Apart from this, I have pasted everything in syslog after opensips
>> shutdown in the paste-bin here:
>> http://pastebin.com/gx0ZxFLb
>>
>> Let me know if there is anything more to test.
>>
>> --- Jayesh
>>
>> On Wed, Dec 7, 2011 at 3:36 PM, Razvan Crainea <
>> razvancrai...@opensips.org> wrote:
>>
>>>  Sorr, I forgot to attach it. Here it is.
>>>
>>>
>>> Regards,
>>>
>>&

Re: [OpenSIPS-Users] cdr accounting on opensips restart

2011-12-07 Thread Jayesh Nambiar
This is the string what I see when I query the dialog table for vars:

accX_flags#   |accX_db#(  2 1
 11 1002
 12013386166
 919833171405 0 203.153.53.158 203.153.53.136 0 17 0 2 IP India - Mobile
919 9198 2 1 2 4 0.0150 0.0130 0 0. 0.0226 1. 6 1 6 1 1 2 2 2
 Aal Izz Well
 Aal Izz Well 1 3 1.2.3.4|accX_leg#|accX_core# INVITE/
100eb870-9e3599cb-13c4-50029-3b71-60de50d0-3b71\#
97.208.30.751120+1+31850054+b8c0a68/
100f7670-9e3599cb-13c4-50029-3b71-3c625412-3b71 200 O á=ÃN
|accX_created#Ã=ÃN|

--- Jayesh

On Wed, Dec 7, 2011 at 4:00 PM, Razvan Crainea
wrote:

>  Hi, Jayesh!
>
> And what is the string in the database? You can see it in the database
> after you kill opensips with the following command:
>
> select vars from dialog;
>
>
> Regards,
>
> --
> Răzvan Crainea
> OpenSIPS Developer
>
>
> On 12/07/2011 12:24 PM, Jayesh Nambiar wrote:
>
> Hi Razvan,
> Applied the patch and re-tested it. Here the logs that you are interested
> in specifically:
>
> Dec  7 15:50:33 dev /usr/local/sbin/opensips[8011]: DBG:dialog:write_pair:
> Dumping var name:  value: <#026>
> Dec  7 15:50:33 dev /usr/local/sbin/opensips[8011]: DBG:dialog:write_pair:
> compare char 22 - 0 - 11
> Dec  7 15:50:33 dev /usr/local/sbin/opensips[8011]: DBG:dialog:write_pair:
> compare char 0 - 1 - 12
> Dec  7 15:50:33 dev /usr/local/sbin/opensips[8011]: DBG:dialog:write_pair:
> compare char 0 - 2 - 13
> Dec  7 15:50:33 dev /usr/local/sbin/opensips[8011]: DBG:dialog:write_pair:
> compare char 0 - 3 - 14
> Dec  7 15:50:33 dev /usr/local/sbin/opensips[8011]: DBG:dialog:write_pair:
> Serialized string  (16)
> Dec  7 15:50:33 dev /usr/local/sbin/opensips[8011]: DBG:dialog:write_pair:
> 0) char: a hex: 61
> Dec  7 15:50:33 dev /usr/local/sbin/opensips[8011]: DBG:dialog:write_pair:
> 1) char: c hex: 63
> Dec  7 15:50:33 dev /usr/local/sbin/opensips[8011]: DBG:dialog:write_pair:
> 2) char: c hex: 63
> Dec  7 15:50:33 dev /usr/local/sbin/opensips[8011]: DBG:dialog:write_pair:
> 3) char: X hex: 58
> Dec  7 15:50:33 dev /usr/local/sbin/opensips[8011]: DBG:dialog:write_pair:
> 4) char: _ hex: 5F
> Dec  7 15:50:33 dev /usr/local/sbin/opensips[8011]: DBG:dialog:write_pair:
> 5) char: f hex: 66
> Dec  7 15:50:33 dev /usr/local/sbin/opensips[8011]: DBG:dialog:write_pair:
> 6) char: l hex: 6C
> Dec  7 15:50:33 dev /usr/local/sbin/opensips[8011]: DBG:dialog:write_pair:
> 7) char: a hex: 61
> Dec  7 15:50:33 dev /usr/local/sbin/opensips[8011]: DBG:dialog:write_pair:
> 8) char: g hex: 67
> Dec  7 15:50:33 dev /usr/local/sbin/opensips[8011]: DBG:dialog:write_pair:
> 9) char: s hex: 73
> Dec  7 15:50:33 dev /usr/local/sbin/opensips[8011]: DBG:dialog:write_pair:
> 10) char: # hex: 23
> Dec  7 15:50:33 dev /usr/local/sbin/opensips[8011]: DBG:dialog:write_pair:
> 11) char: #026 hex: 16
> Dec  7 15:50:33 dev /usr/local/sbin/opensips[8011]: DBG:dialog:write_pair:
> 12) char: #000 hex: 00
> Dec  7 15:50:33 dev /usr/local/sbin/opensips[8011]: DBG:dialog:write_pair:
> 13) char: #000 hex: 00
> Dec  7 15:50:33 dev /usr/local/sbin/opensips[8011]: DBG:dialog:write_pair:
> 14) char: #000 hex: 00
> Dec  7 15:50:33 dev /usr/local/sbin/opensips[8011]: DBG:dialog:write_pair:
> 15) char: | hex: 7C
> Dec  7 15:50:33 dev /usr/local/sbin/opensips[8011]: DBG:dialog:write_pair:
> Dumping var name:  value: <(>
>
> Apart from this, I have pasted everything in syslog after opensips
> shutdown in the paste-bin here:
> http://pastebin.com/gx0ZxFLb
>
> Let me know if there is anything more to test.
>
> --- Jayesh
>
> On Wed, Dec 7, 2011 at 3:36 PM, Razvan Crainea  > wrote:
>
>>  Sorr, I forgot to attach it. Here it is.
>>
>>
>> Regards,
>>
>> --
>> Răzvan Crainea
>> OpenSIPS Developer
>>
>>
>>   On 12/07/2011 11:59 AM, Jayesh Nambiar wrote:
>>
>> Hi Razvan,
>> I don't see the patch attached !!
>>
>> --- Jayesh
>>
>> On Wed, Dec 7, 2011 at 2:57 PM, Razvan Crainea <
>> razvancrai...@opensips.org> wrote:
>>
>>>  Hi, Jayesh !
>>>
>>> The root of the problem is the accX_flags dialog variable isn't properly
>>> serialized. What I'm trying to find out is why this happens, that's why I
>>> will need some extra debug as I can't figure out the problem there. So
>>> please apply this last patch and try again. It should be applied after the
>>> previous patch I've sent you, so you won't need another fresh checkout.
>>> This time there will be a lot of dumped info in the log, so I would
>>> really appreciate if you could send them over pastebin. The only part that
>>> I will be int

Re: [OpenSIPS-Users] cdr accounting on opensips restart

2011-12-07 Thread Jayesh Nambiar
Hi Razvan,
Applied the patch and re-tested it. Here the logs that you are interested
in specifically:

Dec  7 15:50:33 dev /usr/local/sbin/opensips[8011]: DBG:dialog:write_pair:
Dumping var name:  value: <#026>
Dec  7 15:50:33 dev /usr/local/sbin/opensips[8011]: DBG:dialog:write_pair:
compare char 22 - 0 - 11
Dec  7 15:50:33 dev /usr/local/sbin/opensips[8011]: DBG:dialog:write_pair:
compare char 0 - 1 - 12
Dec  7 15:50:33 dev /usr/local/sbin/opensips[8011]: DBG:dialog:write_pair:
compare char 0 - 2 - 13
Dec  7 15:50:33 dev /usr/local/sbin/opensips[8011]: DBG:dialog:write_pair:
compare char 0 - 3 - 14
Dec  7 15:50:33 dev /usr/local/sbin/opensips[8011]: DBG:dialog:write_pair:
Serialized string  (16)
Dec  7 15:50:33 dev /usr/local/sbin/opensips[8011]: DBG:dialog:write_pair:
0) char: a hex: 61
Dec  7 15:50:33 dev /usr/local/sbin/opensips[8011]: DBG:dialog:write_pair:
1) char: c hex: 63
Dec  7 15:50:33 dev /usr/local/sbin/opensips[8011]: DBG:dialog:write_pair:
2) char: c hex: 63
Dec  7 15:50:33 dev /usr/local/sbin/opensips[8011]: DBG:dialog:write_pair:
3) char: X hex: 58
Dec  7 15:50:33 dev /usr/local/sbin/opensips[8011]: DBG:dialog:write_pair:
4) char: _ hex: 5F
Dec  7 15:50:33 dev /usr/local/sbin/opensips[8011]: DBG:dialog:write_pair:
5) char: f hex: 66
Dec  7 15:50:33 dev /usr/local/sbin/opensips[8011]: DBG:dialog:write_pair:
6) char: l hex: 6C
Dec  7 15:50:33 dev /usr/local/sbin/opensips[8011]: DBG:dialog:write_pair:
7) char: a hex: 61
Dec  7 15:50:33 dev /usr/local/sbin/opensips[8011]: DBG:dialog:write_pair:
8) char: g hex: 67
Dec  7 15:50:33 dev /usr/local/sbin/opensips[8011]: DBG:dialog:write_pair:
9) char: s hex: 73
Dec  7 15:50:33 dev /usr/local/sbin/opensips[8011]: DBG:dialog:write_pair:
10) char: # hex: 23
Dec  7 15:50:33 dev /usr/local/sbin/opensips[8011]: DBG:dialog:write_pair:
11) char: #026 hex: 16
Dec  7 15:50:33 dev /usr/local/sbin/opensips[8011]: DBG:dialog:write_pair:
12) char: #000 hex: 00
Dec  7 15:50:33 dev /usr/local/sbin/opensips[8011]: DBG:dialog:write_pair:
13) char: #000 hex: 00
Dec  7 15:50:33 dev /usr/local/sbin/opensips[8011]: DBG:dialog:write_pair:
14) char: #000 hex: 00
Dec  7 15:50:33 dev /usr/local/sbin/opensips[8011]: DBG:dialog:write_pair:
15) char: | hex: 7C
Dec  7 15:50:33 dev /usr/local/sbin/opensips[8011]: DBG:dialog:write_pair:
Dumping var name:  value: <(>

Apart from this, I have pasted everything in syslog after opensips shutdown
in the paste-bin here:
http://pastebin.com/gx0ZxFLb

Let me know if there is anything more to test.

--- Jayesh

On Wed, Dec 7, 2011 at 3:36 PM, Razvan Crainea
wrote:

>  Sorr, I forgot to attach it. Here it is.
>
>
> Regards,
>
> --
> Răzvan Crainea
> OpenSIPS Developer
>
>
> On 12/07/2011 11:59 AM, Jayesh Nambiar wrote:
>
> Hi Razvan,
> I don't see the patch attached !!
>
> --- Jayesh
>
> On Wed, Dec 7, 2011 at 2:57 PM, Razvan Crainea  > wrote:
>
>>  Hi, Jayesh !
>>
>> The root of the problem is the accX_flags dialog variable isn't properly
>> serialized. What I'm trying to find out is why this happens, that's why I
>> will need some extra debug as I can't figure out the problem there. So
>> please apply this last patch and try again. It should be applied after the
>> previous patch I've sent you, so you won't need another fresh checkout.
>> This time there will be a lot of dumped info in the log, so I would
>> really appreciate if you could send them over pastebin. The only part that
>> I will be interested in is between these lines:
>>
>>
>> DBG:dialog:write_pair: Dumping var name:  value: <#026>
>>
>>  and
>>
>>
>> DBG:dialog:write_pair: Dumping var name:  value: <(>
>>
>>  Thank you very much for testing!
>>  Regards,
>>
>> --
>> Răzvan Crainea
>> OpenSIPS Developer
>>
>>
>>   On 12/06/2011 07:57 PM, Jayesh Nambiar wrote:
>>
>> Hi Razvan,
>> I just did a fresh download from
>> http://opensips.org/pub/opensips/latest/src/. I did apply the patch
>> successfully and I still have the problem of CDR not being recorded after
>> restart. Here is the syslog pasted after opensips was being shut down:
>>
>> Dec  6 20:20:13 dev /usr/local/sbin/opensips[
>> 15700]: DBG:dialog:dialog_update_db: inserting new dialog 0x7f3d323bd5f8
>> Dec  6 20:20:13 dev /usr/local/sbin/opensips[15700]:
>> DBG:dialog:write_pair: Dumping var name:  value: <#026>
>> Dec  6 20:20:13 dev /usr/local/sbin/opensips[15700]:
>> DBG:dialog:write_pair: Serialized string  (16)
>> Dec  6 20:20:13 dev /usr/local/sbin/opensips[15700]:
>> DBG:dialog:write_pair: Dumping var name:  value: <(>
>> Dec  6 20:20:13 dev /usr/local/sbin/opensips[15700]:
>> DBG:dialog:write_pair: Serialize

Re: [OpenSIPS-Users] cdr accounting on opensips restart

2011-12-07 Thread Jayesh Nambiar
Hi Razvan,
I don't see the patch attached !!

--- Jayesh

On Wed, Dec 7, 2011 at 2:57 PM, Razvan Crainea
wrote:

>  Hi, Jayesh !
>
> The root of the problem is the accX_flags dialog variable isn't properly
> serialized. What I'm trying to find out is why this happens, that's why I
> will need some extra debug as I can't figure out the problem there. So
> please apply this last patch and try again. It should be applied after the
> previous patch I've sent you, so you won't need another fresh checkout.
> This time there will be a lot of dumped info in the log, so I would really
> appreciate if you could send them over pastebin. The only part that I will
> be interested in is between these lines:
>
>
> DBG:dialog:write_pair: Dumping var name:  value: <#026>
>
> and
>
>
> DBG:dialog:write_pair: Dumping var name:  value: <(>
>
> Thank you very much for testing!
> Regards,
>
> --
> Răzvan Crainea
> OpenSIPS Developer
>
>
> On 12/06/2011 07:57 PM, Jayesh Nambiar wrote:
>
> Hi Razvan,
> I just did a fresh download from
> http://opensips.org/pub/opensips/latest/src/. I did apply the patch
> successfully and I still have the problem of CDR not being recorded after
> restart. Here is the syslog pasted after opensips was being shut down:
>
> Dec  6 20:20:13 dev /usr/local/sbin/opensips[
> 15700]: DBG:dialog:dialog_update_db: inserting new dialog 0x7f3d323bd5f8
> Dec  6 20:20:13 dev /usr/local/sbin/opensips[15700]:
> DBG:dialog:write_pair: Dumping var name:  value: <#026>
> Dec  6 20:20:13 dev /usr/local/sbin/opensips[15700]:
> DBG:dialog:write_pair: Serialized string  (16)
> Dec  6 20:20:13 dev /usr/local/sbin/opensips[15700]:
> DBG:dialog:write_pair: Dumping var name:  value: <(>
> Dec  6 20:20:13 dev /usr/local/sbin/opensips[15700]:
> DBG:dialog:write_pair: Serialized string  (263)
> Dec  6 20:20:13 dev /usr/local/sbin/opensips[15700]:
> DBG:dialog:write_pair: Dumping var name:  value: <>
> Dec  6 20:20:13 dev /usr/local/sbin/opensips[15700]:
> DBG:dialog:write_pair: Serialized string  (14)
> Dec  6 20:20:13 dev /usr/local/sbin/opensips[15700]:
> DBG:dialog:write_pair: Dumping var name:  value: <#006>
> Dec  6 20:20:13 dev /usr/local/sbin/opensips[15700]:
> DBG:dialog:write_pair: escaping char 53
> Dec  6 20:20:13 dev /usr/local/sbin/opensips[15700]:
> DBG:dialog:write_pair: Serialized string  (165)
> Dec  6 20:20:13 dev /usr/local/sbin/opensips[15700]:
> DBG:dialog:write_pair: Dumping var name:  value: <<95>+ÃN>
> Dec  6 20:20:13 dev /usr/local/sbin/opensips[15700]:
> DBG:dialog:write_pair: Serialized string +ÃN> (22)
> Dec  6 20:20:13 dev /usr/local/sbin/opensips[15700]:
> DBG:dialog:write_dialog_vars: var string is (480)
> Dec  6 20:20:13 dev /usr/local/sbin/opensips[15700]:
> DBG:dialog:write_pair: Dumping var name:  value: <1002>
> Dec  6 20:20:13 dev /usr/local/sbin/opensips[15700]:
> DBG:dialog:write_pair: Serialized string  (21)
> Dec  6 20:20:13 dev /usr/local/sbin/opensips[15700]:
> DBG:dialog:write_pair: Dumping var name:  value: <1003>
> Dec  6 20:20:13 dev /usr/local/sbin/opensips[15700]:
> DBG:dialog:write_pair: Serialized string  (21)
> Dec  6 20:20:13 dev /usr/local/sbin/opensips[15700]:
> DBG:dialog:write_pair: Dumping var name:  value: <1007>
> Dec  6 20:20:13 dev /usr/local/sbin/opensips[15700]:
> DBG:dialog:write_pair: Serialized string  (21)
> Dec  6 20:20:13 dev /usr/local/sbin/opensips[15700]:
> DBG:dialog:write_dialog_profiles: profile string is
> (63)
> Dec  6 20:20:13 dev /usr/local/sbin/opensips[15700]:
> DBG:db_mysql:has_stmt_ctx: ctx found for dialog
> Dec  6 20:20:13 dev /usr/local/sbin/opensips[15700]:
> DBG:db_mysql:db_mysql_do_prepared_query: conn=0x810858 (tail=8454488)
> MC=0x8101b8
> Dec  6 20:20:13 dev /usr/local/sbin/opensips[15700]:
> DBG:db_mysql:db_mysql_do_prepared_query: set values for the statement run
>
> I hope this will help you figure out something more relevant.
>
>
> --- Jayesh
>
>
> On Tue, Dec 6, 2011 at 7:56 PM, Razvan Crainea  > wrote:
>
>>  Hi, Jayesh!
>>
>> Can you post your dlg_db_handler.c file on pastebin? I think you are
>> using an old version of the dialog module, and that's why you have this
>> problem.
>>
>>
>> Regards,
>>
>> --
>> Răzvan Crainea
>> OpenSIPS Developer
>>
>>
___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


  1   2   >