[Asterisk-Users] no results.

Sean Cheesman scheesman at macarthur-group.com
Tue Jan 6 22:12:36 MST 2004


oops!  I forgot on important one!  you have to have at the minimum this
entry:
 
INSERT INTO `sip` (`id`, `keyword`, `data`, `flags`) VALUES ('1234',
account', '1234', '0'); 
 
you'll notice that the 'id' column is an integer.  so you have to keep
it numeric.  some people like to have their sip extensions be
alphanumeric, so in order to accommodate that there is the id field.
this is independent of anything in your normal sip.conf file.  but all
entries for each sip.conf entry must have the same 'id' set.  so account
is actually the name of the sip entry.  I hope I didn't just make that
very unclear!
 
Sean

	-----Original Message-----
	From: Sean Cheesman
[mailto:asterisk-users-admin at lists.digium.com] On Behalf Of Sean
Cheesman
	Sent: Tuesday, January 06, 2004 11:43 PM
	To: asterisk-users at lists.digium.com
	Subject: RE: [Asterisk-Users] no results.
	
	
	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 --------------
An HTML attachment was scrubbed...
URL: http://lists.digium.com/pipermail/asterisk-users/attachments/20040106/515b92b7/attachment.htm


More information about the asterisk-users mailing list