Hi All,
Kamailio 3
I currently store a default RPID in our database. We allow some asterisk customers to send us the RPID.
I want to store the RPID sent by the customer on the radius record.
We test:
if!(is_present_hf("Remote-Party-ID")) { #RPID Not Set by Asterisk - Will set now from DB append_rpid_hf(); }
Do I use textops to get the RPID that the Asterisk sends and then overwrite what we read from the database?
$avp(s:rpid) = ?
Not really sure how to extract the RPID from the SIP message sent from the asterisk.
TIA. Stephen.
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
On 5/27/10 9:56 PM, dotnetdub wrote:
Hi All,
Kamailio 3
I currently store a default RPID in our database. We allow some asterisk customers to send us the RPID.
I want to store the RPID sent by the customer on the radius record.
We test:
if!(is_present_hf("Remote-Party-ID")) { #RPID Not Set by Asterisk - Will set now from DB append_rpid_hf(); }
Do I use textops to get the RPID that the Asterisk sends and then overwrite what we read from the database?
yes, to delete the received RPID use remove_hf("Remote-Party-ID") from textops.
Cheers, Daniel
$avp(s:rpid) = ?
Not really sure how to extract the RPID from the SIP message sent from the asterisk.
TIA. Stephen.
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list sr-users@lists.sip-router.org http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users