PJSIP Developer’s Guide
CHAPTER 4: PARSER ......................................................................................................................... 38
4.1 FEATURES ......................................................................................................................................... 38
4.2 FUNCTIONS ....................................................................................................................................... 39
4.2.1 Message Parsing .................................................................................................................... 39
4.2.2 URI Parsing ........................................................................................................................... 39
4.2.3 Header Parsing ...................................................................................................................... 39
4.3 EXTENDING PARSER ........................................................................................................................... 40
CHAPTER 5: MESSAGE BUFFERS .................................................................................................. 41
5.1 RECEIVE DATA BUFFER ..................................................................................................................... 41
5.1.1 Receive Data Buffer Structure ............................................................................................... 41
5.2 TRANSMIT DATA BUFFER (PJSIP_TX_DATA) .......................................................................................... 42
CHAPTER 6: TRANSPORT LAYER ................................................................................................. 43
6.1 TRANSPORT LAYER DESIGN ................................................................................................................ 43
6.1.1 “Class Diagram” .................................................................................................................. 43
6.1.2 Transport Manager ................................................................................................................ 43
6.1.3 Transport Factory .................................................................................................................. 44
6.1.4 Transport .............................................................................................................................. 44
6.2 USING TRANSPORTS ........................................................................................................................... 46
6.2.1 Function Reference ................................................................................................................ 46
6.3 EXTENDING TRANSPORTS .................................................................................................................... 46
6.4 INITIALIZING TRANSPORTS ................................................................................................................... 46
6.4.1 UDP Transport Initialization ................................................................................................ 47
6.4.2 TCP Transport Initialization ................................................................................................. 47
6.4.3 TLS Transport Initialization .................................................................................................. 47
6.4.4 SCTP Transport Initialization ............................................................................................... 47
CHAPTER 7: SENDING MESSAGES ................................................................................................ 48
7.1 SENDING MESSAGES OVERVIEW .......................................................................................................... 48
7.1.1 Creating Messages ................................................................................................................ 48
7.1.2 Sending Messages .................................................................................................................. 48
7.2 FUNCTION REFERENCE ........................................................................................................................ 49
7.2.1 Sending Response .................................................................................................................. 49
7.2.2 Sending Request ..................................................................................................................... 50
7.2.3 Stateless Proxy Forwarding .................................................................................................. 52
7.3 EXAMPLES ........................................................................................................................................ 53
7.3.1 Sending Responses ................................................................................................................. 53
7.3.2 Sending Requests ................................................................................................................... 54
7.3.3 Stateless Forwarding ............................................................................................................. 55
CHAPTER 8: TRANSACTIONS ......................................................................................................... 56
8.1 DESIGN ............................................................................................................................................ 56
8.1.1 Introduction ........................................................................................................................... 56
8.1.2 Timers and Retransmissions .................................................................................................. 56
8.1.3 INVITE Final Response and ACK Request ............................................................................ 56
8.1.4 Incoming ACK Request .......................................................................................................... 57
8.1.5 Server Resolution and Transports ......................................................................................... 57
8.1.6 Via Header ............................................................................................................................. 58
8.2 REFERENCE ....................................................................................................................................... 58
8.2.1 Base Functions ...................................................................................................................... 58
8.2.2 Composite Functions ............................................................................................................. 59
8.3 SENDING STATEFULL RESPONSES ......................................................................................................... 60
8.3.1 Usage Examples .................................................................................................................... 60
8.4 SENDING STATEFULL REQUEST ............................................................................................................ 60
8.4.1 Usage Examples .................................................................................................................... 61
8.5 STATEFULL PROXY FORWARDING ......................................................................................................... 61
8.5.1 Usage Examples .................................................................................................................... 61
CHAPTER 9: AUTHENTICATION FRAMEWORK ....................................................................... 63
Page 5