Call identifier

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Ok in your on_incoming_call() handler do this:
pjsua_call_get_info(call_id, &call_info);
sprintf(str, "on_incoming_call(): Incoming call 
for account %d, call_id=%d, From: %s, To: %s, inbound network Call-ID=%s\n",
         acc_id, call_id, 
call_info.remote_info.ptr, call_info.local_info.ptr, call_info.call_id.ptr);
printf(str);

The ANI which is the phone number of who called 
you is: call_info.remote_info.ptr the first 10 digits
The name of the caller who called you if provided 
will be in call_info.remote_info.ptr as 
"caller_name" as well.  But will come after the ANI.
The DNIS or the number they called is: call_info.local_info.ptr
And just FYI the Call-ID which is a long string 
that is used to identify messages in the logs 
belonging to this call is given by:
call_info.call_id.ptr


At 09:10 AM 5/18/2009, Daniel Rodrigo de Freitas Apolinario wrote:
>Content-Type: multipart/related; type="multipart/alternative";
>         boundary="----_=_NextPart_001_01C9D7C2.B6B43D24"
>Content-class: urn:content-classes:message
>
>Hello,
>
>When I answer a call, I want to show the number 
>of caller(call identifier). There is a parameter 
>of type string passed to my callback, but it always came back my own number.
>How do I to get the caller identifier? I saw the 
>Sipek SoftPhone always show me my own number in the callings list.
>
>Thanks,
>
>Daniel Apolin?rio.
>
>
>cid:image001.jpg at 01C9230B.EA733140
>
>Daniel Apolin?rio
>Analista de Sistemas
>Fone: 55 (19) 3833-7059
><mailto:daniel.rodrigo at call.inf.br>daniel.rodrigo at call.inf.br www.call.inf.br
>L?der nacional em ?tica, transpar?ncia e respeito ao cliente
>
>
>
>
>_______________________________________________
>Visit our blog: http://blog.pjsip.org
>
>pjsip mailing list
>pjsip at lists.pjsip.org
>http://lists.pjsip.org/mailman/listinfo/pjsip_lists.pjsip.org
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.pjsip.org/pipermail/pjsip_lists.pjsip.org/attachments/20090518/03a07e08/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 326391c5.jpg
Type: image/jpeg
Size: 25233 bytes
Desc: not available
URL: <http://lists.pjsip.org/pipermail/pjsip_lists.pjsip.org/attachments/20090518/03a07e08/attachment-0001.jpg>


[Index of Archives]     [Asterisk Users]     [Asterisk App Development]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [Linux API]
  Powered by Linux