Thank you so much for replying, but as get-url is calling new_smsreceiver.php and that php is working so how could I know which user is being used? which kannel user you mean... there is only the sendsms user in kannel and it does not exist in system.
I am newbie in this stuff so please a little more explanation would be great help.. On Mon, May 25, 2015 at 11:44 PM, Alvaro Cornejo <cornejo.alv...@gmail.com> wrote: > Hi > > Check permissions. Kannel user might not have permit to execute lynx. > > Regards > > Alvaro > > > |-----------------------------------------------------------------------------------------------------------------| > Envíe y Reciba Datos y mensajes de Texto (SMS) hacia y desde cualquier > celular y Nextel > en el Perú, México y en mas de 180 paises. Use aplicaciones 2 vias via SMS > y GPRS online > Visitenos en www.perusms.com > > On Mon, May 25, 2015 at 8:24 AM, Nasir Javaid <nasirjav...@gmail.com> > wrote: > >> Dear All, >> >> I am having a strange issue. We have a service in which we receive >> sender's nickame in khmer language and reply him back via kannel. For >> example user sends r#វីរបុរសសួយថាង >> >> Now by setting mo-recode=true in smsbox config, we can receive and store >> the khmer font properly in db. But the issue is reply. Echo command shows >> ???? on mobile phone. Even tried urldecode but still mobile handset shows >> garbage or ?????? signs. >> >> I have read many lists where they say to use separate sendsms command to >> send sms using charset=utf-8 and coding=2..... Yes this works from command >> line or running php script ,which has this command, from command line, but >> issue is how to make it work from php script which is called by sms-service >> get-url... >> >> I have set max-messages=0 and omit-empty=true and in my php script i >> separately call the sendsms via system command but it seems that this line >> is totally ignored and when I test this script from commandline it works >> fine but when being called by sms-service, it logs data in db properly via >> script but somehow misses to run the system command. >> >> Here is my kannel.conf >> >> group = core >> admin-port = 13000 >> smsbox-port = 13001 >> wapbox-port = 13002 >> #PPG >> wdp-interface-name = "*" >> #PPG >> log-level = 0 >> log-file = "/var/log/kannel/kannel.log" >> access-log = "/var/log/kannel/access.log" >> admin-password = iccard2 >> status-password = iccard2 >> #dlr-storage = mysql >> >> # SMSBOX SETUP >> group = smsbox >> bearerbox-host = 10.1.10.22 >> sendsms-port = 13013 >> log-file = "/var/log/kannel/smsbox.log" >> log-level = 0 >> access-log = "/var/log/kannel/access.log" >> mo-recode = true >> immediate-sendsms-reply = true >> >> # SEND-SMS USERS >> group = sendsms-user >> username = user >> password = pass >> user-deny-ip = "*.*.*.*" >> user-allow-ip = "10.1.10.22" >> name = service_kannel >> max-messages = 3 >> concatenation = 1 >> omit-empty= true >> >> group = mysql-connection >> id = mydlr >> host = localhost >> username = root >> password = pass >> database = sms >> max-connections = 5 >> >> group = dlr-db >> id = mydlr >> table = smsdlr >> field-smsc = smsc >> field-timestamp = ts >> field-destination = destination >> field-source = source >> field-service = service >> field-url = url >> field-mask = mask >> field-status = status >> field-boxc-id = boxc >> >> # SMSC SMPP >> group = smsc >> smsc = smpp >> smsc-id = smpp-1 >> host = xxx.xxx.xxx >> port = 2222 >> receive-port = 2222 >> smsc-username = user >> smsc-password = pass >> source-addr-ton = 0 >> dest-addr-ton = 0 >> bind-addr-ton = 0 >> source-addr-npi=0 >> dest-addr-npi=0 >> allowed-smsc-id = smpp-1 >> system-type = VMCWI >> >> group = smsc >> smsc = fake >> port = 10000 >> connect-allow-ip = 127.0.0.1 >> >> group = sms-service >> keyword = default >> get-url = " >> http://localhost/new_smsreceiver.php?receiver=%p&smstext=%a&shortcode=%P&stime=%t&smsc=%i&kword=%k >> " >> omit-empty = true >> max-messages = 0 >> >> >> in my new_smsreceiver.php >> >> >> <?php >> >> error_reporting(0); >> //$receiver=str_replace("+855","0",$_REQUEST[receiver]); >> >> $receiver=$_REQUEST[receiver]; >> $smstext = $_REQUEST[smstext]; >> $shortcode=$_REQUEST[shortcode]; >> $smsc=$_REQUEST[smsc]; >> $tm=$_REQUEST[stime]; >> $kw=$_REQUEST[kword]; >> >> $pieces = explode("#", $smstext); >> $rstr=$pieces[0]; >> $nick=$pieces[1]; >> $msgreply="Hi $nick, You are now registered for. You can now send you >> comments by typing contestant Id and your comment, Ex. 1 is good."; >> system("lynx -dump ' >> http://10.10.1.35:13013/cgi-bin/sendsms?username=user&password=pass&from=xxxx&smsc=smpp-1&charset=UTF-8&coding=2&to=$receiver&text=$msgreply >> '"); >> >> >> Now this system command executes fine when I run it from cli of linux but >> it seems not running when script is called from get-url. >> >> Please help. >> >> -- >> Regards, >> >> Nasir Javaid >> > > -- Regards, Nasir Javaid