reading sip-response-header in pjsua2

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

 



Hi there,

I'm currently porting my software (Python) from pjsua to pjsua2 and I 
can't figure out, how or where to read the SIP-Header of the 
SIP-Response in the following case:

- local client does an outgoing call
- SIP-Response RINGING (180) comes back. I need to read the 
"P-Asserted-Identity: - header"!

In PJSUA1, i did this in the CallCallback.on_state2(rdata)-event, which 
was my own contribution to the project.
Now I am missing this possibility in the PJSUA2-API.
I thought, that the Call::onCallState or the Call::onCallTsxState 
-params contain a [OnCallState(Tsx)Param / SipEvent / RxMsgEvent / 
SipRxData ... ], but there is no such object in the DOM at runtime. 
(Maybe a bug in the API?)

Can please someone give me a hint or a code snippet?

Example SIP-Response from Logfile:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
RX 592 bytes Response msg 180/INVITE/cseq=23233 (rdata0x7f1e4406a238) 
from UDP 10.225.64.200:5060:
SIP/2.0 180 Ringing
Via: SIP/2.0/UDP 
10.120.64.30:5066;branch=z9hG4bKPjf87e8cc1-c85d-4828-bc16-319b9c908cb3;received=10.120.64.30;rport=5066
 From: sip:2013@10.225.64.200;tag=e3a6bdcb-02c9-46ea-ba38-e4693530d1d5
To: sip:2012 at 10.225.64.200;tag=as4e398c03
Call-ID: b8f53f43-a676-462c-bb02-e9c3d22714d4
CSeq: 23233 INVITE
Server: Asterisk Gemeinschaft
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, 
INFO, PUBLISH
Supported: replaces, timer
Contact: <sip:2012 at 10.225.64.200:5060>
P-Asserted-Identity: "Doe, John" <sip:2012 at 10.225.64.200>
Content-Length: 0


--end msg--
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

thanks in advance
Niels Klaas



[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