I do something like this to pull the rn field from the response:
if(t_check_status("302")) {
$var(contact) = $(<reply>hdr(Contact));
$avp(lrn_called) = $(var(contact){nameaddr.uri}{param.value,rn});
}
On Tue, Dec 11, 2018 at 5:24 AM Vishal Pai <[email protected]> wrote:
> Hello All
>
> I am implementing LRN using sip invite how i can get the rn value of
> response received for the request in a variable. What i did is
>
> Invite
>
> SIP/2.0 302 Moved Temporarily
> Via: SIP/2.0/UDP XXX.XX.XX.XXX:5060;branch=z9hG4bK1cc7.f7
> From: "31XXXXXX00" <sip: [email protected]:5060>;tag=
> To: <sip:131XXXXXX01@ XX.XXX.XX.X >;tag=6b20a7d3
> Call-ID: [email protected]:5
> CSeq: 102 INVITE
> *Contact: <sip:131XXXXXX01;rn=131XXXXXX05;npdi@ XX.XXX.XX.X:5060>*
> Location-Info: N
> Content-Length: 0
>
> if(t_check_status("302")) {
> $var(lrn_rpl) = $(<reply>ct.fields(uri){param.value,rn});
> xlog("SCRIPT:LRN Received : $var(lrn_rpl) \n");
> }
>
> Here i am getting NULL value in $var(lrn_rpl) variable.
>
> Can anyone let me know what i am doing wrong here.
>
>
> _______________________________________________
> Users mailing list
> [email protected]
> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>
_______________________________________________
Users mailing list
[email protected]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users