[SR-Users] Psuedo Variable.

Daniel-Constantin Mierla miconda at gmail.com
Tue Oct 26 13:48:25 CEST 2010


Hello,

$ad is exported by pv module so it should work. Can you try to use $(ad) 
and see if works?

Can you run with -dddd -E and paste the log messages here?

Cheers,
Daniel

On 10/26/10 3:03 AM, David J. wrote:
> Hello List;
>
> I was following along the Kamailio Asterisk Realtime Integration; I 
> modified the script to get it working on Kamailio v 3.1.
>
> One area I had a question about was here...
>
> We have the following block;
>
> # Forward REGISTER to Asterisk
> route[REGFWD] {
>         if(!is_method("REGISTER"))
>         {
>                 return;
>         }
>         $var(rip) = $sel(cfg_get.asterisk.bindip);
>         $uac_req(method)="REGISTER";
>         $uac_req(ruri)="sip:" + $var(rip) + ":" + 
> $sel(cfg_get.asterisk.bindport);
>         $uac_req(furi)="sip:" + $au + "@" + $var(rip);
>         $uac_req(turi)="sip:" + $au + "@" + $var(rip);
>         $uac_req(hdrs)="Contact: <sip:" + $au + "@" + $ad
>                                 + ":" + 
> $sel(cfg_get.kamailio.bindport) + ">\r\n";
>         if($sel(contact.expires) != $null)
>                 $uac_req(hdrs)= $uac_req(hdrs) + "Expires: " + 
> $sel(contact.expires) + "\r\n";
>         else
>                 $uac_req(hdrs)= $uac_req(hdrs) + "Expires: " + 
> $hdr(Expires) + "\r\n";
>         uac_req_send();
> }
>
> If I change the line to read : $uac_req(hdrs)="Contact: <sip:" + $au + 
> "@" + $ad
> from : $uac_req(hdrs)="Contact: <sip:" + $au + "@" + 
> $sel(cfg_get.kamailio.bindip)
>
> I get the following error;
>
> loading modules under 
> /usr/local/kamailio-3.1-proxy/lib/kamailio/modules_k/:/usr/local/kamailio-3.1-proxy/lib/kamailio/modules/
> $ad
>  0(13715) ERROR: <core> [pvapi.c:445]: bad parameters
>  0(13715) : <core> [cfg.y:3409]: parse error in config file 
> /usr/local/kamailio-3.1-proxy/etc/kamailio/kamailio.cfg, line 717, 
> column 48-47: unknown script pseudo variable
> ERROR: bad config file (1 errors)
>
>
> I would imagine that if the "$au" pseudo variable is available the 
> "$ad" variable would be available as well.
>
> Please help point out my mistake.
>
> Thanks.
>
> David.
>
>
>
> _______________________________________________
> SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
> sr-users at lists.sip-router.org
> http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users

-- 
Daniel-Constantin Mierla
http://www.asipto.com




More information about the sr-users mailing list