thanks guys…i am barely a programmer…just would like to know what i am doing wrong in this…trying to convert this part of my dialplan to the n,(label) thing - can you tell me what i am doing wrong ???
I get the follwoing error:
– Executing [1@pcom-drv:21] MYSQL(“SIP/inphonex_peer-00000014”, “query resultid 1 select count(*) from w6h8a_community_fields_values WHERE (field_id =‘6’) and value =‘22222’”) in new stack
– Executing [1@pcom-drv:22] MYSQL(“SIP/inphonex_peer-00000014”, “fetch fetchid 2 check”) in new stack
– Executing [1@pcom-drv:23] MYSQL(“SIP/inphonex_peer-00000014”, “disconnect 1”) in new stack
– Executing [1@pcom-drv:24] GotoIf(“SIP/inphonex_peer-00000014”, “0?notinsystem:insystem”) in new stack
– Goto (pcom-drv,1,27)
[Sep 21 14:57:45] WARNING[7275]: pbx.c:4071 pbx_extension_helper: No application ‘’ for extension (pcom-drv, 1, 27)
== Spawn extension (pcom-drv, 1, 27) exited non-zero on ‘SIP/inphonex_peer-00000014’
== Spawn extension (to-inonex, 1221, 1) exited non-zero on ‘SIP/1001-00000012’
;
; ** Check if user with ${CALLERID} exist?
;
exten => 1,20,MYSQL(connect connid localhost usr password db)
exten => 1,21,MYSQL(query resultid ${connid} select count(*) from w6h8a_community_fields_values WHERE (field_id =‘6’) and value =’${phone_num}’)
exten => 1,22,MYSQL(fetch fetchid ${resultid} check)
exten => 1,23,MYSQL(disconnect ${connid})
exten => 1,n,GotoIf($[${check} = 0]?notinsystem:insystem)
exten => 1,n(notinsystem),read(notsys,/var/lib/asterisk/proj2/65-drv-numnotinsystem10,1,3,3)
exten => 1,n,GotoIf($[${notsys} = 1]?9:100)
;
; ** Get phone number from driver and Check Password
;
exten => 1,n(insystem),(${answer})
exten => 1,27,NoOp(${answer})
exten => 1,28,Set(i=1)
exten => 1,29,While($[${i} <= 3])
exten => 1,30,read(trypassword,/var/lib/asterisk/proj2/29-enterpassword,4,3,3)
exten => 1,31,MYSQL(connect connid localhost usr password db)
exten => 1,32,MYSQL(query resultid ${connid} select pin from w6h8a_community_verify_mobile where MobileNo=’${phone_num}’)
exten => 1,33,MYSQL(fetch fetchid ${resultid} password1)
exten => 1,34,MYSQL(Clear ${resultid})
exten => 1,35,Goto(pcom-drv,1,36)
; exten => 1,35,MYSQL(query resultid ${connid} SELECT MD5(’${trypassword}’))
; exten => 1,36,MYSQL(fetch fetchid ${resultid} password2)
; exten => 1,37,MYSQL(disconnect ${connid})