hello,
i need to get the Remote-Party-ID in the header. I have that: Remote-Party-ID: "francois bgz" sip:170725014@217.64.x.x:5067;screen=yes;privacy=off;party=calling;-call-i nitiator=5016;-call-initiator-location=int;-redirected-by;-int-ext=5016;-ent -name=Acro;-direction=ext;-call-id=55665.
I need to have -ent-name=Acro but, when I use $re, I have sip:170725014@217.64.x.x:5067
how can I do ?
thank you
Cordialement,
BERGANZ François
P Pensez à l'Environnement, n'imprimez ce mail que si nécessaire.
On Thursday 12 February 2009, BERGANZ François wrote:
i need to get the Remote-Party-ID in the header. I have that: Remote-Party-ID: "francois bgz" sip:170725014@217.64.x.x:5067;screen=yes;privacy=off;party=calling;-call- i nitiator=5016;-call-initiator-location=int;-redirected-by;-int-ext=5016;-en t -name=Acro;-direction=ext;-call-id=55665.
I need to have -ent-name=Acro but, when I use $re, I have sip:170725014@217.64.x.x:5067
how can I do ?
Hi,
the '$re' returns only to the remote-party URI. But you can use $hdr(Remote-Party-ID), and then use a transformation to split the content further.
Cheers,
Henning
On 02/12/2009 01:23 PM, Henning Westerholt wrote:
On Thursday 12 February 2009, BERGANZ François wrote:
i need to get the Remote-Party-ID in the header. I have that: Remote-Party-ID: "francois bgz" sip:170725014@217.64.x.x:5067;screen=yes;privacy=off;party=calling;-call- i nitiator=5016;-call-initiator-location=int;-redirected-by;-int-ext=5016;-en t -name=Acro;-direction=ext;-call-id=55665.
I need to have -ent-name=Acro but, when I use $re, I have sip:170725014@217.64.x.x:5067
how can I do ?
Hi,
the '$re' returns only to the remote-party URI. But you can use $hdr(Remote-Party-ID), and then use a transformation to split the content further.
to complete this, the upcoming 1.5.0 does have some new stuff that helps a lot in such case: - the tobody transformation to get the params part: http://www.kamailio.org/dokuwiki/doku.php/transformations:devel#to-body_tran... - and param transformation to get the value: http://www.kamailio.org/dokuwiki/doku.php/transformations:devel#parameters_l...
In case of something more complex to parse and extract, the re.subst transformation can be used: http://www.kamailio.org/dokuwiki/doku.php/transformations:devel#regular_expr...
Cheers, Daniel