PJSIP capturing additional info in Contact Header

Some Android and iPhone softphones are requesting to be “waken up” before being able to receive a call. This is made by delivering a special info in the Contact header and then requesting that info to be sent to the softphone headquarter.

How can I capture that info?

This is an example registration. The info to be captured is

pn-type=android;pn-token=“ciIUHlHBkak:APA91bHgoXvY0oqIlcRCPsmF9dY4osHG2CpVwVhUQrE5S2p0C7TmqxuoRqcZT7jcmV4Ua9o6E1u6VEI_7iMje4W_lYb4IQ1HkHA0kqvC06ggorJPC-6eo8ZmG67JytEeXYPgNM-hzqsdsmxoYXLnWrKnBGTolgfFXg”

REGISTER sip:netregphone.XXXXXXX.us:5080;transport=UDP SIP/2.0. 
Via: SIP/2.0/UDP 100.81.126.51:43566;rport;branch=z9hG4bKPja170d962-29bb-4f81-a999-4b6a1c17eacd. 
Max-Forwards: 70. 
From: <sip:227-267741-2880@netregphone.XXXXXXX.us>;tag=59f9a5be-3850-4599-a7a6-b3a8d39a696e. 
To: <sip:227-267741-2880@netregphone.XXXXXXX.us>. 
Call-ID: d5ae91ef-304e-4092-a621-d6e988c2c8f1. 
CSeq: 30702 REGISTER. 
User-Agent: Fortinet FortiFone Android 2.1.0.130. 
Contact: <sip:227-267741-2880@XXXXXXX:43566;ob>;pn-type=android;pn-token="ciIUHlHBkak:APA91bHgoXvY0oqIlcRCPsmF9dY4osHG2CpVwVhUQrE5S2p0C7TmqxuoRqcZT7jcmV4Ua9o6E1u6VEI_7iMje4W_lYb4IQ1HkHA0kqvC06ggorJPC-6eo8ZmG67JytEeXYPgNM-hzqsdsmxoYXLnWrKnBGTolgfFXg". 
Expires: 600. 
Allow: PRACK, INVITE, ACK, BYE, CANCEL, UPDATE, INFO, SUBSCRIBE, NOTIFY, REFER, MESSAGE, OPTIONS. 
Content-Length: 0.

Hi @ldardini
did you find out how to retrieve the pn-tok ?

thnx

hmm there is not funktion i Asterisk to support this
my best guess is that you have to setup an Kamailio in front and use that one as a Registrar / Proxy
and configure Kamailio to save that header to a database, and maybe also us it to wake up the phone as well