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