Re: Patch for CPA functionality

Phuah Yee Keat <[email protected]>
Newsgroups gmane.comp.mobile.kannel.devel
Message-ID <[email protected]>
Hi,

 > first of all: what in hell is CPA???

I think if you guys have heard of CPA, I wouldn't need to write one! :-)
CPA is another protocol that is used by one of the local telcos over 
here, the reference website is at
http://cpa.digi.com.my/
http://cpa.digi.com.my/Forum.jsp (this have some pdfs on where this is used)
But seemed that the specs is proprietary, I wonder if there will be any 
problems if I release the specs out over here.

> after short review, I would say, this stuff should go into smsc_http.c. In 
> addition some parts are not done (e.g. smsc_shutdown , this function is 
> responsible for freeing all used memory by the smsc module , that means here 
> is the memory leak!)...

The codes are a quick hack because I need it here. Sad to say I don't 
quite understand a lot of internal stuffs of kannel myself. And I send 
the patch to the mailing list hoping that someone might clean it up for 
me (which I think might not happen!). I will certainly look into the 
smsc_shutdown function!

> Have you tried to implement this stuff within smsc_http? If yes, please 
> explain why this stuff doesn't fit into smsc_http?

Ok, I started off hacking smsc_http.c actually, hoping just to extend it 
and do not touch its core functions, so I tried to just code the 3 
functions:
1. cpa_send_sms
2. cpa_receive_sms
3. cpa_parse_reply
But it have not been long before I realized that CPA need something 
extra, login and session.

Well, basically, for CPA, a session needs to be established, the session 
goes a bit like this
1. kannel send login request
2. telco replies login request,
    if successful, reply a session_timeout, and session_id
3. kannel need to relogin again after session_timeout
4. kannel need to use the session_id to send any MT messages to the telco.

Found myself hacking the core functionalities in http_smsc so much that 
it might just break kannel_http, brunet_http and xidirs_http functions. 
So I just whacked up my own smsc_cpa.c and pray that it is going to be 
integrated coz I am lazy to manage the patches and kannel's daily snapshot.

Cheers,
Phuah Yee Keat
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.