[Asterisk-Users] no results.

Sean Cheesman scheesman at macarthur-group.com
Tue Jan 6 21:42:54 MST 2004


the database schema is the table and it's associated columns.  did you use the create table script in the header of the pl file?  basically, for each of your sip entries, they would be broken down per line.  so if your sip.conf entry looks like this:
 
[1234]
type=friend
username=1234
secret=blah
nat=yes
host=dynamic
canreinvite=no
qualify=200
defaultip=192.168.0.4
 
your entries in the mysql database would be like this:
INSERT INTO `sip` (`id`, `keyword`, `data`, `flags`) VALUES ('1234', 'type', 'friend', '0'); 
INSERT INTO `sip` (`id`, `keyword`, `data`, `flags`) VALUES ('1234', 'username', '1234', '0');
INSERT INTO `sip` (`id`, `keyword`, `data`, `flags`) VALUES ('1234', 'secret', 'blah', '0'); 
and so on.....  the 'flags' column allows you to "disable" an entry without deleting the entry completely.  Hope this helps!
 
Sean
 

	-----Original Message----- 
	From: Chandra [mailto:chandra at digital.com.np] 
	Sent: Tue 1/6/2004 11:31 PM 
	To: asterisk-users at lists.digium.com 
	Cc: 
	Subject: Re: [Asterisk-Users] no results.
	
	

	there are 4 fields, id, keyword,data, flags..
	
	i really don't know what to put in keyword and data... but i have something
	like 4 datas in my sip table
	
	1234,account,sip1,0
	1235,account,sip2,0
	1236,user,sip3,0
	1236,peer,sip3,0
	
	what do u mean by db schema???
	
	----- Original Message -----
	From: "Sean Cheesman" <scheesman at macarthur-group.com>
	To: <asterisk-users at lists.digium.com>
	Sent: Wednesday, January 07, 2004 9:57 AM
	Subject: RE: [Asterisk-Users] no results.
	
	
	> have you set up the db schema?  and have you entered any sip data into the
	db?
	>
	> Sean
	>
	> -----Original Message-----
	> From: Chandra [mailto:chandra at digital.com.np]
	> Sent: Tue 1/6/2004 10:57 PM
	> To: asterisk-users at lists.digium.com
	> Cc:
	> Subject: [Asterisk-Users] no results.
	>
	>
	>
	> i have been working with the retrieve_sip_conf_from_mysql.pl file and i
	have
	> set everything as required. but when i run this script i am continuously
	> getting the "no results" in my screen   and the file written by this
	script
	> has only first result although i have many in my database. this is the
	part
	> of this script.
	>
	>      my @resSet = @{$result};
	>         print $#resSet;
	>         if ( $#resSet == -1 ) {
	>                 print "no results\n";
	>                 exit;
	>         }
	>
	> can any one tell me what is happening? and get rid of this error?
	>
	> for those who have no clue.. this file is in the /usr/src/asterisk
	> directory... (asterisk source diretory.)
	>
	> thanks,
	> chandra
	>
	>
	> _______________________________________________
	> Asterisk-Users mailing list
	> Asterisk-Users at lists.digium.com
	> http://lists.digium.com/mailman/listinfo/asterisk-users
	>
	>
	>
	
	
	_______________________________________________
	Asterisk-Users mailing list
	Asterisk-Users at lists.digium.com
	http://lists.digium.com/mailman/listinfo/asterisk-users
	

-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/ms-tnef
Size: 6802 bytes
Desc: not available
Url : http://lists.digium.com/pipermail/asterisk-users/attachments/20040106/1cbafd07/attachment.bin


More information about the asterisk-users mailing list