Pjsip sip header configuration

I use Sip in my ios projects and siphon classes on top of pjsip sdk .

I have no problems with the basic configuration , and therefore I need to add some user data to my sip header whenever I take a sip.

I have the following header format

pjsua_core.c. TX 1123 bytes Request msg INVITE / cseq = 31730 (tdta0x92aa400) in UDP xxxxx: 5060:

INVITE sip: xxx9 @xxxxxx SIP / 2.0

Via: SIP / 2.0 / UDP xxxxx: xxx; rport branch = z9hG4bKPjt.fUN05fzpwxbm5zJvjoGSA.bnLvoAHl

Max. forward: 70

From: sip: xxxx @xxxxx; tag = d1Ww0T4iQNqygphKlqLQ.iNcYx-Cdsb2

To: sip: xxxx @xxxxxxxx

Contact:

Call-ID: a3zCaQtWPsnKrlbyYtLwwhUQgxnLs8hv

CSeq: 31730 INVITE

Allow: PRACK, INVITE, ACK, BYE, CANCEL, UPDATE, SIGN, NOTIFICATION, REFEREE, MESSAGE, OPTIONS

Supported: replace, 100rel, timer, norefersub

Session-Expires: 1800

Min-SE: 90

User-Agent: Siphon PjSip v2.0.1svn / arm-apple-darwin9

; sdsd: BLABLABLA

Content-Type: application / sdp

Content-Length: 448

v = 0

o = - 3563345387 3563345387 V IP4 192.168.1.3

S = pjmedia

B = AC: 84

t = 0 0

a = X-physical: 0

m = audio 40,000 RTP / AVP 98 97 99 104 3 0 8 96

c = IN IP4 192.168.1.3

B = TIAS: 64000

a = rtcp: 40001 IN IP4 192.168.1.3

a = SendRecv

a = rtpmap: 98 speex / 16000

a = rtpmap: 97 speex / 8000

a = rtpmap: 99 speex / 32000

a = rtpmap: 104 iLBC / 8000

a = fmtp: 104 mode = 30

a = rtpmap: 3 GSM / 8000

a = rtpmap: 0 PCMU / 8000

a = rtpmap: 8 PCMA / 8000

a = rtpmap: 96 phone-event / 8000

a = fmtp: 96 0-15

- end msg -

I want to change the following two lines

From: sip: xxxx @xxxxx; tag = d1Ww0T4iQNqygphKlqLQ.iNcYx-Cdsb2

To: sip: xxxx @xxxxxxxx

to look like this

From: sip: xxxx @xxxxx; tag = d1Ww0T4iQNqygphKlqLQ.iNcYx-Cdsb2; textid = 1; texfrom = 2; textto = 4

To: sip: xxxx @xxxxxxxx

just.

Please give some clarity.

+4
source share
1 answer

pjsip uses the pjsua_call_make_call API to make a call. Inside, it creates a dialog with a call to pjsip_dlg_create_uac . You can pass your custom headers to this API. More info here

0
source

All Articles