Hi. I guess I've not redacted my question clearly enough.
When any of the GSM Modem receives a sms, it's forwarded to my sms-service. I could use your suggestion and pass the smsc-id to my service. In my sms-service sms.php I have something like: <?php // save sms to database // .... // // In here I know which modem received the sms // the problem is, the response 'Your sms has been received' go out always to one modem, no matter what modem received the sms // echo 'Your sms has been received'; // This is the text of the reply // I was thinking on using a header here: header('X-Kannel-SMSC: my_smsc2'), // ----> Will this work? // Any way I'm going to test this tomorrow morning, when I'm back to the office ?> Thanks On Thu, Aug 8, 2013 at 4:20 PM, Alvaro Cornejo <cornejo.alv...@gmail.com>wrote: > Hi > > Forgot to cc kannel list. > > Try to specify: > > > http://localhost/sms.php?keyword=%k&seckeyword=%s®time=%t&sender=%p&receiver=%P&text=%a&dlrvalue=%d > &sms-id=YourPreferredRoute > > 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.NET www.smsglobal.com.mx y > www.pravcom.com > > > On Thu, Aug 8, 2013 at 3:42 PM, Cesar Arguinzones <cea...@gmail.com>wrote: > >> Hi Alvaro. >> >> I'm generating the response in the sms-service >> http://localhost/sms.php?keyword=%k&seckeyword=%s®time=%t&sender=%p&receiver=%P&text=%a&dlrvalue=%d >> >> could I pass the parameter as a kannel header, the closest header that I >> think could work is *X-Kannel-SMSC*? >> >> So i would do something like this in php header('X-Kannel-SMSC: my_smsc2 >> ') >> >> Thanks >> >> >> >> On Thu, Aug 8, 2013 at 2:43 PM, Alvaro Cornejo >> <cornejo.alv...@gmail.com>wrote: >> >>> Hi, Kannel can't do this you need to do it in your app. >>> >>> When submitting reply, add &smsc-id=my_smsc2 in your call to bearerbox. >>> >>> Hope helps >>> >>> 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.NET www.smsglobal.com.mx y >>> www.pravcom.com >>> >>> >>> On Thu, Aug 8, 2013 at 9:56 AM, Cesar Arguinzones <cea...@gmail.com>wrote: >>> >>>> Hi. >>>> >>>> I've searched for this in google and the list but I have not found a >>>> solution to my problem. >>>> >>>> >>>> TL;DR >>>> >>>> I have two gsm modems, but the replies are always getting out through >>>> one modem >>>> I would like the reply to get out through the same modem where the sms >>>> came from >>>> >>>> The reply always goes through +584241111111 even when the sms comes >>>> from +584122222222 >>>> >>>> >>>> kannel.conf >>>> =========== >>>> >>>> >>>> # >>>> # Sample configuration file for Kannel bearerbox on Debian. >>>> # See the documentation for explanations of fields. >>>> # >>>> >>>> # HTTP administration is disabled by default. Make sure you set the >>>> # password if you enable it. >>>> >>>> group = core >>>> admin-port = 13000 >>>> smsbox-port = 13001 >>>> admin-password = 123 >>>> log-file=/tmp/core.log >>>> log-level=0 >>>> >>>> group = smsc >>>> smsc = at >>>> smsc-id = my-smsc >>>> modemtype = huawei >>>> device = /dev/hw-modem-2 >>>> my-number = +584122222222 >>>> log-file=/tmp/smsc.log >>>> log-level=0 >>>> sim-buffering = true >>>> >>>> >>>> group = smsc >>>> smsc = at >>>> smsc-id = my-smsc2 >>>> modemtype = huawei2 >>>> device = /dev/hw-modem-1 >>>> my-number = +584241111111 >>>> log-file=/tmp/smsc1.log >>>> log-level=0 >>>> sim-buffering = true >>>> >>>> >>>> group = modems >>>> id = huawei >>>> name = "huawei-e5836" >>>> detect-string = "E1552" >>>> init-string = "AT+CNMI=2,1,2,2,0" >>>> speed = 0 >>>> >>>> >>>> group = modems >>>> id = huawei2 >>>> name = "huawei-e173" >>>> detect-string = "huawei" >>>> init-string = "AT+CNMI=2,1,2,2,0" >>>> speed = 0 >>>> >>>> group = smsbox >>>> bearerbox-host = localhost >>>> sendsms-port = 13013 >>>> log-file=/tmp/smsbox.log >>>> log-level=1 >>>> >>>> group = sms-service >>>> keyword = default >>>> catch-all = yes >>>> max-messages = 10 >>>> get-url= >>>> http://localhost/sms.php?keyword=%k&seckeyword=%s®time=%t&sender=%p&receiver=%P&text=%a&dlrvalue=%d >>>> omit-empty = true >>>> accepted-smsc = my-smsc2 >>>> >>>> group = sms-service >>>> keyword = default >>>> catch-all = yes >>>> max-messages = 10 >>>> get-url= >>>> http://localhost/sms.php?keyword=%k&seckeyword=%s®time=%t&sender=%p&receiver=%P&text=%a&dlrvalue=%d >>>> omit-empty = true >>>> accepted-smsc = my-smsc >>>> >>>> group = sms-service >>>> keyword = default >>>> catch-all = yes >>>> max-messages = 10 >>>> get-url= >>>> http://localhost/sms.php?keyword=%k&seckeyword=%s®time=%t&sender=%p&receiver=%P&text=%a&dlrvalue=%d >>>> omit-empty = true >>>> >>>> >>>> >>>> >>>> group = sendsms-user >>>> username = kannelUser >>>> password = 123 >>>> >>>> >>>> >>>> Thanks >>>> >>>> -- >>>> Cesar Arguinzones >>>> >>> >>> >> >> >> -- >> Cesar Arguinzones >> > > -- Cesar Arguinzones