drouting module - dr_gateways table attrs field

classic Classic list List threaded Threaded
13 messages Options
Reply | Threaded
Open this post in threaded view
|

drouting module - dr_gateways table attrs field

itunali
Hello,

I'm playing with the new module drouting on svn trunk and i need to
get "which gateway is used on last request". I might be able to get it
with "attrs_avp" and "attrs" field on dr_gateways table, i guess. I
try some values to attrs but opensips crashed.

Could you give an example to use attrs_avp and what is the value
format of "attrs" fields.

Regards,

Ibrahim TUNALI

_______________________________________________
Users mailing list
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users
Reply | Threaded
Open this post in threaded view
|

Re: drouting module - dr_gateways table attrs field

Bogdan-Andrei Iancu
Hi Ibrahim,

have you set the attr avp? Something like:
    modparam("drouting", "attrs_avp", '$avp(s:dr_attrs)')

Then after do_routing() or use_next_gw(), do :
   xlog("-----gw attr is $avp(s:dr_attrs)\n");

the value of the attr is whatever you want - the module does not interpret it - it is just reading it from DB and pass it to the AVP when you use the GW. It is your decision what to put there and how to use the value.


Regards,
Bogdan

ibrahim tunali wrote:

> Hello,
>
> I'm playing with the new module drouting on svn trunk and i need to
> get "which gateway is used on last request". I might be able to get it
> with "attrs_avp" and "attrs" field on dr_gateways table, i guess. I
> try some values to attrs but opensips crashed.
>
> Could you give an example to use attrs_avp and what is the value
> format of "attrs" fields.
>
> Regards,
>
> Ibrahim TUNALI
>
> _______________________________________________
> Users mailing list
> [hidden email]
> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>
>  


_______________________________________________
Users mailing list
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users
Reply | Threaded
Open this post in threaded view
|

Re: drouting module - dr_gateways table attrs field

itunali
Hi Bogdan,

I have already set attr avp like you sent. The problem occured when
fill the attr field. If I leave blank attr field in DB it starts but
when i set something like "gw1" it crashed.

My db row;

+------+------+-------------------+-------+------------+-------+-------------+
| gwid | type | address           | strip | pri_prefix | attrs | description |
+------+------+-------------------+-------+------------+-------+-------------+
|    1 |    1 | XX.XX.XXX.XX:XXXX |     0 | NULL       | gw1   | main GW     |
+------+------+-------------------+-------+------------+-------+-------------+

Crash dump;

/usr/sbin/opensips[10261]: DBG:db_mysql:db_mysql_get_columns: 6
columns returned from the query
/usr/sbin/opensips[10261]: DBG:core:db_allocate_columns: allocate 48
bytes for result names at 0x76a570
/usr/sbin/opensips[10261]: DBG:core:db_allocate_columns: allocate 24
bytes for result types at 0x76a5b0
/usr/sbin/opensips[10261]: DBG:db_mysql:db_mysql_get_columns: allocate
16 bytes for RES_NAMES[0] at 0x76a5d8
/usr/sbin/opensips[10261]: DBG:db_mysql:db_mysql_get_columns:
RES_NAMES(0x76a5d8)[0]=[gwid]
/usr/sbin/opensips[10261]: DBG:db_mysql:db_mysql_get_columns: use
DB_INT result type
/usr/sbin/opensips[10261]: DBG:db_mysql:db_mysql_get_columns: allocate
16 bytes for RES_NAMES[1] at 0x76a5f8
/usr/sbin/opensips[10261]: DBG:db_mysql:db_mysql_get_columns:
RES_NAMES(0x76a5f8)[1]=[address]
/usr/sbin/opensips[10261]: DBG:db_mysql:db_mysql_get_columns: use
DB_STRING result type
/usr/sbin/opensips[10261]: DBG:db_mysql:db_mysql_get_columns: allocate
16 bytes for RES_NAMES[2] at 0x76a618
/usr/sbin/opensips[10261]: DBG:db_mysql:db_mysql_get_columns:
RES_NAMES(0x76a618)[2]=[strip]
/usr/sbin/opensips[10261]: DBG:db_mysql:db_mysql_get_columns: use
DB_INT result type
/usr/sbin/opensips[10261]: DBG:db_mysql:db_mysql_get_columns: allocate
16 bytes for RES_NAMES[3] at 0x76a638
/usr/sbin/opensips[10261]: DBG:db_mysql:db_mysql_get_columns:
RES_NAMES(0x76a638)[3]=[pri_prefix]
/usr/sbin/opensips[10261]: DBG:db_mysql:db_mysql_get_columns: use
DB_STRING result type
/usr/sbin/opensips[10261]: DBG:db_mysql:db_mysql_get_columns: allocate
16 bytes for RES_NAMES[4] at 0x76a658
/usr/sbin/opensips[10261]: DBG:db_mysql:db_mysql_get_columns:
RES_NAMES(0x76a658)[4]=[type]
/usr/sbin/opensips[10261]: DBG:db_mysql:db_mysql_get_columns: use
DB_INT result type
/usr/sbin/opensips[10261]: DBG:db_mysql:db_mysql_get_columns: allocate
16 bytes for RES_NAMES[5] at 0x76a678
/usr/sbin/opensips[10261]: DBG:db_mysql:db_mysql_get_columns:
RES_NAMES(0x76a678)[5]=[attrs]
/usr/sbin/opensips[10261]: DBG:db_mysql:db_mysql_get_columns: use
DB_STRING result type
/usr/sbin/opensips[10261]: DBG:db_mysql:db_mysql_fetch_result:
converting row 0 of 1 count 1
/usr/sbin/opensips[10261]: DBG:db_mysql:db_mysql_convert_row: allocate
192 bytes for row values at 0x76a6b8
/usr/sbin/opensips[10261]: DBG:db_mysql:db_mysql_str2val: converting INT [1]
/usr/sbin/opensips[10261]: DBG:db_mysql:db_mysql_str2val: converting
STRING [69.XX.XXX.55:XXXX]
/usr/sbin/opensips[10261]: DBG:db_mysql:db_mysql_str2val: converting INT [0]
/usr/sbin/opensips[10261]: DBG:db_mysql:db_mysql_str2val: converting INT [1]
/usr/sbin/opensips[10261]: DBG:db_mysql:db_mysql_str2val: converting
STRING [gw1]
/usr/sbin/opensips[10261]: DBG:drouting:dr_load_routing_info: 1
records found in dr_gateways
/usr/sbin/opensips[10261]: DBG:drouting:add_dst: new gw ip addr
[69.XX.XXX.55:XXXX]
/usr/sbin/opensips[10249]: INFO:core:handle_sigs: child process 10261
exited by a signal 11
/usr/sbin/opensips[10267]: DBG:core:init_mod_child: type=CHILD,
rank=4, module=registrar
/usr/sbin/opensips[10249]: INFO:core:handle_sigs: core was not generated
/usr/sbin/opensips[10267]: DBG:core:init_mod_child: type=CHILD,
rank=4, module=group
/usr/sbin/opensips[10249]: INFO:core:handle_sigs: terminating due to SIGCHLD
/usr/sbin/opensips[10267]: INFO:core:sig_usr: signal 15 received
/usr/sbin/opensips[10267]: Memory status (pkg):
/usr/sbin/opensips[10273]: INFO:core:sig_usr: signal 15 received
/usr/sbin/opensips[10273]: Memory status (pkg):
/usr/sbin/opensips[10267]: fm_status (0x72bbe0):

Regards,

Ibrahim TUNALI


On Thu, Jan 22, 2009 at 17:20, Bogdan-Andrei Iancu
<[hidden email]> wrote:

>
> Hi Ibrahim,
>
> have you set the attr avp? Something like:
>   modparam("drouting", "attrs_avp", '$avp(s:dr_attrs)')
>
> Then after do_routing() or use_next_gw(), do :
>  xlog("-----gw attr is $avp(s:dr_attrs)\n");
>
> the value of the attr is whatever you want - the module does not interpret it - it is just reading it from DB and pass it to the AVP when you use the GW. It is your decision what to put there and how to use the value.
>
>
> Regards,
> Bogdan
>
> ibrahim tunali wrote:
>>
>> Hello,
>>
>> I'm playing with the new module drouting on svn trunk and i need to
>> get "which gateway is used on last request". I might be able to get it
>> with "attrs_avp" and "attrs" field on dr_gateways table, i guess. I
>> try some values to attrs but opensips crashed.
>>
>> Could you give an example to use attrs_avp and what is the value
>> format of "attrs" fields.
>>
>> Regards,
>>
>> Ibrahim TUNALI
>>
>> _______________________________________________
>> Users mailing list
>> [hidden email]
>> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>>
>>
>

_______________________________________________
Users mailing list
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users
Reply | Threaded
Open this post in threaded view
|

Re: drouting module - dr_gateways table attrs field

Bogdan-Andrei Iancu
Hi Ibrahim,

I found a bug related to what you described - I made a fix on SVN -
please update and test again.

Thanks and regards,
Bogdan

ibrahim tunali wrote:

> Hi Bogdan,
>
> I have already set attr avp like you sent. The problem occured when
> fill the attr field. If I leave blank attr field in DB it starts but
> when i set something like "gw1" it crashed.
>
> My db row;
>
> +------+------+-------------------+-------+------------+-------+-------------+
> | gwid | type | address           | strip | pri_prefix | attrs | description |
> +------+------+-------------------+-------+------------+-------+-------------+
> |    1 |    1 | XX.XX.XXX.XX:XXXX |     0 | NULL       | gw1   | main GW     |
> +------+------+-------------------+-------+------------+-------+-------------+
>
> Crash dump;
>
> /usr/sbin/opensips[10261]: DBG:db_mysql:db_mysql_get_columns: 6
> columns returned from the query
> /usr/sbin/opensips[10261]: DBG:core:db_allocate_columns: allocate 48
> bytes for result names at 0x76a570
> /usr/sbin/opensips[10261]: DBG:core:db_allocate_columns: allocate 24
> bytes for result types at 0x76a5b0
> /usr/sbin/opensips[10261]: DBG:db_mysql:db_mysql_get_columns: allocate
> 16 bytes for RES_NAMES[0] at 0x76a5d8
> /usr/sbin/opensips[10261]: DBG:db_mysql:db_mysql_get_columns:
> RES_NAMES(0x76a5d8)[0]=[gwid]
> /usr/sbin/opensips[10261]: DBG:db_mysql:db_mysql_get_columns: use
> DB_INT result type
> /usr/sbin/opensips[10261]: DBG:db_mysql:db_mysql_get_columns: allocate
> 16 bytes for RES_NAMES[1] at 0x76a5f8
> /usr/sbin/opensips[10261]: DBG:db_mysql:db_mysql_get_columns:
> RES_NAMES(0x76a5f8)[1]=[address]
> /usr/sbin/opensips[10261]: DBG:db_mysql:db_mysql_get_columns: use
> DB_STRING result type
> /usr/sbin/opensips[10261]: DBG:db_mysql:db_mysql_get_columns: allocate
> 16 bytes for RES_NAMES[2] at 0x76a618
> /usr/sbin/opensips[10261]: DBG:db_mysql:db_mysql_get_columns:
> RES_NAMES(0x76a618)[2]=[strip]
> /usr/sbin/opensips[10261]: DBG:db_mysql:db_mysql_get_columns: use
> DB_INT result type
> /usr/sbin/opensips[10261]: DBG:db_mysql:db_mysql_get_columns: allocate
> 16 bytes for RES_NAMES[3] at 0x76a638
> /usr/sbin/opensips[10261]: DBG:db_mysql:db_mysql_get_columns:
> RES_NAMES(0x76a638)[3]=[pri_prefix]
> /usr/sbin/opensips[10261]: DBG:db_mysql:db_mysql_get_columns: use
> DB_STRING result type
> /usr/sbin/opensips[10261]: DBG:db_mysql:db_mysql_get_columns: allocate
> 16 bytes for RES_NAMES[4] at 0x76a658
> /usr/sbin/opensips[10261]: DBG:db_mysql:db_mysql_get_columns:
> RES_NAMES(0x76a658)[4]=[type]
> /usr/sbin/opensips[10261]: DBG:db_mysql:db_mysql_get_columns: use
> DB_INT result type
> /usr/sbin/opensips[10261]: DBG:db_mysql:db_mysql_get_columns: allocate
> 16 bytes for RES_NAMES[5] at 0x76a678
> /usr/sbin/opensips[10261]: DBG:db_mysql:db_mysql_get_columns:
> RES_NAMES(0x76a678)[5]=[attrs]
> /usr/sbin/opensips[10261]: DBG:db_mysql:db_mysql_get_columns: use
> DB_STRING result type
> /usr/sbin/opensips[10261]: DBG:db_mysql:db_mysql_fetch_result:
> converting row 0 of 1 count 1
> /usr/sbin/opensips[10261]: DBG:db_mysql:db_mysql_convert_row: allocate
> 192 bytes for row values at 0x76a6b8
> /usr/sbin/opensips[10261]: DBG:db_mysql:db_mysql_str2val: converting INT [1]
> /usr/sbin/opensips[10261]: DBG:db_mysql:db_mysql_str2val: converting
> STRING [69.XX.XXX.55:XXXX]
> /usr/sbin/opensips[10261]: DBG:db_mysql:db_mysql_str2val: converting INT [0]
> /usr/sbin/opensips[10261]: DBG:db_mysql:db_mysql_str2val: converting INT [1]
> /usr/sbin/opensips[10261]: DBG:db_mysql:db_mysql_str2val: converting
> STRING [gw1]
> /usr/sbin/opensips[10261]: DBG:drouting:dr_load_routing_info: 1
> records found in dr_gateways
> /usr/sbin/opensips[10261]: DBG:drouting:add_dst: new gw ip addr
> [69.XX.XXX.55:XXXX]
> /usr/sbin/opensips[10249]: INFO:core:handle_sigs: child process 10261
> exited by a signal 11
> /usr/sbin/opensips[10267]: DBG:core:init_mod_child: type=CHILD,
> rank=4, module=registrar
> /usr/sbin/opensips[10249]: INFO:core:handle_sigs: core was not generated
> /usr/sbin/opensips[10267]: DBG:core:init_mod_child: type=CHILD,
> rank=4, module=group
> /usr/sbin/opensips[10249]: INFO:core:handle_sigs: terminating due to SIGCHLD
> /usr/sbin/opensips[10267]: INFO:core:sig_usr: signal 15 received
> /usr/sbin/opensips[10267]: Memory status (pkg):
> /usr/sbin/opensips[10273]: INFO:core:sig_usr: signal 15 received
> /usr/sbin/opensips[10273]: Memory status (pkg):
> /usr/sbin/opensips[10267]: fm_status (0x72bbe0):
>
> Regards,
>
> Ibrahim TUNALI
>
>
> On Thu, Jan 22, 2009 at 17:20, Bogdan-Andrei Iancu
> <[hidden email]> wrote:
>  
>> Hi Ibrahim,
>>
>> have you set the attr avp? Something like:
>>   modparam("drouting", "attrs_avp", '$avp(s:dr_attrs)')
>>
>> Then after do_routing() or use_next_gw(), do :
>>  xlog("-----gw attr is $avp(s:dr_attrs)\n");
>>
>> the value of the attr is whatever you want - the module does not interpret it - it is just reading it from DB and pass it to the AVP when you use the GW. It is your decision what to put there and how to use the value.
>>
>>
>> Regards,
>> Bogdan
>>
>> ibrahim tunali wrote:
>>    
>>> Hello,
>>>
>>> I'm playing with the new module drouting on svn trunk and i need to
>>> get "which gateway is used on last request". I might be able to get it
>>> with "attrs_avp" and "attrs" field on dr_gateways table, i guess. I
>>> try some values to attrs but opensips crashed.
>>>
>>> Could you give an example to use attrs_avp and what is the value
>>> format of "attrs" fields.
>>>
>>> Regards,
>>>
>>> Ibrahim TUNALI
>>>
>>> _______________________________________________
>>> Users mailing list
>>> [hidden email]
>>> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>>>
>>>
>>>      
>
>  


_______________________________________________
Users mailing list
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users
Reply | Threaded
Open this post in threaded view
|

Re: drouting module - dr_gateways table attrs field

itunali
Hi Bogdan,

I tried now and opensips started without the problem. But i did not
get the value after calling "do_routing()".

I see NULL value on output of xlog;

"PSTN Termination RURI:9XXXXXXXXXX USER:XXXXXXX DOMAIN:sip.xxxxx.com
CARRIER:<null>"

     if(!do_routing()){
                xlog("L_WARN","No drouting found");
                sl_send_reply("404","PSTN Routing not found");
                exit;
     }
     xlog("PSTN Termination RURI:$rU USER:$au DOMAIN:$ar
CARRIER:$avp(s:dr_attrs)\n");

Best Regards,

Ibrahim TUNALI



On Thu, Jan 22, 2009 at 17:57, Bogdan-Andrei Iancu
<[hidden email]> wrote:
> Hi Ibrahim,
>
> I found a bug related to what you described - I made a fix on SVN - please
> update and test again.
>
> Thanks and regards,
> Bogdan
>

_______________________________________________
Users mailing list
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users
Reply | Threaded
Open this post in threaded view
|

Re: drouting module - dr_gateways table attrs field

Brett Nemeroff
In reply to this post by itunali
Is there not a way to store in an AVP the gateway that was used in the call? I have this need as well..
-Brett


On Thu, Jan 22, 2009 at 9:44 AM, ibrahim tunali <[hidden email]> wrote:
Hi Bogdan,

I have already set attr avp like you sent. The problem occured when
fill the attr field. If I leave blank attr field in DB it starts but
when i set something like "gw1" it crashed.

My db row;

+------+------+-------------------+-------+------------+-------+-------------+
| gwid | type | address           | strip | pri_prefix | attrs | description |
+------+------+-------------------+-------+------------+-------+-------------+
|    1 |    1 | XX.XX.XXX.XX:XXXX |     0 | NULL       | gw1   | main GW     |
+------+------+-------------------+-------+------------+-------+-------------+

Crash dump;

/usr/sbin/opensips[10261]: DBG:db_mysql:db_mysql_get_columns: 6
columns returned from the query
/usr/sbin/opensips[10261]: DBG:core:db_allocate_columns: allocate 48
bytes for result names at 0x76a570
/usr/sbin/opensips[10261]: DBG:core:db_allocate_columns: allocate 24
bytes for result types at 0x76a5b0
/usr/sbin/opensips[10261]: DBG:db_mysql:db_mysql_get_columns: allocate
16 bytes for RES_NAMES[0] at 0x76a5d8
/usr/sbin/opensips[10261]: DBG:db_mysql:db_mysql_get_columns:
RES_NAMES(0x76a5d8)[0]=[gwid]
/usr/sbin/opensips[10261]: DBG:db_mysql:db_mysql_get_columns: use
DB_INT result type
/usr/sbin/opensips[10261]: DBG:db_mysql:db_mysql_get_columns: allocate
16 bytes for RES_NAMES[1] at 0x76a5f8
/usr/sbin/opensips[10261]: DBG:db_mysql:db_mysql_get_columns:
RES_NAMES(0x76a5f8)[1]=[address]
/usr/sbin/opensips[10261]: DBG:db_mysql:db_mysql_get_columns: use
DB_STRING result type
/usr/sbin/opensips[10261]: DBG:db_mysql:db_mysql_get_columns: allocate
16 bytes for RES_NAMES[2] at 0x76a618
/usr/sbin/opensips[10261]: DBG:db_mysql:db_mysql_get_columns:
RES_NAMES(0x76a618)[2]=[strip]
/usr/sbin/opensips[10261]: DBG:db_mysql:db_mysql_get_columns: use
DB_INT result type
/usr/sbin/opensips[10261]: DBG:db_mysql:db_mysql_get_columns: allocate
16 bytes for RES_NAMES[3] at 0x76a638
/usr/sbin/opensips[10261]: DBG:db_mysql:db_mysql_get_columns:
RES_NAMES(0x76a638)[3]=[pri_prefix]
/usr/sbin/opensips[10261]: DBG:db_mysql:db_mysql_get_columns: use
DB_STRING result type
/usr/sbin/opensips[10261]: DBG:db_mysql:db_mysql_get_columns: allocate
16 bytes for RES_NAMES[4] at 0x76a658
/usr/sbin/opensips[10261]: DBG:db_mysql:db_mysql_get_columns:
RES_NAMES(0x76a658)[4]=[type]
/usr/sbin/opensips[10261]: DBG:db_mysql:db_mysql_get_columns: use
DB_INT result type
/usr/sbin/opensips[10261]: DBG:db_mysql:db_mysql_get_columns: allocate
16 bytes for RES_NAMES[5] at 0x76a678
/usr/sbin/opensips[10261]: DBG:db_mysql:db_mysql_get_columns:
RES_NAMES(0x76a678)[5]=[attrs]
/usr/sbin/opensips[10261]: DBG:db_mysql:db_mysql_get_columns: use
DB_STRING result type
/usr/sbin/opensips[10261]: DBG:db_mysql:db_mysql_fetch_result:
converting row 0 of 1 count 1
/usr/sbin/opensips[10261]: DBG:db_mysql:db_mysql_convert_row: allocate
192 bytes for row values at 0x76a6b8
/usr/sbin/opensips[10261]: DBG:db_mysql:db_mysql_str2val: converting INT [1]
/usr/sbin/opensips[10261]: DBG:db_mysql:db_mysql_str2val: converting
STRING [69.XX.XXX.55:XXXX]
/usr/sbin/opensips[10261]: DBG:db_mysql:db_mysql_str2val: converting INT [0]
/usr/sbin/opensips[10261]: DBG:db_mysql:db_mysql_str2val: converting INT [1]
/usr/sbin/opensips[10261]: DBG:db_mysql:db_mysql_str2val: converting
STRING [gw1]
/usr/sbin/opensips[10261]: DBG:drouting:dr_load_routing_info: 1
records found in dr_gateways
/usr/sbin/opensips[10261]: DBG:drouting:add_dst: new gw ip addr
[69.XX.XXX.55:XXXX]
/usr/sbin/opensips[10249]: INFO:core:handle_sigs: child process 10261
exited by a signal 11
/usr/sbin/opensips[10267]: DBG:core:init_mod_child: type=CHILD,
rank=4, module=registrar
/usr/sbin/opensips[10249]: INFO:core:handle_sigs: core was not generated
/usr/sbin/opensips[10267]: DBG:core:init_mod_child: type=CHILD,
rank=4, module=group
/usr/sbin/opensips[10249]: INFO:core:handle_sigs: terminating due to SIGCHLD
/usr/sbin/opensips[10267]: INFO:core:sig_usr: signal 15 received
/usr/sbin/opensips[10267]: Memory status (pkg):
/usr/sbin/opensips[10273]: INFO:core:sig_usr: signal 15 received
/usr/sbin/opensips[10273]: Memory status (pkg):
/usr/sbin/opensips[10267]: fm_status (0x72bbe0):

Regards,

Ibrahim TUNALI


On Thu, Jan 22, 2009 at 17:20, Bogdan-Andrei Iancu
<[hidden email]> wrote:
>
> Hi Ibrahim,
>
> have you set the attr avp? Something like:
>   modparam("drouting", "attrs_avp", '$avp(s:dr_attrs)')
>
> Then after do_routing() or use_next_gw(), do :
>  xlog("-----gw attr is $avp(s:dr_attrs)\n");
>
> the value of the attr is whatever you want - the module does not interpret it - it is just reading it from DB and pass it to the AVP when you use the GW. It is your decision what to put there and how to use the value.
>
>
> Regards,
> Bogdan
>
> ibrahim tunali wrote:
>>
>> Hello,
>>
>> I'm playing with the new module drouting on svn trunk and i need to
>> get "which gateway is used on last request". I might be able to get it
>> with "attrs_avp" and "attrs" field on dr_gateways table, i guess. I
>> try some values to attrs but opensips crashed.
>>
>> Could you give an example to use attrs_avp and what is the value
>> format of "attrs" fields.
>>
>> Regards,
>>
>> Ibrahim TUNALI
>>
>> _______________________________________________
>> Users mailing list
>> [hidden email]
>> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>>
>>
>

_______________________________________________
Users mailing list
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


_______________________________________________
Users mailing list
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users
Reply | Threaded
Open this post in threaded view
|

Re: drouting module - dr_gateways table attrs field

Bogdan-Andrei Iancu
In reply to this post by itunali
Hi Ibrahim,

Thanks for report - fixed on the SVN (again, typo issues :( ) - please
update and give another try.

Regards,
Bogdan

ibrahim tunali wrote:

> Hi Bogdan,
>
> I tried now and opensips started without the problem. But i did not
> get the value after calling "do_routing()".
>
> I see NULL value on output of xlog;
>
> "PSTN Termination RURI:9XXXXXXXXXX USER:XXXXXXX DOMAIN:sip.xxxxx.com
> CARRIER:<null>"
>
>      if(!do_routing()){
>                 xlog("L_WARN","No drouting found");
>                 sl_send_reply("404","PSTN Routing not found");
>                 exit;
>      }
>      xlog("PSTN Termination RURI:$rU USER:$au DOMAIN:$ar
> CARRIER:$avp(s:dr_attrs)\n");
>
> Best Regards,
>
> Ibrahim TUNALI
>
>
>
> On Thu, Jan 22, 2009 at 17:57, Bogdan-Andrei Iancu
> <[hidden email]> wrote:
>  
>> Hi Ibrahim,
>>
>> I found a bug related to what you described - I made a fix on SVN - please
>> update and test again.
>>
>> Thanks and regards,
>> Bogdan
>>
>>    
>
>  



_______________________________________________
Users mailing list
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users
Reply | Threaded
Open this post in threaded view
|

Re: drouting module - dr_gateways table attrs field

Bogdan-Andrei Iancu
In reply to this post by Brett Nemeroff
Hi Brett,

but you have the GW IP (that was used) already in the RURI...or ?

Regards,
Bogdan

Brett Nemeroff wrote:

> Is there not a way to store in an AVP the gateway that was used in the
> call? I have this need as well..
> -Brett
>
>
> On Thu, Jan 22, 2009 at 9:44 AM, ibrahim tunali
> <[hidden email] <mailto:[hidden email]>> wrote:
>
>     Hi Bogdan,
>
>     I have already set attr avp like you sent. The problem occured when
>     fill the attr field. If I leave blank attr field in DB it starts but
>     when i set something like "gw1" it crashed.
>
>     My db row;
>
>     +------+------+-------------------+-------+------------+-------+-------------+
>     | gwid | type | address           | strip | pri_prefix | attrs |
>     description |
>     +------+------+-------------------+-------+------------+-------+-------------+
>     |    1 |    1 | XX.XX.XXX.XX:XXXX |     0 | NULL       | gw1   |
>     main GW     |
>     +------+------+-------------------+-------+------------+-------+-------------+
>
>     Crash dump;
>
>     /usr/sbin/opensips[10261]: DBG:db_mysql:db_mysql_get_columns: 6
>     columns returned from the query
>     /usr/sbin/opensips[10261]: DBG:core:db_allocate_columns: allocate 48
>     bytes for result names at 0x76a570
>     /usr/sbin/opensips[10261]: DBG:core:db_allocate_columns: allocate 24
>     bytes for result types at 0x76a5b0
>     /usr/sbin/opensips[10261]: DBG:db_mysql:db_mysql_get_columns: allocate
>     16 bytes for RES_NAMES[0] at 0x76a5d8
>     /usr/sbin/opensips[10261]: DBG:db_mysql:db_mysql_get_columns:
>     RES_NAMES(0x76a5d8)[0]=[gwid]
>     /usr/sbin/opensips[10261]: DBG:db_mysql:db_mysql_get_columns: use
>     DB_INT result type
>     /usr/sbin/opensips[10261]: DBG:db_mysql:db_mysql_get_columns: allocate
>     16 bytes for RES_NAMES[1] at 0x76a5f8
>     /usr/sbin/opensips[10261]: DBG:db_mysql:db_mysql_get_columns:
>     RES_NAMES(0x76a5f8)[1]=[address]
>     /usr/sbin/opensips[10261]: DBG:db_mysql:db_mysql_get_columns: use
>     DB_STRING result type
>     /usr/sbin/opensips[10261]: DBG:db_mysql:db_mysql_get_columns: allocate
>     16 bytes for RES_NAMES[2] at 0x76a618
>     /usr/sbin/opensips[10261]: DBG:db_mysql:db_mysql_get_columns:
>     RES_NAMES(0x76a618)[2]=[strip]
>     /usr/sbin/opensips[10261]: DBG:db_mysql:db_mysql_get_columns: use
>     DB_INT result type
>     /usr/sbin/opensips[10261]: DBG:db_mysql:db_mysql_get_columns: allocate
>     16 bytes for RES_NAMES[3] at 0x76a638
>     /usr/sbin/opensips[10261]: DBG:db_mysql:db_mysql_get_columns:
>     RES_NAMES(0x76a638)[3]=[pri_prefix]
>     /usr/sbin/opensips[10261]: DBG:db_mysql:db_mysql_get_columns: use
>     DB_STRING result type
>     /usr/sbin/opensips[10261]: DBG:db_mysql:db_mysql_get_columns: allocate
>     16 bytes for RES_NAMES[4] at 0x76a658
>     /usr/sbin/opensips[10261]: DBG:db_mysql:db_mysql_get_columns:
>     RES_NAMES(0x76a658)[4]=[type]
>     /usr/sbin/opensips[10261]: DBG:db_mysql:db_mysql_get_columns: use
>     DB_INT result type
>     /usr/sbin/opensips[10261]: DBG:db_mysql:db_mysql_get_columns: allocate
>     16 bytes for RES_NAMES[5] at 0x76a678
>     /usr/sbin/opensips[10261]: DBG:db_mysql:db_mysql_get_columns:
>     RES_NAMES(0x76a678)[5]=[attrs]
>     /usr/sbin/opensips[10261]: DBG:db_mysql:db_mysql_get_columns: use
>     DB_STRING result type
>     /usr/sbin/opensips[10261]: DBG:db_mysql:db_mysql_fetch_result:
>     converting row 0 of 1 count 1
>     /usr/sbin/opensips[10261]: DBG:db_mysql:db_mysql_convert_row: allocate
>     192 bytes for row values at 0x76a6b8
>     /usr/sbin/opensips[10261]: DBG:db_mysql:db_mysql_str2val:
>     converting INT [1]
>     /usr/sbin/opensips[10261]: DBG:db_mysql:db_mysql_str2val: converting
>     STRING [69.XX.XXX.55:XXXX]
>     /usr/sbin/opensips[10261]: DBG:db_mysql:db_mysql_str2val:
>     converting INT [0]
>     /usr/sbin/opensips[10261]: DBG:db_mysql:db_mysql_str2val:
>     converting INT [1]
>     /usr/sbin/opensips[10261]: DBG:db_mysql:db_mysql_str2val: converting
>     STRING [gw1]
>     /usr/sbin/opensips[10261]: DBG:drouting:dr_load_routing_info: 1
>     records found in dr_gateways
>     /usr/sbin/opensips[10261]: DBG:drouting:add_dst: new gw ip addr
>     [69.XX.XXX.55:XXXX]
>     /usr/sbin/opensips[10249]: INFO:core:handle_sigs: child process 10261
>     exited by a signal 11
>     /usr/sbin/opensips[10267]: DBG:core:init_mod_child: type=CHILD,
>     rank=4, module=registrar
>     /usr/sbin/opensips[10249]: INFO:core:handle_sigs: core was not
>     generated
>     /usr/sbin/opensips[10267]: DBG:core:init_mod_child: type=CHILD,
>     rank=4, module=group
>     /usr/sbin/opensips[10249]: INFO:core:handle_sigs: terminating due
>     to SIGCHLD
>     /usr/sbin/opensips[10267]: INFO:core:sig_usr: signal 15 received
>     /usr/sbin/opensips[10267]: Memory status (pkg):
>     /usr/sbin/opensips[10273]: INFO:core:sig_usr: signal 15 received
>     /usr/sbin/opensips[10273]: Memory status (pkg):
>     /usr/sbin/opensips[10267]: fm_status (0x72bbe0):
>
>     Regards,
>
>     Ibrahim TUNALI
>
>
>     On Thu, Jan 22, 2009 at 17:20, Bogdan-Andrei Iancu
>     <[hidden email] <mailto:[hidden email]>> wrote:
>     >
>     > Hi Ibrahim,
>     >
>     > have you set the attr avp? Something like:
>     >   modparam("drouting", "attrs_avp", '$avp(s:dr_attrs)')
>     >
>     > Then after do_routing() or use_next_gw(), do :
>     >  xlog("-----gw attr is $avp(s:dr_attrs)\n");
>     >
>     > the value of the attr is whatever you want - the module does not
>     interpret it - it is just reading it from DB and pass it to the
>     AVP when you use the GW. It is your decision what to put there and
>     how to use the value.
>     >
>     >
>     > Regards,
>     > Bogdan
>     >
>     > ibrahim tunali wrote:
>     >>
>     >> Hello,
>     >>
>     >> I'm playing with the new module drouting on svn trunk and i need to
>     >> get "which gateway is used on last request". I might be able to
>     get it
>     >> with "attrs_avp" and "attrs" field on dr_gateways table, i guess. I
>     >> try some values to attrs but opensips crashed.
>     >>
>     >> Could you give an example to use attrs_avp and what is the value
>     >> format of "attrs" fields.
>     >>
>     >> Regards,
>     >>
>     >> Ibrahim TUNALI
>     >>
>     >> _______________________________________________
>     >> Users mailing list
>     >> [hidden email] <mailto:[hidden email]>
>     >> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>     >>
>     >>
>     >
>
>     _______________________________________________
>     Users mailing list
>     [hidden email] <mailto:[hidden email]>
>     http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>
>



_______________________________________________
Users mailing list
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users
Reply | Threaded
Open this post in threaded view
|

Re: drouting module - dr_gateways table attrs field

Brett Nemeroff
I'm using an older version in production of openser with the LCR module and I've tried using $rd to account where the call went. I get a lot of problems doing this because of things like RE-INVITES and such. It's been a real headache. It doesn't seem to be consistently accurate. I can't reproduce the problem, but if I ramp up 10,000 calls, it'll happen.

One particular problem happens like this. And I know this isn't DR, but I'd expect it to have a similar problem. First of all, understand that I'm writing my own CDR records with avp_db_query and not with ACC since I want a unified single record per call.

Ok, an old bug in Asterisk causes it to set the T1 SIP Timer to the length of time of an OPTIONS reply. This is really stupid. So Asterisk expects my OpenSER proxy to reply in 1ms to an INVITE. It just doesn't happen. So sometimes I get retransmissions. Each INVITE that is received performs a load_gws(). Which, because of the RAND in there, sometimes loads GW1, and sometimes loads GW2.  Because they both have the same callid, sometimes the original INVITE $rd overwrites the retransmitted $rd and thus the wrong gateway IP is recorded in the call record (avp_db_query). 

Now I've tried to resolve this by: 
1. Inserting a 1 sec sleep for OPTIONS replies in openser
2. Manually replying with a 1XX reply to avoid retransmissions. I'm not sure why this was necessary. I noticed that if I don't manually do this, OpenSER's 100 reply comes at about 250ms after the request. If I manually do it, I get it at about 25ms.

I'm sure I'm probably doing something wrong here.. in maybe a number of places. I feel like I probably need a t_newtrans() somewhere, but I don't really know how to use it properly. :/

Besides all of that, it's not really the GW IP that I want to be attached to the call record, but it's the GATEWAY ID that I want. And I suspect is more useful overall. The reason is that, for example, I send calls to a SIP/PSTN gateway and prefix the calls with 001-004 to indicate PRI #1-#4. The IP is the same for all 4 trunks. So sometimes, the $rd doesn't really tell you what "trunk" it's going to go out on. Which on the CDR record is really what I want. 

I feel like both LCR and DR need to write an AVP to indicate the GATEWAY ID last set to $rd. Thoughts?

-Brett


On Thu, Jan 22, 2009 at 11:38 AM, Bogdan-Andrei Iancu <[hidden email]> wrote:
Hi Brett,

but you have the GW IP (that was used) already in the RURI...or ?

Regards,
Bogdan

Brett Nemeroff wrote:
Is there not a way to store in an AVP the gateway that was used in the call? I have this need as well..
-Brett


On Thu, Jan 22, 2009 at 9:44 AM, ibrahim tunali <[hidden email] <mailto:[hidden email]>> wrote:

   Hi Bogdan,

   I have already set attr avp like you sent. The problem occured when
   fill the attr field. If I leave blank attr field in DB it starts but
   when i set something like "gw1" it crashed.

   My db row;

   +------+------+-------------------+-------+------------+-------+-------------+
   | gwid | type | address           | strip | pri_prefix | attrs |
   description |
   +------+------+-------------------+-------+------------+-------+-------------+
   |    1 |    1 | XX.XX.XXX.XX:XXXX |     0 | NULL       | gw1   |
   main GW     |
   +------+------+-------------------+-------+------------+-------+-------------+

   Crash dump;

   /usr/sbin/opensips[10261]: DBG:db_mysql:db_mysql_get_columns: 6
   columns returned from the query
   /usr/sbin/opensips[10261]: DBG:core:db_allocate_columns: allocate 48
   bytes for result names at 0x76a570
   /usr/sbin/opensips[10261]: DBG:core:db_allocate_columns: allocate 24
   bytes for result types at 0x76a5b0
   /usr/sbin/opensips[10261]: DBG:db_mysql:db_mysql_get_columns: allocate
   16 bytes for RES_NAMES[0] at 0x76a5d8
   /usr/sbin/opensips[10261]: DBG:db_mysql:db_mysql_get_columns:
   RES_NAMES(0x76a5d8)[0]=[gwid]
   /usr/sbin/opensips[10261]: DBG:db_mysql:db_mysql_get_columns: use
   DB_INT result type
   /usr/sbin/opensips[10261]: DBG:db_mysql:db_mysql_get_columns: allocate
   16 bytes for RES_NAMES[1] at 0x76a5f8
   /usr/sbin/opensips[10261]: DBG:db_mysql:db_mysql_get_columns:
   RES_NAMES(0x76a5f8)[1]=[address]
   /usr/sbin/opensips[10261]: DBG:db_mysql:db_mysql_get_columns: use
   DB_STRING result type
   /usr/sbin/opensips[10261]: DBG:db_mysql:db_mysql_get_columns: allocate
   16 bytes for RES_NAMES[2] at 0x76a618
   /usr/sbin/opensips[10261]: DBG:db_mysql:db_mysql_get_columns:
   RES_NAMES(0x76a618)[2]=[strip]
   /usr/sbin/opensips[10261]: DBG:db_mysql:db_mysql_get_columns: use
   DB_INT result type
   /usr/sbin/opensips[10261]: DBG:db_mysql:db_mysql_get_columns: allocate
   16 bytes for RES_NAMES[3] at 0x76a638
   /usr/sbin/opensips[10261]: DBG:db_mysql:db_mysql_get_columns:
   RES_NAMES(0x76a638)[3]=[pri_prefix]
   /usr/sbin/opensips[10261]: DBG:db_mysql:db_mysql_get_columns: use
   DB_STRING result type
   /usr/sbin/opensips[10261]: DBG:db_mysql:db_mysql_get_columns: allocate
   16 bytes for RES_NAMES[4] at 0x76a658
   /usr/sbin/opensips[10261]: DBG:db_mysql:db_mysql_get_columns:
   RES_NAMES(0x76a658)[4]=[type]
   /usr/sbin/opensips[10261]: DBG:db_mysql:db_mysql_get_columns: use
   DB_INT result type
   /usr/sbin/opensips[10261]: DBG:db_mysql:db_mysql_get_columns: allocate
   16 bytes for RES_NAMES[5] at 0x76a678
   /usr/sbin/opensips[10261]: DBG:db_mysql:db_mysql_get_columns:
   RES_NAMES(0x76a678)[5]=[attrs]
   /usr/sbin/opensips[10261]: DBG:db_mysql:db_mysql_get_columns: use
   DB_STRING result type
   /usr/sbin/opensips[10261]: DBG:db_mysql:db_mysql_fetch_result:
   converting row 0 of 1 count 1
   /usr/sbin/opensips[10261]: DBG:db_mysql:db_mysql_convert_row: allocate
   192 bytes for row values at 0x76a6b8
   /usr/sbin/opensips[10261]: DBG:db_mysql:db_mysql_str2val:
   converting INT [1]
   /usr/sbin/opensips[10261]: DBG:db_mysql:db_mysql_str2val: converting
   STRING [69.XX.XXX.55:XXXX]
   /usr/sbin/opensips[10261]: DBG:db_mysql:db_mysql_str2val:
   converting INT [0]
   /usr/sbin/opensips[10261]: DBG:db_mysql:db_mysql_str2val:
   converting INT [1]
   /usr/sbin/opensips[10261]: DBG:db_mysql:db_mysql_str2val: converting
   STRING [gw1]
   /usr/sbin/opensips[10261]: DBG:drouting:dr_load_routing_info: 1
   records found in dr_gateways
   /usr/sbin/opensips[10261]: DBG:drouting:add_dst: new gw ip addr
   [69.XX.XXX.55:XXXX]
   /usr/sbin/opensips[10249]: INFO:core:handle_sigs: child process 10261
   exited by a signal 11
   /usr/sbin/opensips[10267]: DBG:core:init_mod_child: type=CHILD,
   rank=4, module=registrar
   /usr/sbin/opensips[10249]: INFO:core:handle_sigs: core was not
   generated
   /usr/sbin/opensips[10267]: DBG:core:init_mod_child: type=CHILD,
   rank=4, module=group
   /usr/sbin/opensips[10249]: INFO:core:handle_sigs: terminating due
   to SIGCHLD
   /usr/sbin/opensips[10267]: INFO:core:sig_usr: signal 15 received
   /usr/sbin/opensips[10267]: Memory status (pkg):
   /usr/sbin/opensips[10273]: INFO:core:sig_usr: signal 15 received
   /usr/sbin/opensips[10273]: Memory status (pkg):
   /usr/sbin/opensips[10267]: fm_status (0x72bbe0):

   Regards,

   Ibrahim TUNALI


   On Thu, Jan 22, 2009 at 17:20, Bogdan-Andrei Iancu
   <[hidden email] <mailto:[hidden email]>> wrote:
   >
   > Hi Ibrahim,
   >
   > have you set the attr avp? Something like:
   >   modparam("drouting", "attrs_avp", '$avp(s:dr_attrs)')
   >
   > Then after do_routing() or use_next_gw(), do :
   >  xlog("-----gw attr is $avp(s:dr_attrs)\n");
   >
   > the value of the attr is whatever you want - the module does not
   interpret it - it is just reading it from DB and pass it to the
   AVP when you use the GW. It is your decision what to put there and
   how to use the value.
   >
   >
   > Regards,
   > Bogdan
   >
   > ibrahim tunali wrote:
   >>
   >> Hello,
   >>
   >> I'm playing with the new module drouting on svn trunk and i need to
   >> get "which gateway is used on last request". I might be able to
   get it
   >> with "attrs_avp" and "attrs" field on dr_gateways table, i guess. I
   >> try some values to attrs but opensips crashed.
   >>
   >> Could you give an example to use attrs_avp and what is the value
   >> format of "attrs" fields.
   >>
   >> Regards,
   >>
   >> Ibrahim TUNALI
   >>
   >> _______________________________________________
   >> Users mailing list
   >> [hidden email] <mailto:[hidden email]>

   >> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
   >>
   >>
   >

   _______________________________________________
   Users mailing list
   [hidden email] <mailto:[hidden email]>




_______________________________________________
Users mailing list
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users
Reply | Threaded
Open this post in threaded view
|

routing module

Julien Chavanton
In reply to this post by Bogdan-Andrei Iancu
Re: [OpenSIPS-Users] drouting module - dr_gateways table attrs field
I am using "opensips-1.4.3-notls"
 
I need to route calls to differents remote gateway based on prefix in the dialed number.
Can you tell me if the module "carrierreoute", would be the recommended solution ?
 
1- README-MODULES file does not list "carrierroute" module
2- "carrierroute" does not compile
 
  error : "route_config.c:30:21: error: confuse.h: No such file or directory"
 
I would like to know if I am looking for the most strait-forward/supported solution to meet my requirements ?
 
Thank you,
Julien
 
 

 



From: [hidden email] on behalf of Bogdan-Andrei Iancu
Sent: Thu 22/01/2009 3:20 PM
To: ibrahim tunali
Cc: [hidden email]
Subject: Re: [OpenSIPS-Users] drouting module - dr_gateways table attrs field

Hi Ibrahim,

have you set the attr avp? Something like:
    modparam("drouting", "attrs_avp", '$avp(s:dr_attrs)')

Then after do_routing() or use_next_gw(), do :
   xlog("-----gw attr is $avp(s:dr_attrs)\n");

the value of the attr is whatever you want - the module does not interpret it - it is just reading it from DB and pass it to the AVP when you use the GW. It is your decision what to put there and how to use the value.


Regards,
Bogdan

ibrahim tunali wrote:


> Hello,
>
> I'm playing with the new module drouting on svn trunk and i need to
> get "which gateway is used on last request". I might be able to get it
> with "attrs_avp" and "attrs" field on dr_gateways table, i guess. I
> try some values to attrs but opensips crashed.
>
> Could you give an example to use attrs_avp and what is the value
> format of "attrs" fields.
>
> Regards,
>
> Ibrahim TUNALI
>
> _______________________________________________
> Users mailing list
> [hidden email]
> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>
>  


_______________________________________________
Users mailing list
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


_______________________________________________
Users mailing list
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users
Reply | Threaded
Open this post in threaded view
|

Re: routing module

Julien Chavanton
Re: [OpenSIPS-Users] drouting module - dr_gateways table attrs field
 
About the  error : "route_config.c:30:21: error: confuse.h: No such file or directory"
 
I found that there was a module depency clearly stated in the doc :
 
The following libraries or applications must be installed before running OpenSIPS with this module loaded:
  • libconfuse, a configuration file parser library.

 
 
For my main question, I will read about the new "dynamic routing" in 1.5.x
 
But a good advice could be much appreciated ?
 


From: [hidden email] on behalf of Julien Chavanton
Sent: Mon 16/02/2009 9:10 PM
To: [hidden email]
Subject: [OpenSIPS-Users] routing module

I am using "opensips-1.4.3-notls"
 
I need to route calls to differents remote gateway based on prefix in the dialed number.
Can you tell me if the module "carrierreoute", would be the recommended solution ?
 
1- README-MODULES file does not list "carrierroute" module
2- "carrierroute" does not compile
 
  error : "route_config.c:30:21: error: confuse.h: No such file or directory"
 
I would like to know if I am looking for the most strait-forward/supported solution to meet my requirements ?
 
Thank you,
Julien
 
 

 


_______________________________________________
Users mailing list
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users
Reply | Threaded
Open this post in threaded view
|

Re: routing module

Bogdan-Andrei Iancu
In reply to this post by Julien Chavanton
Hi Julien,

Julien Chavanton wrote:
> I am using "opensips-1.4.3-notls"
>  
> I need to route calls to differents remote gateway based on prefix in
> the dialed number.
> Can you tell me if the module "carrierreoute", would be the
> recommended solution ?
yes, carrierroute and lcr modules are the one for doing prefix based
routing.
>  
> 1- README-MODULES file does not list "carrierroute" module
probably not updated :), but check :
    http://www.opensips.org/index.php?n=Resources.DocsModules14
> 2- "carrierroute" does not compile
>  
>   error : "route_config.c:30:21: error: confuse.h: No such file or
> directory"
you need to install "libconfuse" package. See:
       
http://www.opensips.org/html/docs/modules/1.4.x/carrierroute.html#id227214

Regards,
bogdan

>  
> I would like to know if I am looking for the most
> strait-forward/supported solution to meet my requirements ?
>  
> Thank you,
> Julien
>  
>  
>
>  
>
>
> ------------------------------------------------------------------------
> *From:* [hidden email] on behalf of Bogdan-Andrei Iancu
> *Sent:* Thu 22/01/2009 3:20 PM
> *To:* ibrahim tunali
> *Cc:* [hidden email]
> *Subject:* Re: [OpenSIPS-Users] drouting module - dr_gateways table
> attrs field
>
> Hi Ibrahim,
>
> have you set the attr avp? Something like:
>     modparam("drouting", "attrs_avp", '$avp(s:dr_attrs)')
>
> Then after do_routing() or use_next_gw(), do :
>    xlog("-----gw attr is $avp(s:dr_attrs)\n");
>
> the value of the attr is whatever you want - the module does not
> interpret it - it is just reading it from DB and pass it to the AVP
> when you use the GW. It is your decision what to put there and how to
> use the value.
>
>
> Regards,
> Bogdan
>
> ibrahim tunali wrote:
> > Hello,
> >
> > I'm playing with the new module drouting on svn trunk and i need to
> > get "which gateway is used on last request". I might be able to get it
> > with "attrs_avp" and "attrs" field on dr_gateways table, i guess. I
> > try some values to attrs but opensips crashed.
> >
> > Could you give an example to use attrs_avp and what is the value
> > format of "attrs" fields.
> >
> > Regards,
> >
> > Ibrahim TUNALI
> >
> > _______________________________________________
> > Users mailing list
> > [hidden email]
> > http://lists.opensips.org/cgi-bin/mailman/listinfo/users
> >
> >  
>
>
> _______________________________________________
> Users mailing list
> [hidden email]
> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>
> ------------------------------------------------------------------------
>
> _______________________________________________
> Users mailing list
> [hidden email]
> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>  


_______________________________________________
Users mailing list
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users
Reply | Threaded
Open this post in threaded view
|

Re: routing module

Bogdan-Andrei Iancu
In reply to this post by Julien Chavanton
Hi Julien,

Personally, I would recommend the Dynamic Routing module, mainly because
of performance issues. see:
    http://www.opensips.org/html/docs/modules/devel/drouting.html#id227252

Regards,
Bogdan

Julien Chavanton wrote:

>  
>  
> For my main question, I will read about the new "dynamic routing" in 1.5.x
>  
> But a good advice could be much appreciated ?
>  
>
> ------------------------------------------------------------------------
> *From:* [hidden email] on behalf of Julien Chavanton
> *Sent:* Mon 16/02/2009 9:10 PM
> *To:* [hidden email]
> *Subject:* [OpenSIPS-Users] routing module
>
> I am using "opensips-1.4.3-notls"
>  
> I need to route calls to differents remote gateway based on prefix in
> the dialed number.
> Can you tell me if the module "carrierreoute", would be the
> recommended solution ?
>  
> 1- README-MODULES file does not list "carrierroute" module
> 2- "carrierroute" does not compile
>  
>   error : "route_config.c:30:21: error: confuse.h: No such file or
> directory"
>  
> I would like to know if I am looking for the most
> strait-forward/supported solution to meet my requirements ?
>  
> Thank you,
> Julien
>  
>  
>
>  
>
> ------------------------------------------------------------------------
>
> _______________________________________________
> Users mailing list
> [hidden email]
> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>  


_______________________________________________
Users mailing list
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users