# PJSIP capturing additional info in Contact Header

**URL:** <https://community.asterisk.org/t/pjsip-capturing-additional-info-in-contact-header/75286>\
**Category:** Asterisk SIP\
**Created:** [July 13, 2018, 4:45pm UTC](https://community.asterisk.org/t/pjsip-capturing-additional-info-in-contact-header/75286 "2018-07-13T16:45:43Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![ldardini](https://sea1.discourse-cdn.com/asterisk/user_avatar/community.asterisk.org/ldardini/32/48_2.png) [@ldardini](https://community.asterisk.org/u/ldardini)\
**Post date:** [July 13, 2018, 4:45pm UTC](https://community.asterisk.org/t/pjsip-capturing-additional-info-in-contact-header/75286/1 "2018-07-13T16:45:43Z")

</div>

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”

```auto
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.

```

---

<div class="post-metadata">

**Author:** ![NoFate](https://sea1.discourse-cdn.com/asterisk/user_avatar/community.asterisk.org/nofate/32/6511_2.png) [@NoFate](https://community.asterisk.org/u/NoFate)\
**Post date:** [June 14, 2022, 11:42am UTC](https://community.asterisk.org/t/pjsip-capturing-additional-info-in-contact-header/75286/2 "2022-06-14T11:42:07Z")

</div>

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

thnx

---

<div class="post-metadata">

**Author:** ![TheMark](https://sea1.discourse-cdn.com/asterisk/user_avatar/community.asterisk.org/themark/32/4771_2.png) [@TheMark](https://community.asterisk.org/u/TheMark)\
**Post date:** [June 14, 2022, 11:56am UTC](https://community.asterisk.org/t/pjsip-capturing-additional-info-in-contact-header/75286/3 "2022-06-14T11:56:12Z")

</div>

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
