Sponsor: VoiceMeUp - Corporate & Wholesale VoIP Services

VoIP Mailing List Archives
Mailing list archives for the VoIP community
 SearchSearch 

[asterisk-users] extension.conf with mysql


 
Post new topic   Reply to topic    VoIP Mailing List Archives Forum Index -> Asterisk Users
View previous topic :: View next topic  
Author Message
saigop at gmail.com
Guest





PostPosted: Mon Jan 07, 2008 7:43 am    Post subject: [asterisk-users] extension.conf with mysql Reply with quote

Hi,

I am trying to connect the outbound dialing with mysql with the following
code,

exten => 88,1,MYSQL(Connect connid hostname username password dbname)
exten => 88,2,GotoIf($["${connid}" = ""]?error,1)
exten => 88,3,MYSQL(Query resultid ${connid} SELECT\ phone\ FROM\
<tablename>\ WHERE\ phone =${a})
exten => 88,4,MYSQL(Fetch fetchid ${resultid} ph\ sa)
...
.
...
after this I am getting confused. My moto is to display the number in the
database and need to check with my outgoing number.

how to display fetched number from the database.


--
Thank you with regards,
Gopal
<http://www.peopletech.co.in>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.digium.com/pipermail/asterisk-users/attachments/20080107/ebe6e879/attachment.htm
Back to top
support at drdos.info
Guest





PostPosted: Mon Jan 07, 2008 8:20 am    Post subject: [asterisk-users] extension.conf with mysql Reply with quote

Gopal krishnan wrote:
Quote:
Hi,

I am trying to connect the outbound dialing with mysql with the
following code,

exten => 88,1,MYSQL(Connect connid hostname username password dbname)
exten => 88,2,GotoIf($["${connid}" = ""]?error,1)
exten => 88,3,MYSQL(Query resultid ${connid} SELECT\ phone\ FROM\
<tablename>\ WHERE\ phone =${a})

This is what I do:

exten => s,n,MYSQL(Connect connid 192.168.103.15 AsteriskQuery
'somepass' Administration)
exten => s,n,GotoIf($["${MYSQL_STATUS}" = "-1"]?mysql_failed,s,1)
exten => s,n,MYSQL(Query resultid ${connid} SELECT name \, access \,
password \, facility \, paging \, afterhours \, lockdown FROM Passwords
WHERE password = ${get-admin-password})
exten => s,n,MYSQL(Fetch fetchid ${resultid} admin.name admin.access
admin.password admin.facility admin.paging admin.afterhours admin.lockdown)
exten => s,n,MYSQL(Disconnect ${connid})
exten => s,n,MYSQL(Clear ${resultid})

Doug

--

Ben Franklin quote:

"Those who would give up Essential Liberty to purchase a little Temporary Safety, deserve neither Liberty nor Safety."
Back to top
Display posts from previous:   
Post new topic   Reply to topic    VoIP Mailing List Archives Forum Index -> Asterisk Users All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group

VoiceMeUp - Corporate & Wholesale VoIP Services