Difference between revisions of "M4 PAI And RPID Header Generation"

From Kolmisoft Wiki
Jump to navigationJump to search
Line 30: Line 30:
RPID Transformation field:
RPID Transformation field:


  /^(.*<sip:[^@]+@)[^>;]+(.*)/\1ngnics.com\2/
  /^(.*<sip:[^@]+@)[^>;]+(.*)/\1myhost.com\2/


Test RPID:
Test RPID:

Revision as of 08:13, 18 December 2025

M4 can generate P-Asserted-Identity (PAI) and Remote-Party-ID (RPID) headers

Usage

Go to Users -> Connection Points, click EDIT on Connection Point. PAI/RPID Transformations are located under Termination Point Signaling Settings.

Rpid pai to tp generation.png

Generation can happen under Generate if missing and Overwrite tabs.

Generation format

Generation string should be either:

Examples

<sip:3701234567@myhost.sip> - simple static generation.
<sip:anonymous@anonymous.invalid> - simple static generation.
<sip:$fU@myhost.sip> - using Kamailio variable $fU to generate a header with the original value from SIP FROM header

PAI Transformation field:

/^(.*<sip:[^@]+@)[^>;]+(.*)/\1myhost.com\2/

Test PAI:

echo '<sip:3701234567@192.168.1.165:5060;user=phone>' | sed -E 's/(.*<sip:[^@]+@)[^>;]+(.*)/\1myhost.com\2/'

Expected output:

<sip:3701234567@myhost.com;user=phone>

RPID Transformation field:

/^(.*<sip:[^@]+@)[^>;]+(.*)/\1myhost.com\2/

Test RPID:

echo '<sip:3701234567@192.168.1.165:5060>;privacy=off;screen=yes' | sed -E 's/(.*<sip:[^@]+@)[^>;]+(.*)/\1myhost.com\2/'

Expected output:

<sip:3701234567@myhost.com>;privacy=off;screen=yes

See also