[OpenSIPS-Users] avp_db_query doesn't save value

Bogdan-Andrei Iancu bogdan at voice-system.ro
Tue Sep 28 09:31:57 CEST 2010


Hi Anton,

Are you sure the query itself has a result ? maybe there is no such 
record in subscriber table....

Regards,
Bogdan

Антон Загорский wrote:
> Hi!
>
> I'm using a column 'fwdcall' (CHAR (64)) in the table subscriber. But there
> is a problem with avp_db_query:
>
> avp_db_query("SELECT fwdcall FROM subscriber WHERE username='$fU' AND
> domain='$fd'", "$avp(i:100)");
> xlog("*** Blink Call Forwarding to $avp(i:100)\n");
>
> It doesn't save value to $avp(i:100). Here is a log part:
>
> DBG:avpops:ops_dbquery_avps: query [SELECT fwdcall FROM subscriber WHERE
> username='3000' AND domain='mydomain']
> DBG:core:db_new_result: allocate 28 bytes for result set at 0x81e5d50
> DBG:db_mysql:db_mysql_get_columns: 1 columns returned from the query
> DBG:core:db_allocate_columns: allocate 16 bytes for result columns at
> 0x81e5920
> DBG:db_mysql:db_mysql_get_columns: RES_NAMES(0x81e5924)[0]=[fwdcall]
> DBG:db_mysql:db_mysql_get_columns: use DB_STRING result type
> DBG:core:db_allocate_rows: allocate 28 bytes for result rows and values at
> 0x81e5d7c
> DBG:avpops:db_query_avp: rows [1]
> DBG:avpops:db_query_avp: row [0]
> DBG:avpops:db_close_query: close avp query
> DBG:core:db_free_columns: freeing result columns at 0x81e5920
> DBG:core:db_free_rows: freeing 1 rows
> DBG:core:db_free_row: freeing row values at 0x81e5d84
> DBG:core:db_free_rows: freeing rows at 0x81e5d7c
> DBG:core:db_free_result: freeing result set at 0x81e5d50
> *** Blink Call Forwarding to <null>
>
> Why?
>
>
> _______________________________________________
> Users mailing list
> Users at lists.opensips.org
> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>
>   


-- 
Bogdan-Andrei Iancu
OpenSIPS Bootcamp
15 - 19 November 2010, Edison, New Jersey, USA
www.voice-system.ro




More information about the Users mailing list