On 05/27/2010 03:56 PM, dotnetdub wrote:
Not really sure how to extract the RPID from the SIP message sent from the asterisk.
You can get the full header value of any header using the $hdr(...) container[1], e.g.
$hdr(Remote-Party-ID)
There is also a dedicated pseudovariable to expose the URI specifically, so you don't have to parse it out yourself - $re[2].
If you want to extract the user part of it for CDR storage, you can use a URI transformation[3] to pull out that part:
$(re{uri.user})
-- Alex
[1] http://www.kamailio.org/dokuwiki/doku.php/pseudovariables:3.0.x/#headers
[2] http://www.kamailio.org/dokuwiki/doku.php/pseudovariables:3.0.x/#remote-part...
[3] http://www.kamailio.org/dokuwiki/doku.php/transformations:3.0.x#uriuser