>that would be great if possible.

>Has someone experience with those stuff?

As Hubert said, I tried with my wavecom,
it's ok.
AT+CLIP=1
OK

RING

+CLIP: "+393479336220",145

RING

+CLIP: "+393479336220",145

So now I'm trying to implerment this in kannel.
Basically I think I have to change (duplicate) pdu_extract,
and give an ATH to close the call after taking the
callerID.
We should also delete from the input buffer all the rings.
It should be something like this:

static int pdu_extract_my(SMSCenter *smsc, Octstr **pdu) {
        Octstr *buffer;
        long len = 0;
        int pos = 0;
        int tmp;

        buffer = smsc->at_inbuffer;
        
        /* find the beginning of a message from the modem*/     
        pos = octstr_search(buffer, octstr_imm("+CLIP:"), 0);
        if(pos == -1) 
                goto nomsg;
        pos += 2;
        
        /* skip the spaces and line return */
        while( isspace(octstr_get_char(buffer, pos)))
                pos++;
        pos -= 5;
        
        /* check if the buffer is long enough to contain the full message 
        if( octstr_len(buffer) < len * 2 + pos)
                goto nomsg; */
        
        /* copy whatever you want (callerId usually) from the input buffer,
            this row has to be  changed*/
        *pdu = octstr_copy(buffer, 0, pos);
        /* delete from the input buffer,
            this row has to be  changed*/

        octstr_delete(buffer, 0, pos);

        return 1;

 nomsg:
        return 0;
}

 


Reply via email to