Re: [OpenSIPS-Users] Concerns with 1.x series and new 2.1 Opensips

2015-01-12 Thread John Nash
Ok I will test flatstore and will see how it goes if I try to insert into
real DB using some other process (May be some script which will check for
new records in loop)

On Mon, Jan 12, 2015 at 4:06 PM, Bogdan-Andrei Iancu 
wrote:

>  John,
>
> Using "exec" has its own penalties - the exec itself is CPU consuming as
> the Operating System has to create a new process each time. Os it is not
> I/O, but it is CPU (system time).
>
> For the accounting part, I still recommend the flatstore as the most
> efficient approach.
>
> Regards,
>
> Bogdan-Andrei Iancu
> OpenSIPS Founder and Developerhttp://www.opensips-solutions.com
>
> On 12.01.2015 11:55, John Nash wrote:
>
> OK..I think doing accounting in exec makes perfect sense.
>
> On Mon, Jan 12, 2015 at 2:36 PM, Bogdan-Andrei Iancu 
> wrote:
>
>>  Hi John,
>>
>> Indeed, depending on the nature of the query, some answers can be cached,
>> other not. If not, you need to be sure your DB server is as efficient as
>> possible in answering.
>> Accounting via flatstore file can be realtime (data is written in RT into
>> file and you can rote them when you need).
>>
>> The next 2.1 is the first OpenSIPS version supporting Async I/O ops.
>> There are many kinds of I/O ops and used in many places. It is hard to add
>> async support for all of them from the day one. The current plan is to have
>> support for exec module, for rest_client module and possible for some mysql
>> queries.
>> In the worst case, you can push your DB queries into external scripts and
>> use the "exec" module with the async support.
>>
>> Best regards,
>>
>> Bogdan-Andrei Iancu
>> OpenSIPS Founder and Developerhttp://www.opensips-solutions.com
>>
>>   On 11.01.2015 15:48, John Nash wrote:
>>
>>   Hello Bogdan,
>>
>>  Thank you. Cache features are really good and I am using for Register
>> and Invite auth  but I need to run a query to find out allowed duration for
>> a call (unfortunately caching cannot be used in that). Also Accounting I am
>> afraid has to be real time in my case.
>>
>>  I think i should look forward to version 2.X till the features I need
>> are there. Any guess how long full featured development version will be out?
>>
>>  John
>>
>>
>>
>>
>>
>>
>> On Sat, Jan 10, 2015 at 1:16 AM, Bogdan-Andrei Iancu > > wrote:
>>
>>>  Hi Nash,
>>>
>>> It is somewhere in the middle :). Of course the DB ops will bring some
>>> penalties to the performance, so you need to take care and tune your DB for
>>> the best performance (not to drag down opensips). With db ops is very
>>> common in OpenSIPS scripts, so you do not do anything crazy or stupid there.
>>>
>>> Of course, you should look into optimizing the DB ops you use:
>>> - DB auth - use caching at script level (see
>>> http://www.opensips.org/Documentation/Tutorials-MemoryCaching)
>>> - ACC - consider using db_flatstore to avoid writing into a real DB
>>> - dialog - if not really a must use db modes 2 or 3 (
>>> http://www.opensips.org/html/docs/modules/1.11.x/dialog.html#id294001)
>>>
>>> Regards,
>>>
>>> Bogdan-Andrei Iancu
>>> OpenSIPS Founder and Developerhttp://www.opensips-solutions.com
>>>
>>>  On 09.01.2015 20:19, John Nash wrote:
>>>
>>> I have used opensips for load balancing and some border proxy+
>>> NAT+rtpproxy in past and am quite happy with it. Recently I decided to add
>>> DB operations (Auth and accounting, routing and dialog into it so that
>>> heavy lifting of VOIP network can be given to opensips. I wanted to send
>>> call to PBX only when it is really needed (Like voicemail and conference
>>> etc)
>>>
>>>  But in a long time I saw this article
>>> http://www.opensips.org/Documentation/TroubleShooting-FindPerfPb
>>>
>>>  As per this tutorial I think if any DB operation is slow, it will hit
>>> overall performance (I mean the transactions which do not require DB can
>>> also be stuck).
>>>
>>>  I know good engineers at openisps have already figured it out and
>>> working on 2.X version but looks like it will take a while so that I can
>>> give it a try (As dialog is not in current release).
>>>
>>>  With 1.X series + DB auth/acc + dialog should I reconsider my approach
>>> or there are systems running successfully and I am just being paranoid?
>>>
>>>  John
>>>
>>>
>>>
>>>
>>>
>>>  ___
>>> 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] Call sequence in serial forking

2015-01-12 Thread John Nash
I am testing one setup where opensips drouting module sends call to
"Freeswitch"  and I encountered one situation ...

UA sends Invite to opensips, opensips uses drouting module and sends Invite
to Freeswitch , callee rejects the call and opensips sends ACK to
freeswitch and sends second invite (from failure route). This second invite
(which has same call id but different branch in via) is not treated as
another transaction by freeswitch and it sends back SIP 482 Request merged
response.

I had the same setup tested using SEMS as SBC some times back successfully.
I am not sure which side this issue should be taken care of (opensips or
freeswitch)

I looked in some freeswitch mail archives and in one post I can see someone
suggesting that from opensips side we should increase Cseq in case of
second invite. I think this can be done using script but I am not sure if i
should do or not.
This is the post
http://lists.freeswitch.org/pipermail/freeswitch-users/2013-February/092600.html
___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


Re: [OpenSIPS-Users] Concerns with 1.x series and new 2.1 Opensips

2015-01-12 Thread John Nash
OK..I think doing accounting in exec makes perfect sense.

On Mon, Jan 12, 2015 at 2:36 PM, Bogdan-Andrei Iancu 
wrote:

>  Hi John,
>
> Indeed, depending on the nature of the query, some answers can be cached,
> other not. If not, you need to be sure your DB server is as efficient as
> possible in answering.
> Accounting via flatstore file can be realtime (data is written in RT into
> file and you can rote them when you need).
>
> The next 2.1 is the first OpenSIPS version supporting Async I/O ops. There
> are many kinds of I/O ops and used in many places. It is hard to add async
> support for all of them from the day one. The current plan is to have
> support for exec module, for rest_client module and possible for some mysql
> queries.
> In the worst case, you can push your DB queries into external scripts and
> use the "exec" module with the async support.
>
> Best regards,
>
> Bogdan-Andrei Iancu
> OpenSIPS Founder and Developerhttp://www.opensips-solutions.com
>
> On 11.01.2015 15:48, John Nash wrote:
>
>   Hello Bogdan,
>
>  Thank you. Cache features are really good and I am using for Register and
> Invite auth  but I need to run a query to find out allowed duration for a
> call (unfortunately caching cannot be used in that). Also Accounting I am
> afraid has to be real time in my case.
>
>  I think i should look forward to version 2.X till the features I need are
> there. Any guess how long full featured development version will be out?
>
>  John
>
>
>
>
>
>
> On Sat, Jan 10, 2015 at 1:16 AM, Bogdan-Andrei Iancu 
> wrote:
>
>>  Hi Nash,
>>
>> It is somewhere in the middle :). Of course the DB ops will bring some
>> penalties to the performance, so you need to take care and tune your DB for
>> the best performance (not to drag down opensips). With db ops is very
>> common in OpenSIPS scripts, so you do not do anything crazy or stupid there.
>>
>> Of course, you should look into optimizing the DB ops you use:
>> - DB auth - use caching at script level (see
>> http://www.opensips.org/Documentation/Tutorials-MemoryCaching)
>> - ACC - consider using db_flatstore to avoid writing into a real DB
>> - dialog - if not really a must use db modes 2 or 3 (
>> http://www.opensips.org/html/docs/modules/1.11.x/dialog.html#id294001)
>>
>> Regards,
>>
>> Bogdan-Andrei Iancu
>> OpenSIPS Founder and Developerhttp://www.opensips-solutions.com
>>
>>  On 09.01.2015 20:19, John Nash wrote:
>>
>> I have used opensips for load balancing and some border proxy+
>> NAT+rtpproxy in past and am quite happy with it. Recently I decided to add
>> DB operations (Auth and accounting, routing and dialog into it so that
>> heavy lifting of VOIP network can be given to opensips. I wanted to send
>> call to PBX only when it is really needed (Like voicemail and conference
>> etc)
>>
>>  But in a long time I saw this article
>> http://www.opensips.org/Documentation/TroubleShooting-FindPerfPb
>>
>>  As per this tutorial I think if any DB operation is slow, it will hit
>> overall performance (I mean the transactions which do not require DB can
>> also be stuck).
>>
>>  I know good engineers at openisps have already figured it out and
>> working on 2.X version but looks like it will take a while so that I can
>> give it a try (As dialog is not in current release).
>>
>>  With 1.X series + DB auth/acc + dialog should I reconsider my approach
>> or there are systems running successfully and I am just being paranoid?
>>
>>  John
>>
>>
>>
>>
>>
>>  ___
>> 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] Concerns with 1.x series and new 2.1 Opensips

2015-01-11 Thread John Nash
Hello Bogdan,

Thank you. Cache features are really good and I am using for Register and
Invite auth  but I need to run a query to find out allowed duration for a
call (unfortunately caching cannot be used in that). Also Accounting I am
afraid has to be real time in my case.

I think i should look forward to version 2.X till the features I need are
there. Any guess how long full featured development version will be out?

John






On Sat, Jan 10, 2015 at 1:16 AM, Bogdan-Andrei Iancu 
wrote:

>  Hi Nash,
>
> It is somewhere in the middle :). Of course the DB ops will bring some
> penalties to the performance, so you need to take care and tune your DB for
> the best performance (not to drag down opensips). With db ops is very
> common in OpenSIPS scripts, so you do not do anything crazy or stupid there.
>
> Of course, you should look into optimizing the DB ops you use:
> - DB auth - use caching at script level (see
> http://www.opensips.org/Documentation/Tutorials-MemoryCaching)
> - ACC - consider using db_flatstore to avoid writing into a real DB
> - dialog - if not really a must use db modes 2 or 3 (
> http://www.opensips.org/html/docs/modules/1.11.x/dialog.html#id294001)
>
> Regards,
>
> Bogdan-Andrei Iancu
> OpenSIPS Founder and Developerhttp://www.opensips-solutions.com
>
> On 09.01.2015 20:19, John Nash wrote:
>
>I have used opensips for load balancing and some border proxy+
> NAT+rtpproxy in past and am quite happy with it. Recently I decided to add
> DB operations (Auth and accounting, routing and dialog into it so that
> heavy lifting of VOIP network can be given to opensips. I wanted to send
> call to PBX only when it is really needed (Like voicemail and conference
> etc)
>
>  But in a long time I saw this article
> http://www.opensips.org/Documentation/TroubleShooting-FindPerfPb
>
>  As per this tutorial I think if any DB operation is slow, it will hit
> overall performance (I mean the transactions which do not require DB can
> also be stuck).
>
>  I know good engineers at openisps have already figured it out and working
> on 2.X version but looks like it will take a while so that I can give it a
> try (As dialog is not in current release).
>
>  With 1.X series + DB auth/acc + dialog should I reconsider my approach or
> there are systems running successfully and I am just being paranoid?
>
>  John
>
>
>
>
>
> ___
> 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] Concerns with 1.x series and new 2.1 Opensips

2015-01-09 Thread John Nash
I have used opensips for load balancing and some border proxy+ NAT+rtpproxy
in past and am quite happy with it. Recently I decided to add DB operations
(Auth and accounting, routing and dialog into it so that heavy lifting of
VOIP network can be given to opensips. I wanted to send call to PBX only
when it is really needed (Like voicemail and conference etc)

But in a long time I saw this article
http://www.opensips.org/Documentation/TroubleShooting-FindPerfPb

As per this tutorial I think if any DB operation is slow, it will hit
overall performance (I mean the transactions which do not require DB can
also be stuck).

I know good engineers at openisps have already figured it out and working
on 2.X version but looks like it will take a while so that I can give it a
try (As dialog is not in current release).

With 1.X series + DB auth/acc + dialog should I reconsider my approach or
there are systems running successfully and I am just being paranoid?

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


Re: [OpenSIPS-Users] Printing $si in failure route

2015-01-09 Thread John Nash
OK got the point. May be I should save some avp at the time of outgoing
requests and then check for that in failure route.

On Fri, Jan 9, 2015 at 6:29 PM, Răzvan Crainea  wrote:

>  Hi, John!
>
> In failure_route[] you process the request. Therefore the $si is the IP
> address of the request, not the reply.
> If you want to print the IP address of the replies, you have to print them
> in onreply_route[].
>
> Best regards,
>
> Răzvan Crainea
> OpenSIPS Solutionswww.opensips-solutions.com
>
> On 01/09/2015 02:26 PM, John Nash wrote:
>
>  I just noticed something odd when I print $si to know source IP of
> failed responses (In failure route) I think its not printing correct
> address (It works as expected in main routing block).
>
>  May be its something wrong I am doing which resulted this I just thought
> I will check with others.
>
>
> ___
> 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] Printing $si in failure route

2015-01-09 Thread John Nash
I just noticed something odd when I print $si to know source IP of failed
responses (In failure route) I think its not printing correct address (It
works as expected in main routing block).

May be its something wrong I am doing which resulted this I just thought I
will check with others.
___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


Re: [OpenSIPS-Users] General Architecture opinion needed

2015-01-06 Thread John Nash
OK May be I misunderstood b2bua being dialog dependent. But I saw
"toplogy_hiding" function of dialog module and I think it is very cool. For
now it will solve need of b2bua for me.


On Tue, Jan 6, 2015 at 9:37 PM, Bogdan-Andrei Iancu 
wrote:

>  Hi John,
>
> Why do you need the B2B part ?  And answering your questions:
>
> 1) B2B is not dialog dependent, but TM only, so there is no risk
>
> 2) It will be more difficult to have them in B2B than in proxy - those
> features are more proxy oriented.
>
> Regards,
>
> Bogdan-Andrei Iancu
> OpenSIPS Founder and Developerhttp://www.opensips-solutions.com
>
> On 26.12.2014 11:25, John Nash wrote:
>
>   I am trying to make full SBC using mostly opensips components.The call
> flow will be like diagram below..
>  For features like concurrent call limit, call timeout, CDR accounting I
> will have to use dialog module in main opensips proxy. For B2bua if I
> understand correctly I will have to use another instance. My doubts are ..
>
>  1- Since B2bua is dependent on dialog module this architecture will
> create dialog twice in shared database (Plan to use real time DB mode for
> persistence and display of ongoing calls in real time). Can this redundant
> work be avoided?
>
>  2- Can concurrent call limit, Session timeout (Prepaid), CDR accounting
> be implemented at b2bua instance and leaving proxy free of this burden?
>
>
>
> [image: Inline image 1]
>
>
>
> ___
> Users mailing 
> listUsers@lists.opensips.orghttp://lists.opensips.org/cgi-bin/mailman/listinfo/users
>
>
>
___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


Re: [OpenSIPS-Users] replace_body function question

2015-01-06 Thread John Nash
Yes!!..It works. I used EOH because in actual implementation I need to use
some regular expression ( So that it can change s= line to "xyz" no matter
what the original value.) but with EOH (even with hard coded value) it does
not work.

On Tue, Jan 6, 2015 at 9:28 PM, Bogdan-Andrei Iancu 
wrote:

>  Hi John,
>
> I guess you want to replace a line in the message body with
> replace_body_all(), right ? Give it a test without the EOH :
> replace_body_all("^s=xyz","s=abc");
>
> Regards,
>
> Bogdan-Andrei Iancu
> OpenSIPS Founder and Developerhttp://www.opensips-solutions.com
>
> On 02.01.2015 17:06, John Nash wrote:
>
>  Has there been some recent changes to this function? I used this
> function in version 1.6 fine but now not seem to be working. I am trying
> very simple ..
>
> replace_body_all("^s=xyz\r\n","s=abc\r\n");
>
>  But it does not work. I tried " strip_body()" and it worked as expected.
>
>
> ___
> 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] Issue in storing Dialog Variables into the Database (Postgresql)

2015-01-06 Thread John Nash
Looks like I need to dump DB and recreate in order to change encoding. I
will let you know when I do it.

On Tue, Jan 6, 2015 at 9:15 PM, Bogdan-Andrei Iancu 
wrote:

>  Oh...I noticed you already mentioned is "bytea" Long shot, but could
> you try to change the encoding to "LATIN1" for the dialog table ?
>
> Thanks,
>
> Bogdan-Andrei Iancu
> OpenSIPS Founder and Developerhttp://www.opensips-solutions.com
>
> On 06.01.2015 17:38, Bogdan-Andrei Iancu wrote:
>
> Hi John,
>
> In the definition of your "dialog" table, the "vars" field has "bytea" or
> "text" type ?
>
> Regards,
>
> Bogdan-Andrei Iancu
> OpenSIPS Founder and Developerhttp://www.opensips-solutions.com
>
> On 28.12.2014 11:37, John Nash wrote:
>
>  One more update
>
>  I just now checked dialog parameter "modparam("dialog",
> "db_flush_vals_profiles", 1)" and used it (Probably i should have used it
> in a first place) after that I get the error when opensips tries to insert
> dialog into the database.
>
> ERROR:db_postgres:db_postgres_submit_query: 0x7f544ad0ec20 PQsendQuery
> Error: ERROR:  invalid byte sequence for encoding "UTF8": 0xe0c79f
> HINT:  This error can also happen if the byte sequence does not match the
> encoding expected by the server, which is controlled by "client_encoding".
>  Query: insert into dialog
> (dlg_id,callid,from_uri,from_tag,to_uri,to_tag,caller_sock,callee_sock,start_time,mangled_from_uri,mangled_to_uri,state,timeout,caller_cseq,callee_cseq,caller_ping_cseq,callee_ping_cseq,flags,vars,profiles,script_flags,module_flags,caller_route_set,callee_route_set,caller_contact,callee_contact
> )
> values (17240765013518,'0a1dc58ac1104d588471e1c898a040bd','
> sip:98116181@192.168.1.5:9092','523d873f92eb40c38a58f90c9474cab9','
> sip:@192.168.1.5:9092
> ','42A53A43-549FC7E3E7B0-778D1700','udp:192.168.1.5:9092','udp:
> 192.168.112.5:9090',1419757544,NULL,NULL,3,1419761144,'0','10580',0,0,16,'accX_created#àÇT','caller#PC_BR3DGE_xyz
> Billing_|',0,0,NULL,NULL,'sip:98116181@103.255.76.231:1100;ob
> ','sip:192.168.112.5:5080;transport=udp')
>
>
> On Fri, Dec 26, 2014 at 1:27 PM, John Nash  wrote:
>
>> no it is bytea. I also tried changing it to text but results are same.
>>
>> On Fri, Dec 26, 2014 at 1:21 PM, Bogdan-Andrei Iancu > > wrote:
>>
>>>  Hi John,
>>>
>>> I see you also open a ticket on this:
>>> https://github.com/OpenSIPS/opensips/issues/398
>>>
>>> I suppose your dialog table does have a reasonable size constrain for
>>> the vars column, right ?
>>>
>>> Regards,
>>>
>>> Bogdan-Andrei Iancu
>>> OpenSIPS Founder and Developerhttp://www.opensips-solutions.com
>>>
>>>  On 22.12.2014 09:27, John Nash wrote:
>>>
>>> I am using Opensips with dialog module and using DB as Postgresql.
>>> I am using modparam("dialog", "db_mode", 1). At the time of dialog creation
>>> I am also setting values to some dialog variables which I can see with mi
>>> fifo commands.
>>>
>>>  My issue is when i run a select query and try to see "vars" column
>>> contents (I set vars column data type as text for simplicity), I do not see
>>> all information stored. It seems to be truncated. I see like below ...
>>>
>>> "accX_table#acc|accX_flags#5 DB_MISSED_FLAG DB_FLAG CDR_FLAG
>>> FAIL_TRANS_FLAG|accX_db# " (There is some special character at the end)
>>>
>>>  On the other hand when i see dialog using mi fifo command I see full
>>> list of variables.
>>>
>>> accX_table:: acc
>>> accX_flags:: 5 DB_MISSED_FLAG DB_FLAG CDR_FLAG FAIL_TRANS_FLAG
>>> accX_db:: \b\x00\x00\x00\x1d\x00sip:test@192.168.7.5:9090$\
>>> x00sip:919811618189@192.168.7.5:9090#\x00sip:11025919811618189@192.168.7.8\x0e\x00192.168.3.1
>>> <http://x00sip:919811618189@192.168.7.5:9090#%5Cx00sip:11025919811618189@192.168.7.8%5Cx0e%5Cx00192.168.3.1>
>>> ?\x00\x00\n\x001419221825
>>> accX_leg:: \x00\x00\x00\x00
>>> accX_core:: \x06\x00INVITE
>>> \x0052a5e031f1fa4a50883cf14fcfb0dfb1"\x007C34DE52-54979B3E000CEDFB-4BCFC700\x00e26faa1c7c654b1dbe6b1d86a12b2e61\x03\x00200\x02\x00OK\b\x00E\x9b\x97T\x00\x00\x00\x00
>>> accX_created:: >\x9b\x97T\x00\x00\x00\x00
>>> caller_IP:: 192.168.3.1
>>> ring_time:: 1419221825
>>>
>>>  Somehow values after accX_db are not being stored into the DB.
>>>
>>>  Any ideas?
>>>
>>>  John
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>  ___
>>> Users mailing 
>>> listUsers@lists.opensips.orghttp://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] Issue in storing Dialog Variables into the Database (Postgresql)

2015-01-06 Thread John Nash
bytea. I am using version 8.4 of postgresql.

On Tue, Jan 6, 2015 at 9:08 PM, Bogdan-Andrei Iancu 
wrote:

>  Hi John,
>
> In the definition of your "dialog" table, the "vars" field has "bytea" or
> "text" type ?
>
> Regards,
>
> Bogdan-Andrei Iancu
> OpenSIPS Founder and Developerhttp://www.opensips-solutions.com
>
> On 28.12.2014 11:37, John Nash wrote:
>
>  One more update
>
>  I just now checked dialog parameter "modparam("dialog",
> "db_flush_vals_profiles", 1)" and used it (Probably i should have used it
> in a first place) after that I get the error when opensips tries to insert
> dialog into the database.
>
> ERROR:db_postgres:db_postgres_submit_query: 0x7f544ad0ec20 PQsendQuery
> Error: ERROR:  invalid byte sequence for encoding "UTF8": 0xe0c79f
> HINT:  This error can also happen if the byte sequence does not match the
> encoding expected by the server, which is controlled by "client_encoding".
>  Query: insert into dialog
> (dlg_id,callid,from_uri,from_tag,to_uri,to_tag,caller_sock,callee_sock,start_time,mangled_from_uri,mangled_to_uri,state,timeout,caller_cseq,callee_cseq,caller_ping_cseq,callee_ping_cseq,flags,vars,profiles,script_flags,module_flags,caller_route_set,callee_route_set,caller_contact,callee_contact
> )
> values (17240765013518,'0a1dc58ac1104d588471e1c898a040bd','
> sip:98116181@192.168.1.5:9092','523d873f92eb40c38a58f90c9474cab9','
> sip:@192.168.1.5:9092
> ','42A53A43-549FC7E3E7B0-778D1700','udp:192.168.1.5:9092','udp:
> 192.168.112.5:9090',1419757544,NULL,NULL,3,1419761144,'0','10580',0,0,16,'accX_created#àÇT','caller#PC_BR3DGE_xyz
> Billing_|',0,0,NULL,NULL,'sip:98116181@103.255.76.231:1100;ob
> ','sip:192.168.112.5:5080;transport=udp')
>
>
> On Fri, Dec 26, 2014 at 1:27 PM, John Nash  wrote:
>
>> no it is bytea. I also tried changing it to text but results are same.
>>
>> On Fri, Dec 26, 2014 at 1:21 PM, Bogdan-Andrei Iancu > > wrote:
>>
>>>  Hi John,
>>>
>>> I see you also open a ticket on this:
>>> https://github.com/OpenSIPS/opensips/issues/398
>>>
>>> I suppose your dialog table does have a reasonable size constrain for
>>> the vars column, right ?
>>>
>>> Regards,
>>>
>>> Bogdan-Andrei Iancu
>>> OpenSIPS Founder and Developerhttp://www.opensips-solutions.com
>>>
>>>  On 22.12.2014 09:27, John Nash wrote:
>>>
>>> I am using Opensips with dialog module and using DB as Postgresql.
>>> I am using modparam("dialog", "db_mode", 1). At the time of dialog creation
>>> I am also setting values to some dialog variables which I can see with mi
>>> fifo commands.
>>>
>>>  My issue is when i run a select query and try to see "vars" column
>>> contents (I set vars column data type as text for simplicity), I do not see
>>> all information stored. It seems to be truncated. I see like below ...
>>>
>>> "accX_table#acc|accX_flags#5 DB_MISSED_FLAG DB_FLAG CDR_FLAG
>>> FAIL_TRANS_FLAG|accX_db# " (There is some special character at the end)
>>>
>>>  On the other hand when i see dialog using mi fifo command I see full
>>> list of variables.
>>>
>>> accX_table:: acc
>>> accX_flags:: 5 DB_MISSED_FLAG DB_FLAG CDR_FLAG FAIL_TRANS_FLAG
>>> accX_db:: \b\x00\x00\x00\x1d\x00sip:test@192.168.7.5:9090$\
>>> x00sip:919811618189@192.168.7.5:9090#\x00sip:11025919811618189@192.168.7.8\x0e\x00192.168.3.1
>>> <http://x00sip:919811618189@192.168.7.5:9090#%5Cx00sip:11025919811618189@192.168.7.8%5Cx0e%5Cx00192.168.3.1>
>>> ?\x00\x00\n\x001419221825
>>> accX_leg:: \x00\x00\x00\x00
>>> accX_core:: \x06\x00INVITE
>>> \x0052a5e031f1fa4a50883cf14fcfb0dfb1"\x007C34DE52-54979B3E000CEDFB-4BCFC700\x00e26faa1c7c654b1dbe6b1d86a12b2e61\x03\x00200\x02\x00OK\b\x00E\x9b\x97T\x00\x00\x00\x00
>>> accX_created:: >\x9b\x97T\x00\x00\x00\x00
>>> caller_IP:: 192.168.3.1
>>> ring_time:: 1419221825
>>>
>>>  Somehow values after accX_db are not being stored into the DB.
>>>
>>>  Any ideas?
>>>
>>>  John
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>  ___
>>> Users mailing 
>>> listUsers@lists.opensips.orghttp://lists.opensips.org/cgi-bin/mailman/listinfo/users
>>>
>>>
>>>
>>
>
>
___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


[OpenSIPS-Users] replace_body function question

2015-01-02 Thread John Nash
Has there been some recent changes to this function? I used this function
in version 1.6 fine but now not seem to be working. I am trying very simple
..

replace_body_all("^s=xyz\r\n","s=abc\r\n");

But it does not work. I tried " strip_body()" and it worked as expected.
___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


Re: [OpenSIPS-Users] [OpenSIPS-Devel] A Happy New Year

2014-12-31 Thread John Nash
Thank you and same to you.

On Wed, Dec 31, 2014 at 10:29 PM, Bogdan-Andrei Iancu 
wrote:

> I wish to all of you A Happy New Year !
>
> And I looking forward for a new exciting year for the OpenSIPS project, a
> year of interesting tasks, important changes and hopefully great results ;).
>
> Best regards,
> Bogdan
>
> --
> Bogdan-Andrei Iancu
> OpenSIPS Founder and Developer
> http://www.opensips-solutions.com
>
>
> ___
> Devel mailing list
> de...@lists.opensips.org
> http://lists.opensips.org/cgi-bin/mailman/listinfo/devel
>
___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


Re: [OpenSIPS-Users] Validate dialog confusion

2014-12-31 Thread John Nash
Or may be should try to match_dialog and then relay

On Wed, Dec 31, 2014 at 5:57 PM, John Nash  wrote:

> OK got it. I also have a situation where I receive BYE from callee which
> has "To" tag but no route header. As per default script this request should
> not be allowed to go further. Would fix_route_dialog(); work or I should
> just relay it?
>
> On Wed, Dec 31, 2014 at 1:37 AM, Bogdan-Andrei Iancu 
> wrote:
>
>>  Hi John,
>>
>> 1) if the request does not match any dialog it will go on the "else"
>> branch where it simply logs the "valid request" - this is a simple example,
>> but the idea is that without dialog state you cannot check if valid or not;
>> and you maybe do not create dialogs for all your calls and maybe not all
>> your sequential request are part of a INVITE dialog (you may have
>> re-SUBSCRIBE or NOTIFYs)
>>
>> 2) the function just fixes, you need to send it out as usual via the
>> t_relay(),
>>
>> Regards,
>>
>> Bogdan-Andrei Iancu
>> OpenSIPS Founder and Developerhttp://www.opensips-solutions.com
>>
>> On 30.12.2014 12:16, John Nash wrote:
>>
>>  I was looking at usage of validate_dialog() and saw the following
>> snippet from module documentation page. If you check the else part... as
>> per my understanding if a dialog is not found ($DLG_status) will be NULL)
>> it will go to else part which indicates a message has To tag but dialog not
>> found. How can it be a valid in-dialog request.
>>
>> if (has_totag()) {
>> loose_route();
>> if ($DLG_status!=NULL && !validate_dialog() ) {
>> xlog(" in-dialog bogus request \n");
>> } else {
>> xlog(" in-dialog valid request - $DLG_dir !\n");
>> }
>> }
>>
>> Also there is one more code
>>
>>if (has_totag()) {
>> loose_route();
>> if ($DLG_status!=NULL)
>> if (!validate_dialog())
>> fix_route_dialog();
>> }
>>
>>
>>  After calling fix_route_dialog() do I need to just relay the message? I
>> mean this function will "fix" the message and send?I was trying to look
>> for some security check where someone can inject a route header and a to
>> tag (Bogus of course) to reach to my gateways through my proxy.
>>
>>
>>
>> ___
>> 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] Validate dialog confusion

2014-12-31 Thread John Nash
OK got it. I also have a situation where I receive BYE from callee which
has "To" tag but no route header. As per default script this request should
not be allowed to go further. Would fix_route_dialog(); work or I should
just relay it?

On Wed, Dec 31, 2014 at 1:37 AM, Bogdan-Andrei Iancu 
wrote:

>  Hi John,
>
> 1) if the request does not match any dialog it will go on the "else"
> branch where it simply logs the "valid request" - this is a simple example,
> but the idea is that without dialog state you cannot check if valid or not;
> and you maybe do not create dialogs for all your calls and maybe not all
> your sequential request are part of a INVITE dialog (you may have
> re-SUBSCRIBE or NOTIFYs)
>
> 2) the function just fixes, you need to send it out as usual via the
> t_relay(),
>
> Regards,
>
> Bogdan-Andrei Iancu
> OpenSIPS Founder and Developerhttp://www.opensips-solutions.com
>
> On 30.12.2014 12:16, John Nash wrote:
>
>  I was looking at usage of validate_dialog() and saw the following
> snippet from module documentation page. If you check the else part... as
> per my understanding if a dialog is not found ($DLG_status) will be NULL)
> it will go to else part which indicates a message has To tag but dialog not
> found. How can it be a valid in-dialog request.
>
> if (has_totag()) {
> loose_route();
> if ($DLG_status!=NULL && !validate_dialog() ) {
> xlog(" in-dialog bogus request \n");
> } else {
> xlog(" in-dialog valid request - $DLG_dir !\n");
> }
> }
>
> Also there is one more code
>
>if (has_totag()) {
> loose_route();
> if ($DLG_status!=NULL)
> if (!validate_dialog())
> fix_route_dialog();
> }
>
>
>  After calling fix_route_dialog() do I need to just relay the message? I
> mean this function will "fix" the message and send?I was trying to look
> for some security check where someone can inject a route header and a to
> tag (Bogus of course) to reach to my gateways through my proxy.
>
>
>
> ___
> 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] Validate dialog confusion

2014-12-30 Thread John Nash
I was looking at usage of validate_dialog() and saw the following snippet
from module documentation page. If you check the else part... as per my
understanding if a dialog is not found ($DLG_status) will be NULL) it will
go to else part which indicates a message has To tag but dialog not found.
How can it be a valid in-dialog request.

if (has_totag()) {
loose_route();
if ($DLG_status!=NULL && !validate_dialog() ) {
xlog(" in-dialog bogus request \n");
} else {
xlog(" in-dialog valid request - $DLG_dir !\n");
}
}

Also there is one more code

   if (has_totag()) {
loose_route();
if ($DLG_status!=NULL)
if (!validate_dialog())
fix_route_dialog();
}


After calling fix_route_dialog() do I need to just relay the message? I
mean this function will "fix" the message and send?I was trying to look
for some security check where someone can inject a route header and a to
tag (Bogus of course) to reach to my gateways through my proxy.
___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


Re: [OpenSIPS-Users] Issue in storing Dialog Variables into the Database (Postgresql)

2014-12-28 Thread John Nash
One more update

I just now checked dialog parameter "modparam("dialog",
"db_flush_vals_profiles", 1)" and used it (Probably i should have used it
in a first place) after that I get the error when opensips tries to insert
dialog into the database.

ERROR:db_postgres:db_postgres_submit_query: 0x7f544ad0ec20 PQsendQuery
Error: ERROR:  invalid byte sequence for encoding "UTF8": 0xe0c79f
HINT:  This error can also happen if the byte sequence does not match the
encoding expected by the server, which is controlled by "client_encoding".
 Query: insert into dialog
(dlg_id,callid,from_uri,from_tag,to_uri,to_tag,caller_sock,callee_sock,start_time,mangled_from_uri,mangled_to_uri,state,timeout,caller_cseq,callee_cseq,caller_ping_cseq,callee_ping_cseq,flags,vars,profiles,script_flags,module_flags,caller_route_set,callee_route_set,caller_contact,callee_contact
)
values (17240765013518,'0a1dc58ac1104d588471e1c898a040bd','
sip:98116181@192.168.1.5:9092','523d873f92eb40c38a58f90c9474cab9','
sip:@192.168.1.5:9092
','42A53A43-549FC7E3E7B0-778D1700','udp:192.168.1.5:9092','udp:
192.168.112.5:9090',1419757544,NULL,NULL,3,1419761144,'0','10580',0,0,16,'accX_created#àÇT','caller#PC_BR3DGE_xyz
Billing_|',0,0,NULL,NULL,'sip:98116181@103.255.76.231:1100
;ob','sip:192.168.112.5:5080;transport=udp')


On Fri, Dec 26, 2014 at 1:27 PM, John Nash  wrote:

> no it is bytea. I also tried changing it to text but results are same.
>
> On Fri, Dec 26, 2014 at 1:21 PM, Bogdan-Andrei Iancu 
> wrote:
>
>>  Hi John,
>>
>> I see you also open a ticket on this:
>> https://github.com/OpenSIPS/opensips/issues/398
>>
>> I suppose your dialog table does have a reasonable size constrain for the
>> vars column, right ?
>>
>> Regards,
>>
>> Bogdan-Andrei Iancu
>> OpenSIPS Founder and Developerhttp://www.opensips-solutions.com
>>
>> On 22.12.2014 09:27, John Nash wrote:
>>
>>I am using Opensips with dialog module and using DB as Postgresql. I
>> am using modparam("dialog", "db_mode", 1). At the time of dialog creation I
>> am also setting values to some dialog variables which I can see with mi
>> fifo commands.
>>
>>  My issue is when i run a select query and try to see "vars" column
>> contents (I set vars column data type as text for simplicity), I do not see
>> all information stored. It seems to be truncated. I see like below ...
>>
>> "accX_table#acc|accX_flags#5 DB_MISSED_FLAG DB_FLAG CDR_FLAG
>> FAIL_TRANS_FLAG|accX_db# " (There is some special character at the end)
>>
>>  On the other hand when i see dialog using mi fifo command I see full
>> list of variables.
>>
>> accX_table:: acc
>> accX_flags:: 5 DB_MISSED_FLAG DB_FLAG CDR_FLAG FAIL_TRANS_FLAG
>> accX_db:: \b\x00\x00\x00\x1d\x00sip:test@192.168.7.5:9090$\
>> x00sip:919811618189@192.168.7.5:9090#\x00sip:11025919811618189@192.168.7.8\x0e\x00192.168.3.1
>> <http://x00sip:919811618189@192.168.7.5:9090#%5Cx00sip:11025919811618189@192.168.7.8%5Cx0e%5Cx00192.168.3.1>
>> ?\x00\x00\n\x001419221825
>> accX_leg:: \x00\x00\x00\x00
>> accX_core:: \x06\x00INVITE
>> \x0052a5e031f1fa4a50883cf14fcfb0dfb1"\x007C34DE52-54979B3E000CEDFB-4BCFC700
>> \x00e26faa1c7c654b1dbe6b1d86a12b2e61\x03\x00200\x02\x00OK\b\x00E\x9b\x97T\x00\x00\x00\x00
>> accX_created:: >\x9b\x97T\x00\x00\x00\x00
>> caller_IP:: 192.168.3.1
>> ring_time:: 1419221825
>>
>>  Somehow values after accX_db are not being stored into the DB.
>>
>>  Any ideas?
>>
>>  John
>>
>>
>>
>>
>>
>>
>>
>>
>> ___
>> 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] New Big int dlg_id of dialog table

2014-12-26 Thread John Nash
ohh..Cool.

On Fri, Dec 26, 2014 at 10:16 PM, Bogdan-Andrei Iancu 
wrote:

>  Hi John,
>
> If you have for a dialog hash= A:B and dlg_id=X, the relation is:
> X = A*2^32 + B
>
> Regards,
>
> Bogdan-Andrei Iancu
> OpenSIPS Founder and Developerhttp://www.opensips-solutions.com
>
> On 26.12.2014 11:06, John Nash wrote:
>
>Hello Bogdan,
>
> Probably I did not explain well. I am using OpenSIPS (1.12.0dev-notls
> (x86_64/linux))
>
>  When dialog is created I see the MI command output as ...
>  opensipsctl fifo dlg_list_ctx
> dialog::  *hash=3028:502141575*
> state:: 4
> user_flags:: 0
> timestart:: 1419578844
> datestart:: 2014-12-26 07:27:24
> timeout:: 1419582444
> dateout:: 2014-12-26 08:27:24
> callid:: a8d3a13820394340b2c6b54867126726
>   and so on
> -
>
>  But in database values are like ..
>  *dlg_id (This column is big int) = 13005663113863*
>  call_id = a8d3a13820394340b2c6b54867126726
>
>  Even all dialog update queries (when i see debug=4) I can see dialog is
> updated using the key dlg_id = 13005663113863 (Big int value) ...I think it
> is very very good to use a big int value for unique dialog ID as DB updates
> will be much faster. But I am unable to find some way to access this dlg_id
> = 13005663113863 in script (I basically want to update dialogs with some
> custom values).
>
>  Am i using the correct code? May be I am using some "under construction"
> works?
>
>  John
>
>
>
>
>
> On Fri, Dec 26, 2014 at 1:45 PM, Bogdan-Andrei Iancu 
> wrote:
>
>>  It is the same value, but in var is kept ad string representation.
>>
>>  Regards,
>> Bogdan
>>
>>
>>  Sent from Samsung Mobile
>>
>>
>>  Original message 
>> From: John Nash
>> Date:26/12/2014 09:59 (GMT+02:00)
>> To: Bogdan-Andrei Iancu
>> Cc: OpenSIPS users mailling list
>> Subject: Re: [OpenSIPS-Users] New Big int dlg_id of dialog table
>>
>> this variable holds a string value for dilog DID but in my table there is
>> a field big int which stores some kind of id
>>
>> On Fri, Dec 26, 2014 at 1:16 PM, Bogdan-Andrei Iancu > > wrote:
>>
>>>  Hi John,
>>>
>>> See the $DLG_did variable from the dialog module:
>>>
>>> http://www.opensips.org/html/docs/modules/1.11.x/dialog.html#id297237
>>>
>>> Regards,
>>>
>>> Bogdan-Andrei Iancu
>>> OpenSIPS Founder and Developerhttp://www.opensips-solutions.com
>>>
>>>  On 26.12.2014 07:10, John Nash wrote:
>>>
>>> I was just wondering if there is any way to get dlg_id value in a script
>>> using some psudo variable. like in earlier versions we had $DLG_did
>>>
>>>
>>>  ___
>>> 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] General Architecture opinion needed

2014-12-26 Thread John Nash
I am trying to make full SBC using mostly opensips components.The call flow
will be like diagram below..
For features like concurrent call limit, call timeout, CDR accounting I
will have to use dialog module in main opensips proxy. For B2bua if I
understand correctly I will have to use another instance. My doubts are ..

1- Since B2bua is dependent on dialog module this architecture will create
dialog twice in shared database (Plan to use real time DB mode for
persistence and display of ongoing calls in real time). Can this redundant
work be avoided?

2- Can concurrent call limit, Session timeout (Prepaid), CDR accounting be
implemented at b2bua instance and leaving proxy free of this burden?



[image: Inline image 1]
___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


Re: [OpenSIPS-Users] New Big int dlg_id of dialog table

2014-12-26 Thread John Nash
Hello Bogdan,

Probably I did not explain well. I am using OpenSIPS (1.12.0dev-notls
(x86_64/linux))

When dialog is created I see the MI command output as ...
 opensipsctl fifo dlg_list_ctx
dialog::  *hash=3028:502141575*
state:: 4
user_flags:: 0
timestart:: 1419578844
datestart:: 2014-12-26 07:27:24
timeout:: 1419582444
dateout:: 2014-12-26 08:27:24
callid:: a8d3a13820394340b2c6b54867126726
 and so on -

But in database values are like ..
*dlg_id (This column is big int) = 13005663113863*
call_id = a8d3a13820394340b2c6b54867126726

Even all dialog update queries (when i see debug=4) I can see dialog is
updated using the key dlg_id = 13005663113863 (Big int value) ...I think it
is very very good to use a big int value for unique dialog ID as DB updates
will be much faster. But I am unable to find some way to access this dlg_id
= 13005663113863 in script (I basically want to update dialogs with some
custom values).

Am i using the correct code? May be I am using some "under construction"
works?

John





On Fri, Dec 26, 2014 at 1:45 PM, Bogdan-Andrei Iancu 
wrote:

> It is the same value, but in var is kept ad string representation.
>
> Regards,
> Bogdan
>
>
> Sent from Samsung Mobile
>
>
> ---- Original message 
> From: John Nash
> Date:26/12/2014 09:59 (GMT+02:00)
> To: Bogdan-Andrei Iancu
> Cc: OpenSIPS users mailling list
> Subject: Re: [OpenSIPS-Users] New Big int dlg_id of dialog table
>
> this variable holds a string value for dilog DID but in my table there is
> a field big int which stores some kind of id
>
> On Fri, Dec 26, 2014 at 1:16 PM, Bogdan-Andrei Iancu 
> wrote:
>
>>  Hi John,
>>
>> See the $DLG_did variable from the dialog module:
>> http://www.opensips.org/html/docs/modules/1.11.x/dialog.html#id297237
>>
>> Regards,
>>
>> Bogdan-Andrei Iancu
>> OpenSIPS Founder and Developerhttp://www.opensips-solutions.com
>>
>> On 26.12.2014 07:10, John Nash wrote:
>>
>> I was just wondering if there is any way to get dlg_id value in a script
>> using some psudo variable. like in earlier versions we had $DLG_did
>>
>>
>> ___
>> 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] New Big int dlg_id of dialog table

2014-12-26 Thread John Nash
this variable holds a string value for dilog DID but in my table there is a
field big int which stores some kind of id

On Fri, Dec 26, 2014 at 1:16 PM, Bogdan-Andrei Iancu 
wrote:

>  Hi John,
>
> See the $DLG_did variable from the dialog module:
> http://www.opensips.org/html/docs/modules/1.11.x/dialog.html#id297237
>
> Regards,
>
> Bogdan-Andrei Iancu
> OpenSIPS Founder and Developerhttp://www.opensips-solutions.com
>
> On 26.12.2014 07:10, John Nash wrote:
>
> I was just wondering if there is any way to get dlg_id value in a script
> using some psudo variable. like in earlier versions we had $DLG_did
>
>
> ___
> 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] Issue in storing Dialog Variables into the Database (Postgresql)

2014-12-25 Thread John Nash
no it is bytea. I also tried changing it to text but results are same.

On Fri, Dec 26, 2014 at 1:21 PM, Bogdan-Andrei Iancu 
wrote:

>  Hi John,
>
> I see you also open a ticket on this:
> https://github.com/OpenSIPS/opensips/issues/398
>
> I suppose your dialog table does have a reasonable size constrain for the
> vars column, right ?
>
> Regards,
>
> Bogdan-Andrei Iancu
> OpenSIPS Founder and Developerhttp://www.opensips-solutions.com
>
> On 22.12.2014 09:27, John Nash wrote:
>
>I am using Opensips with dialog module and using DB as Postgresql. I
> am using modparam("dialog", "db_mode", 1). At the time of dialog creation I
> am also setting values to some dialog variables which I can see with mi
> fifo commands.
>
>  My issue is when i run a select query and try to see "vars" column
> contents (I set vars column data type as text for simplicity), I do not see
> all information stored. It seems to be truncated. I see like below ...
>
> "accX_table#acc|accX_flags#5 DB_MISSED_FLAG DB_FLAG CDR_FLAG
> FAIL_TRANS_FLAG|accX_db# " (There is some special character at the end)
>
>  On the other hand when i see dialog using mi fifo command I see full list
> of variables.
>
> accX_table:: acc
> accX_flags:: 5 DB_MISSED_FLAG DB_FLAG CDR_FLAG FAIL_TRANS_FLAG
> accX_db:: \b\x00\x00\x00\x1d\x00sip:test@192.168.7.5:9090$\
> x00sip:919811618189@192.168.7.5:9090#\x00sip:11025919811618189@192.168.7.8\x0e\x00192.168.3.1
> <http://x00sip:919811618189@192.168.7.5:9090#%5Cx00sip:11025919811618189@192.168.7.8%5Cx0e%5Cx00192.168.3.1>
> ?\x00\x00\n\x001419221825
> accX_leg:: \x00\x00\x00\x00
> accX_core:: \x06\x00INVITE
> \x0052a5e031f1fa4a50883cf14fcfb0dfb1"\x007C34DE52-54979B3E000CEDFB-4BCFC700
> \x00e26faa1c7c654b1dbe6b1d86a12b2e61\x03\x00200\x02\x00OK\b\x00E\x9b\x97T\x00\x00\x00\x00
> accX_created:: >\x9b\x97T\x00\x00\x00\x00
> caller_IP:: 192.168.3.1
> ring_time:: 1419221825
>
>  Somehow values after accX_db are not being stored into the DB.
>
>  Any ideas?
>
>  John
>
>
>
>
>
>
>
>
> ___
> 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] New Big int dlg_id of dialog table

2014-12-25 Thread John Nash
I was just wondering if there is any way to get dlg_id value in a script
using some psudo variable. like in earlier versions we had $DLG_did
___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


[OpenSIPS-Users] Issue in storing Dialog Variables into the Database (Postgresql)

2014-12-21 Thread John Nash
I am using Opensips with dialog module and using DB as Postgresql. I am
using modparam("dialog", "db_mode", 1). At the time of dialog creation I am
also setting values to some dialog variables which I can see with mi fifo
commands.

My issue is when i run a select query and try to see "vars" column contents
(I set vars column data type as text for simplicity), I do not see all
information stored. It seems to be truncated. I see like below ...

"accX_table#acc|accX_flags#5 DB_MISSED_FLAG DB_FLAG CDR_FLAG
FAIL_TRANS_FLAG|accX_db#" (There is some special character at the end)

On the other hand when i see dialog using mi fifo command I see full list
of variables.

accX_table:: acc
accX_flags:: 5 DB_MISSED_FLAG DB_FLAG CDR_FLAG FAIL_TRANS_FLAG
accX_db:: \b\x00\x00\x00\x1d\x00sip:test@192.168.7.5:9090$\
x00sip:919811618189@192.168.7.5:9090#\x00sip:11025919811618189@192.168.7.8\x0e\x00192.168.3.1
?\x00\x00\n\x001419221825
accX_leg:: \x00\x00\x00\x00
accX_core:: \x06\x00INVITE
\x0052a5e031f1fa4a50883cf14fcfb0dfb1"\x007C34DE52-54979B3E000CEDFB-4BCFC700
\x00e26faa1c7c654b1dbe6b1d86a12b2e61\x03\x00200\x02\x00OK\b\x00E\x9b\x97T\x00\x00\x00\x00
accX_created:: >\x9b\x97T\x00\x00\x00\x00
caller_IP:: 192.168.3.1
ring_time:: 1419221825

Somehow values after accX_db are not being stored into the DB.

Any ideas?

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


<    1   2