0
votes

Is it possible to store on a variable the sip header from asterisk?

<--- SIP read from UDP:192.168.1.101:5060 ---> BYE sip:[email protected]:5060 SIP/2.0 Via: SIP/2.0/UDP 192.168.1.101:5060;branch=z9hG4bK04B0006fcc7eb2a5c0e From: ;tag=gK0480049d To: "101" ;tag=as0d6cf491 Call-ID: [email protected]:5060 CSeq: 548735 BYE Max-Forwards: 70 transferTarget: sip:[email protected] Content-Length: 0

I wanted to get the value of "transferTarget" => sip:[email protected].

1

1 Answers

0
votes

At current moment chan_sip support only headers from FIRST invite.

Accessible via function SIPHeader( read/write).

There are no realisation for other messages.

Chan_pjsip have HEP interface which allow save ALL traces to sql database(using kamailio), however it not very stable and require some special knowledge/experience for setup.