Hi,

Is there any easy way to configure the mapping between
> SMSC ID's and short codes?
>
> We have the following requirements for a project, and I'm trying to
> determine what is the best and cleanest way to configure kannel to achieve
> them. I'm using kannel v1.4.1 .
>

I prefer to use 1.4.3 , solve many things and have many new features


>
> i) We need to be able to receive SMS messages from various SMSC's ,
>     e.g. messages sent by people to short code 111 would be received
>     through one particular SMSC, and those sent to 222 would be received
>     through another SMSC.


this is depend on you operator configuration, may be you operator define one
SMSC connection and route all the SMS ( from 111 and 222) to the same SMSC
(and in this case you need to check the receiver number) , or may be you
operator give you more than one session for single short code  (for example
SMSC1 + SMSC2 for the short code 111 and SMSC3 and SMSC4 for 222)

So you can ask the team who handel the Kannel configration.


>
> ii) An application processes each message, and sends any reply back
>      to the sender via kannel's normal sendsms interface:
>        http://localhost:13013/cgi-bin/sendsms?.....
>      The message must be sent back through the same SMSC from which
>      it was originally received, and with the same short code.


>      (i.e. if a message is received from SMSC BBBB with short code 222,
>       the reply has to go back through SMSC BBBB and appear to the customer
>       as coming from '222'.
>      )


you need to let you application use the parameter *smsc* in the sendsms
interface, (e.g when your  application fetch the rows from the mo table ,
there are field that determine the incoming smsc , so use it the same to
send SMS) , but not to do that you SMPP connections must be transiver not
reciver only ( ask your kannel team)


>
> iii) An application should also be able to send a random
>      application-initiated message through SMSC that it wishes.
>      If it doesn't specify any particular SMSC, it should through
>      a specific default SMSC.
>
> I think the following relevant bits of configuration are a good start.
>     group = smsc
>     smsc-id = AAAA
>     allowed-smsc-id = AAAA
>
>     group = smsc
>     smsc-id = BBBB
>     allowed-smsc-id = BBBB
>
>     group = smsc
>     smsc-id = CCCC
>     allowed-smsc-id = CCCC
>
>     group = smsc
>     smsc-id = ZZZZ
>     denied-smsc-id = AAAA;BBBB;CCCC
>
> From my testing, this means that if the application specifies
> "smsc=BBBB" as a parameter, i.e.
>     http://localhost:13013/cgi-bin/sendsms?....&smsc=BBBB
> it will ALWAYS go through BBBB and nowhere else.
> If the application doesn't specify the smsc= parameter (or specifies
> a non-existant one), then the message will ALWAYS go through ZZZZ
> and nowhere else.
>
> That's what I want and I hope that's how it's meant to work.
> It does mean that if I add a new SMSC in the future, then we have to
> remember to also add it to the "denied-smsc-id" configuration above.
> A bit convoluted, but that's how kannel seems to work.
>
> Now, regarding the 'from=' parameter:
>
> From my observations, the SMSC's here (over which I have no control),
> tolerate only certain source numbers. So for example if I try
> sending back a SMS reply to a customer through SMSC BBBB, then that
> SMSC will accept a 'from' address of 222, but not 111 for example.
>     http://localhost:13013/cgi-bin/sendsms?....&smsc=BBBB&from=222
>
> I was hoping that maybe I could leave out the from= parameter
> and then perhaps the SMSC itself would fill it in with a default correct
> value (I have no idea if our SMSC's are set up like that, but at least
> I would have liked to test it).
> But if I leave out the "from=" parameter from the URL above, kannel itself
> refuses to accept the URL, giving:
>     ERROR 400: Bad Request
>
> Is there any clean way to configure kannel to tell it
> the relationships between the short codes and the SMSC ID?
> Continuing from above, requirement #4 is:
>

I can't get you here.


>
> iv) Ideally the application should be able to specify just
> the smsc or the 'from' field, and kannel should be able to
> supply the rest.
>     http://localhost:13013/cgi-bin/sendsms?....&smsc=BBBB
>         or
>     http://localhost:13013/cgi-bin/sendsms?....&from=222
>
> There's a lot of documentation in the kannel user guide
> so the solution may be staring me in the face, but I find a lot of it
> challenging to understand, especially the parts about 'routing'.
>
> The only way I could find to implement this is the following:
> I haven't tried to test this yet.
> I could set up one sendsms-user per SMSC. So for example
> for SMSC BBBB, I could set up with user:
>     group = sendsms-user
>     username = user_BBBB
>     default-smsc = BBBB
>     default-sender = 61421260388
>
> That way if the application wants to sends a message to
> SMSC BBBB, it (hopefully) only needs to do
>     http://localhost:13013/cgi-bin/sendsms?....&username=user_BBBB
> and can leave out either or both the smsc= and from= parameters.
> Of course, it has to then supply the correct username= parameter.
>
> Is there a more standard or neater way to do what I want?
> The application writers tell me that it might be hard for
> them to specify different username= values like this in the
> sendsms URL. They would rather be able to
> specify only the smsc= or from= parameter,
> and have kannel automatically work out how the other parameter.
>

that only what you need to determine the smsc, from, coding, charset,
destination only, and use the same group for sendsms-user.


>
> (This is the end of the request.)
>


 hope that help you.

-- 
Hafez A.Ahmad
Amman-Jordan

Reply via email to