[pjsip] Message field

César Davi cesargxn at gmail.com
Fri Nov 9 08:32:53 EST 2007


I'm trying to figure out how can I extract the content of each
information field from a generic SIP message .

For instance, the content of "pjsip_rx_data->msg_info" is:

INVITE sip:192.168.1.12;user=phone SIP/2.0
Via: SIP/2.0/UDP 192.168.1.3:5060
From: cisco <sip:Cisco at 192.168.1.3>;tag=1254558838
To: <sip:192.168.1.12;user=phone>
Call-ID: 2453479585 at 192.168.1.3
CSeq: 1 INVITE
Contact: cisco <sip:Cisco at 192.168.1.3:5060;transport=udp>
User-Agent: Cisco-CP7905/1.02-040406A
Allow: ACK, BYE, CANCEL, INVITE, NOTIFY, OPTIONS, REFER, REGISTER
Expires: 300
Content-Length: 278
Content-Type: application/sdp

(sdp info)


What's the best way to get separately each information field (e.g,
caller-Id information, 'TO' information...)?

Is there any function like  pj_sip_get_caller_id_from_message() ?

rgs

Cesar
>




More information about the pjsip mailing list