Discussion:
Getting the PartyNumber of an incoming call
(too old to reply)
s***@processingsystems.de
2009-06-12 18:20:50 UTC
Permalink
Hi there,

uhm I've a problem.
I've written an application that shows the user which number is
calling.

It works perfectly on a normal telephone system. But if I try to get
the number from a PBX ( Private Branch Exchange ) (its the system on
which you need to dial a "0" (in germany) before dialing the proper
number) I get no response from CONNECT_IND_CALLINGPARTYNUMBER. Just
don't know why.

Here the code in question:


LISTEN_REQ_HEADER(&CMSG, Appl_Id, 0, 1);
LISTEN_REQ_INFOMASK(&CMSG) = 0xffff;
LISTEN_REQ_CIPMASK(&CMSG) = ALL_SERVICES;

CAPI_PUT_CMSG(&CMSG);

QVariant str = CAPI_GET_CMSG(&CMSG,Appl_Id);

if (str != "4356" && i == true) {

QVariant var = (char *)CONNECT_IND_CALLINGPARTYNUMBER; //should hold
the calling number
....


Thnaks for your held in advance.
Greetings: Stefan Reinhardt
Michael Hampicke
2009-06-12 22:38:30 UTC
Permalink
Post by s***@processingsystems.de
uhm I've a problem.
I've written an application that shows the user which number is
calling.
It works perfectly on a normal telephone system. But if I try to get
the number from a PBX ( Private Branch Exchange ) (its the system on
which you need to dial a "0" (in germany) before dialing the proper
number) I get no response from CONNECT_IND_CALLINGPARTYNUMBER. Just
don't know why.
Hey,

maybe you're PBX only provides empty Calling/Called party numbers?

Anyway, I am having troubles to understand you're code.
You generate a LISTEN_REQ with CIPMASK = ALL_SERVICES. Allright, then
you send your message to CAPI.
After that you call CAPI_GET_CMSG and check if the return value is !=
4356. I guess with 4356 you mean "0x1104 Queue is empty"

So, if the Queue is not empty and i is TRUE (what is i?) you assume that
str contains a CAPI_CONNECT_IND message (wich also would contain the
calling party number). But how do you know that? It could be any other
message, like LISTEN_REQ_CONF or DISCONNECT_IND.

So my guess is you are expecting a message (CAPI_CONNECT_IND) but you're
not getting it but another message. And because of that you are not able
to get the calling party number :-)

Regards, Michael
CHW
2009-06-13 09:59:53 UTC
Permalink
Hi,


maybe you get the called number / dialed digits via overlap receiving
(look at the INFO_IND) which contains the number or
a part of the number (extension)...

If the calling number is restricted, the struct will not show any
number otherwise the struct contains the whole number
(the calling one is the easiest one ;-) )...


I also advise to take a look at the second calling party number
(network provided) ...



Kind regards


Christian
s***@processingsystems.de
2009-06-13 14:44:37 UTC
Permalink
Hi,
thanks to you both for your fast answer.

To Michael Hampicke:
The PBX provides recieving and transmitting the calling number (the
demo32 from the adk works)

some words to the code:

"i" is a bool that makes sure that the correct gui is loaded (for
debugging it's always true)

And yes, 4356 proofs if the queue isn't empty. Hereabout is to say
that I'm workin' with the capi adk the first time and it was the first
idea I had to catch a signal.
Anyway, if str turns to "0" and It's because I'm or somone else is
calling, the CallingPartyNumber stays empty on a PBX.
So from here on I just haven't got a clue how to go on.

To Christian:

Many thanks for your EMail. I'll write you back soon.

Further on: How is it possible to get the calling number from
INFO_IND, and how do I get the second calling party number (both are
named callingpartynumber) ?

Regards: Stefan Reinhardt

Loading...