[OpenSIPS-Users] Opensips not storing dialog information in dbtext

2016-09-22 Thread Husnain Taseer
Dear Users,
I am using opensips 2.2.1 on debian server. dialog table is configured with
dbtext to store information, but there is no information populated by
opensips in dialog file. I have tried almost all the combination of db_mode
for dialog and dbtext module but no luck. My current configuration for
dbtext and dialog module is:


loadmodule "db_text.so"
modparam("db_text", "db_mode",1)

loadmodule "dialog.so"
modparam("dialog", "db_mode", 1)
modparam("dialog", "dlg_match_mode", 1)
modparam("dialog", "default_timeout", 3600)
modparam("dialog", "profiles_with_value", "caller ; callee")
modparam("dialog", "profiles_no_value", "inbound ; outbound")
modparam("dialog", "db_update_period", 10)
modparam("dialog", "db_url", "text:///usr/local/v2Term/etc/opensips/dbtext")

When I make call I can see that dialog has been created which can be shown
using "dlg_list"

*dialog::  hash=1396:1435064472*
*state:: 4*
*user_flags:: 0*
*timestart:: 1474564499*
*datestart:: 2016-09-22 13:14:59*
*timeout:: 1474571700*
*dateout:: 2016-09-22 15:15:00*
*callid:: MDkxZTdlZjRiN2ZkNzQ0NzcxZjU4N2U4NTZmNTZmYzc.*
*from_uri:: sip:1404xx...@xx.xx.xx.xx*
*to_uri:: sip:8977xx...@xx.xx.xx.xx*
*caller_tag:: 2d682d42*
*caller_contact:: sip:1404xxx...@xx.xx.xx:38756*
*callee_cseq:: 0*
*caller_route_set::*
*caller_bind_addr:: udp:xx.xx.xx.xx:5060
*
*caller_sdp::*
*CALLEES::*
*callee::*
*callee_tag:: 15830SIPpTag0110*
*callee_contact::
sip:8977xxx...@xx.xx.xx.xx:5067;transport=UDP*
*caller_cseq:: 1*
*callee_route_set::*
*callee_bind_addr:: udp:xx.xx.xx.xx:5060
*
*callee_sdp::*

But during this ongoing session there isn't any thing in the dialog file
except heading and also the last change time of that file is of yesterday
when it was created. Here are the debug logs related to dialog when call
comes on opensips.


*Sep 22 13:14:59 localhost ./opensips[6258]: DBG:dialog:w_create_dialog2:
bye on timeout activated*
*Sep 22 13:14:59 localhost ./opensips[6258]: DBG:dialog:build_new_dlg: new
dialog 0x7ff790731ab0
(c=MDkxZTdlZjRiN2ZkNzQ0NzcxZjU4N2U4NTZmNTZmYzc.,f=sip:1404xx...@xx.xx.xx.xx,t=sip:8977xx...@xx.xx.xx.xx,ft=2d682d42)
on hash 1396*
*Sep 22 13:14:59 localhost ./opensips[6258]: DBG:dialog:init_leg_info:
route_set , contact sip:1404xx...@xx.xx.xx.xx:38756, cseq 1 and bind_addr
udp:xx.xx.xx.xx:5060*
*Sep 22 13:14:59 localhost ./opensips[6258]: DBG:dialog:dlg_add_leg_info:
set leg 0 for 0x7ff790731ab0: tag=<2d682d42> rcseq=<0>*
*Sep 22 13:14:59 localhost ./opensips[6258]: DBG:dialog:link_dlg: ref dlg
0x7ff790731ab0 with 3 -> 3 in h_entry 0x7ff7906f1280 - 1396*
*Sep 22 13:14:59 localhost ./opensips[6258]: DBG:dialog:link_dlg_profile:
Entered here with hash = 10*
*Sep 22 13:14:59 localhost ./opensips[6258]: DBG:dialog:dlg_onreq: t
hash_index = 17835, t label = 1923053288*
*Sep 22 13:14:59 localhost ./opensips[6258]: DBG:dialog:unref_dlg: unref
dlg 0x7ff790731ab0 with 1 -> 2 in entry 0x7ff7906f1280*
*Sep 22 13:14:59 localhost ./opensips[6257]:
DBG:dialog:push_reply_in_dialog: 0x7ff790731ab0 totag in rpl is
<15830SIPpTag0110> (16)*
*Sep 22 13:14:59 localhost ./opensips[6257]:
DBG:dialog:push_reply_in_dialog: new branch with tag <15830SIPpTag0110>*
*Sep 22 13:14:59 localhost ./opensips[6257]: DBG:dialog:init_leg_info:
route_set , contact , cseq 1 and bind_addr udp:xx.xx.xx.xx:5060*
*Sep 22 13:14:59 localhost ./opensips[6257]: DBG:dialog:dlg_add_leg_info:
set leg 1 for 0x7ff790731ab0: tag=<15830SIPpTag0110> rcseq=<1>*
*Sep 22 13:14:59 localhost ./opensips[6257]:
DBG:dialog:push_reply_in_dialog: Skipping 1 ,0, 0, 1*
*Sep 22 13:14:59 localhost ./opensips[6257]: DBG:dialog:dlg_update_routing:
dialog 0x7ff790731ab0[1]: rr=<>
contact=*
*Sep 22 13:14:59 localhost ./opensips[6257]: DBG:dialog:next_state_dlg:
dialog 0x7ff790731ab0 changed from state 1 to state 3, due event 3*
*Sep 22 13:14:59 localhost ./opensips[6257]: DBG:dialog:dlg_onreply: dialog
0x7ff790731ab0 confirmed*
*Sep 22 13:14:59 localhost ./opensips[6257]:
DBG:dialog:insert_dlg_timer_unsafe: inserting 0x7ff790731af8 for 7883*
*Sep 22 13:14:59 localhost ./opensips[6257]: DBG:dialog:ref_dlg: ref dlg
0x7ff790731ab0 with 1 -> 3*
*Sep 22 13:14:59 localhost ./opensips[6257]:
DBG:dialog:set_final_update_cols: DLG vals and profiles should not be
saved[11b:0]*
*Sep 22 13:14:59 localhost ./opensips[6257]: DBG:db_text:dbt_db_get_table:
cache or mtime succeeded for [dialog]*
*Sep 22 13:14:59 localhost ./opensips[6257]: DBG:dialog:run_dlg_callbacks:
dialog=0x7ff790731ab0, type=8*
*Sep 22 13:15:00 localhost ./opensips[6257]:
DBG:dialog:push_reply_in_dialog: 0x7ff790731ab0 totag in rpl is
<15830SIPpTag0110> (16)*
*Sep 22 

[OpenSIPS-Users] Routing call with an external module

2016-09-22 Thread Alain Bieuzent
Hi all,

 

Actually i route my call with a query on my mysql DB, but now we need to route 
my call but with criteria not store in my DB.

 

My first idea is to write a script with my routing logic, but what is the best 
way to integrate this in opensips (using exec module with a bash or php script 
or using rest_client module, or other module) ?

 

Thanks for your reply 

 

Alain.

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


Re: [OpenSIPS-Users] drouting

2016-09-22 Thread Kirill Galinurov
Ok Bogdan. I'll try

2016-09-20 22:57 GMT+03:00 Bogdan-Andrei Iancu :
> Hi Kirill,
>
> The logs says that a rule was found, but now GW (destination) was selected
> to be used.
>
> I see you checked the status of the GWs, but please check the status of the
> carriers also:
> http://www.opensips.org/html/docs/modules/2.2.x/drouting.html#id296588
>
> Regards,
>
> Bogdan-Andrei Iancu
> OpenSIPS Founder and Developer
> http://www.opensips-solutions.com
>
> On 20.09.2016 15:44, Kirill Galinurov wrote:
>>
>> Hello Bogdan. I try drouting() without any parameters.
>>
>> 2016-09-20 14:20 GMT+03:00 Bogdan-Andrei Iancu :
>>>
>>> Hello Kirill,
>>>
>>> I see the MI command succeeded, right? but the scrip do_routing() fails ?
>>> what are the parameters you pass to do_routing() ?
>>>
>>> Best regards,
>>>
>>> Bogdan-Andrei Iancu
>>> OpenSIPS Founder and Developer
>>> http://www.opensips-solutions.com
>>>
>>>
>>> On 19.09.2016 15:50, Kirill Galinurov wrote:

 Hi all I try to use drouting module.

 Sep 19 17:18:28 [37245] DBG:drouting:do_routing: using dr group 1,
 rule_idx 0, username 79632780099
 Sep 19 17:18:28 [37245] DBG:drouting:internal_check_rt: found rgid 1
 (rule list 0x7fe60616b800)
 Sep 19 17:18:28 [37245] INFO:drouting:do_routing: no destination for
 dr group 1, rule_idx 0, username 79632780099
 L_INFOdo_routing: No rules matching the URI
 In dr_rules
ruleid | groupid | prefix | timerec | priority | routeid | gwlist |
 attrs |  description


 +-++-+--+-++---+
0 | 1   | 7  | |1 | | #cr1   |
  | outgoing calls

 dr_carriers
id | carrierid | gwlist | flags | state | attrs | description
 +---++---+---+---+-
1 | cr1   | gw1;   | 0 | 2 | 0x2   | OUT

 dr_gateways
id | gwid | type |  address  | strip | pri_prefix | attrs |
 probe_mode | state | socket  | description


 +--+--+---+---++---++---+-+-
1 | gw1  |1 | sip:out_voip.ru | 0 ||   |
   0 | 0 | udp:XX.XX.XX.XX:5060 | out

 opensipsctl fifo dr_gw_status
 ID:: gw1 IP=XX.XXX.XXX.XX State=Active

 [root@sbc-msk opensips]# opensipsctl fifo dr_number_routing 1
 79182220222
 Matched Prefix:: 7.
 What is wrong?

 ___
 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 save avp-values to singal attribute name in cache_store?

2016-09-22 Thread xiaofeng
On Thu, Sep 22, 2016 at 1:08 AM,  wrote:
>
> You could probably also built a JSON array from looping through the avp
and store that as the value in the cache store.

Does that mean I need the json module? I didn't include the json module,
maybe I can try it the next time.

Regards,

xiaofeng

___
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