Dear Alexander,

Ok, I believe you! :)

Sorry I forgot to change the "To:" last time.

Yep, I've read some of the smsc_smpp.c and I've found this on line 1884.87:

    conn->name = octstr_format("SMPP:%S:%d/%d:%S:%S",
                      host, port,
                               (receive_port ? receive_port : port),
                               username, system_type);

It seems a bug, since later on the code it's clear that a value of 0 would
disable the thread:

    /*
     * I/O threads are only started if the corresponding ports
     * have been configured with positive numbers. Use 0 to
     * disable the creation of the corresponding thread.
     */
    if (port != 0)
        smpp->transmitter = gwthread_create(io_thread, io_arg_create(smpp,
                                           (transceiver_mode ? 2 : 1)));
    if (receive_port != 0)
        smpp->receiver = gwthread_create(io_thread, io_arg_create(smpp, 0));

... and so on ...

I've solved it changing lines 1884-7 (1886 actually) to:

    conn->name = octstr_format("SMPP:%S:%d/%d:%S:%S",
                      host, port,
                               receive_port,
                               username, system_type);

Here is the .diff:

1885,1888c1885,1888
<                              host, port,
<                                (receive_port ? receive_port : port),
<                                username, system_type);
<
---
>
host, port,
>
receive_port,
>
username, system_type);
>


The only thing I think I'll have to change is the allowed-smsc-id stuff.
Since I can receive messages in both RX connections but I must route for one
of the TX (the one that's working actually), if I set only allowed-smsc-id's
I won?t be able to route a message originally aimed to an smsc-id to the
other isn't it? I mean: If I try to send a message using sendsms interface
and I specify smsc=logica1 and logica1 is dead, the message should be routed
thru logica2.

What about:

#TX-1
group = smsc
smsc = smpp
smsc-id = logica1
denied-smsc-id = "logica1_rx;logica2_rx;"
host = "localhost"
port = 8888
receive-port = 0
smsc-username = "capitan"
smsc-password = "naticap"
system-type = "VMA"

(only posting the relevant changing fields from now on for simplicity)

#RX-1
smsc-id = logica1_rx
denied-smsc-id = "logica1_rx;logica2_rx;"
port = 0
receive-port = 8888

#TX-2
smsc-id = logica2
denied-smsc-id = "logica1_rx;logica2_rx;"
port = 9999
receive-port = 0

#RX-2
smsc-id = logica2_rx
denied-smsc-id = "logica1_rx;logica2_rx;"
port = 0
receive-port = 9999

I think there?s no need to deny the tx links since there's no chance a
message would come from that path.

Best regards,



----- Original Message ----- 
From: "Alexander Malysh" <[EMAIL PROTECTED]>
To: "Alejandro Guerrieri" <[EMAIL PROTECTED]>
Sent: Friday, August 20, 2004 1:52 AM
Subject: Re: Independent RX and TX connections


> Hi again,
>
> this ist just a small status bug ;)
> believe me, it just works...
>
> P.S. pls next time, keep this on ML... thanks
>
> On Friday 20 August 2004 01:16, you wrote:
> > Dear Alexander,
> >
> > Thank you for your prompt reply.
> >
> > I've tried a very similar setup using the SMSC simulator from Logica.
> >
> > group = smsc
> > smsc = smpp
> > smsc-id = logica1
> > host = "localhost"
> > port = 1234
> > receive-port = 0
> > allowed-smsc-id = logica1
> > smsc-username = "capitan"
> > smsc-password = "natipac"
> > system-type = "VMA"
> > reconnect-delay = 15
> >
> > group = smsc
> > smsc = smpp
> > smsc-id = logica2
> > host = "localhost"
> > port = 0
> > receive-port = 1234
> > allowed-smsc-id = logica1
> > smsc-username = "capitan"
> > smsc-password = "natipac"
> > system-type = "VMA"
> > reconnect-delay = 15
> >
> > But I've noticed this issue:
> >
> > On the status page it seems that Kannel refuses to do TX-Only
connections:
> >
> > SMSC connections:
> >     logica1    SMPP:localhost:1234/1234:capitan:VMA (online 101s, rcvd
0,
> > sent 1, failed 0, queued 0 msgs)
> >     logica2    SMPP:localhost:0/1234:capitan:VMA (online 101s, rcvd 0,
sent
> > 0, failed 0, queued 0 msgs)
> >
> > See the first SMSC connection handling 1234/1234 instead of 1234/0.
> >
> > I've tried using the sendsms interface and I am only able to send
messages
> > using the first link. It seems that logica1 "captures" both ports and
> > effectively blocks any traffic going to logica2.
> >
> > Thank you in advance,
> >
> >
> > ----- Original Message -----
> > From: "Alexander Malysh" <[EMAIL PROTECTED]>
> > To: <[EMAIL PROTECTED]>
> > Sent: Thursday, August 19, 2004 11:47 PM
> > Subject: Re: Independent RX and TX connections
> >
> > > Hi,
> > >
> > > just try somethink like this:
> > > #TX SMSC-1
> > > group = smsc
> > > smsc = smpp
> > > smsc-id = SMPP_1
> > > port = 9999
> > > host = 127.0.0.1
> > > receive-port = 0
> > > smsc-username = test
> > > smsc-password = test
> > > system-type = ABC
> > > allowed-smsc-id = SMPP_1
> > >
> > > #RX SMSC-1
> > > group = smsc
> > > smsc = smpp
> > > smsc-id = SMPP_C
> > > port = 0
> > > host = 127.0.0.1
> > > receive-port = 9999
> > > smsc-username = test
> > > smsc-password = test
> > > system-type = ABC
> > > allowed-smsc-id = SMPP_1
> > >
> > > the same for SMSC-2...
> > >
> > > Good luck!
> > >
> > > Alejandro Guerrieri wrote:
> > > > Hi all,
> > > >
> > > > This is my first posting to this list. I've been using the
[EMAIL PROTECTED]
> > > > list a lot during the last months, but it seems that this problem is
> >
> > more
> >
> > > > suitable for this list than for [EMAIL PROTECTED]
> > > >
> > > > I just moved from 1.2.1 to 1.3.2 yesterday and despite being able to
> > > > compile MySQL support (not an issue for me as for today), everything
> >
> > went
> >
> > > > fine.
> > > >
> > > > I am trying to connect to a carrier that demands a somewhat strange
> > > > connection scheme:
> > > >
> > > > 1. The carrier has 2 SMSC running on 2 different IP's, let's call
them
> > > > SMSC-1 and SMSC-2 on 1.1.1.1 and 2.2.2.2.
> > > > 2. I am supposed to have 2 RX connections running continuosly
connected
> > > > (one for each SMSC).
> > > > 3. I am supposed to have at least 1 TX connection. I can have 2 if I
> >
> > want
> >
> > > > _but_ (and here comes the funny part):
> > > >
> > > > 4. If the TX connection drops (or one of them if I have 2), I am
> >
> > supposed
> >
> > > > to bring the other one online inmediatly after noticing it
> > > > (enquire_link_resp not received). If I have both TX connections
> > > > running,
> >
> > I
> >
> > > > should route all traffic on the "good" connection.
> > > >
> > > > I've tried many different patches on 1.2.1 and after a week of
> >
> > frustration
> >
> > > > and madness with some bugs on that version, I've switched to 1.3.2.
It
> > > > solved a great deal of my problems, mainly having to do with the
retry
> > > > connection stuff, but there is one I cannot solve:
> > > >
> > > > * If the TX connection drops, Kannel also drops the RX connection on
> >
> > that
> >
> > > > link.
> > > >
> > > > My question is: Is there any way to "independize" the TX/RX links,
so
> > > > Kannel does not drop the RX when the TX fails? It would be good,
since
> >
> > the
> >
> > > > enquire_link/_resp stuff is already being sent and received in both
> > > > directions.
> > > >
> > > > Is there any patch or workaround to make Kannel work with this kind
of
> > > > situation?
> > > >
> > > > I'm thinking if I set up different SMSC groups for TX and RX, but
there
> >
> > is
> >
> > > > no way I can set an TX-Only connection isn?t it? When I put
port=1234
> >
> > and
> >
> > > > receive-port=0 both get asigned to 1234. I've tried setting
> > > > receive-port
> > > >
> > > > to an arbitrary value (9999) and the TX link goes up, but after a
few
> > > > unsuccessful retries on the 9999 both TX and RX get disconnected.
> > > >
> > > > Thank you in advance,
> > >
> > > --
> > > Thanks,
> > > Alex
>
> -- 
> Thanks,
> Alex
>
>


Reply via email to