Re: [SR-Users] kamailio.cfg errors with this example from documentation

2018-09-07 Thread Wilkins, Steve
Sorry Alex, you are correct, I spaced that out.

-Original Message-
From: sr-users  On Behalf Of Alex Balashov
Sent: Friday, September 7, 2018 10:57 AM
To: Kamailio (SER) - Users Mailing List 
Subject: Re: [SR-Users] kamailio.cfg errors with this example from documentation

On Fri, Sep 07, 2018 at 02:55:04PM +, Wilkins, Steve wrote:

> Did I miss something, what was your way 

Yes, you clearly did not read my responses. :-)

> $var(x) = $ct;
> $(var(x){s.substr,1,0});

   $var(x) = $ct;
   $dlg_var(callercontact) = $(var(x){s.substr,1,0});

Or in the interest of simplicity:

   $dlg_var(callercontact) = $(ct{s.substr,1,0});

-- 
Alex Balashov | Principal | Evariste Systems LLC

Tel: +1-706-510-6800 / +1-800-250-5920 (toll-free) 
Web: http://www.evaristesys.com/, http://www.csrpswitch.com/

___
Kamailio (SER) - Users Mailing List
sr-users@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
___
Kamailio (SER) - Users Mailing List
sr-users@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users


Re: [SR-Users] kamailio.cfg errors with this example from documentation

2018-09-07 Thread Alex Balashov
On Fri, Sep 07, 2018 at 02:55:04PM +, Wilkins, Steve wrote:

> Did I miss something, what was your way 

Yes, you clearly did not read my responses. :-)

> $var(x) = $ct;
> $(var(x){s.substr,1,0});

   $var(x) = $ct;
   $dlg_var(callercontact) = $(var(x){s.substr,1,0});

Or in the interest of simplicity:

   $dlg_var(callercontact) = $(ct{s.substr,1,0});

-- 
Alex Balashov | Principal | Evariste Systems LLC

Tel: +1-706-510-6800 / +1-800-250-5920 (toll-free) 
Web: http://www.evaristesys.com/, http://www.csrpswitch.com/

___
Kamailio (SER) - Users Mailing List
sr-users@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users


Re: [SR-Users] kamailio.cfg errors with this example from documentation

2018-09-07 Thread Wilkins, Steve
Did I miss something, what was your way 

-Original Message-
From: sr-users  On Behalf Of Alex Balashov
Sent: Friday, September 7, 2018 10:52 AM
To: sr-users@lists.kamailio.org
Subject: Re: [SR-Users] kamailio.cfg errors with this example from documentation

On Fri, Sep 07, 2018 at 02:47:22PM +, Wilkins, Steve wrote:
> Here is what I actually do =>
> 
> $var(x) = $ct;
> $(var(x){s.substr,1,0});
> $dlg_var(callercontact) = $var(x);

Well, you can't do that. You have to do it my way. ;-)

-- 
Alex Balashov | Principal | Evariste Systems LLC

Tel: +1-706-510-6800 / +1-800-250-5920 (toll-free) 
Web: http://www.evaristesys.com/, http://www.csrpswitch.com/

___
Kamailio (SER) - Users Mailing List
sr-users@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
___
Kamailio (SER) - Users Mailing List
sr-users@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users


Re: [SR-Users] kamailio.cfg errors with this example from documentation

2018-09-07 Thread Alex Balashov
On Fri, Sep 07, 2018 at 02:47:22PM +, Wilkins, Steve wrote:
> Here is what I actually do =>
> 
> $var(x) = $ct;
> $(var(x){s.substr,1,0});
> $dlg_var(callercontact) = $var(x);

Well, you can't do that. You have to do it my way. ;-)

-- 
Alex Balashov | Principal | Evariste Systems LLC

Tel: +1-706-510-6800 / +1-800-250-5920 (toll-free) 
Web: http://www.evaristesys.com/, http://www.csrpswitch.com/

___
Kamailio (SER) - Users Mailing List
sr-users@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users


Re: [SR-Users] kamailio.cfg errors with this example from documentation

2018-09-07 Thread Wilkins, Steve
Here is what I actually do =>

$var(x) = $ct;
$(var(x){s.substr,1,0});
$dlg_var(callercontact) = $var(x);

-Original Message-
From: sr-users  On Behalf Of Alex Balashov
Sent: Friday, September 7, 2018 10:41 AM
To: sr-users@lists.kamailio.org
Subject: Re: [SR-Users] kamailio.cfg errors with this example from documentation

If I understand you correctly, you're saying ...

   $dlg_var(x) = $(var(x){s.substr,1,0});

doesn't work?

Bear in mind you can't just copy and paste the example. This, from the example, 
will not work:

   $(var(x){s.substr,1,0});

... because Kamailio's grammar doesn't allow for it.

-- Alex

On Fri, Sep 07, 2018 at 02:36:50PM +, Wilkins, Steve wrote:

> Yes, I  will assign it to
> $dlg_var(X) = $var(x);
> 
> -Original Message-
> From: sr-users  On Behalf Of Alex 
> Balashov
> Sent: Friday, September 7, 2018 10:31 AM
> To: Kamailio (SER) - Users Mailing List 
> Subject: Re: [SR-Users] kamailio.cfg errors with this example from 
> documentation
> 
> On Fri, Sep 07, 2018 at 02:20:11PM +, Wilkins, Steve wrote:
> 
> > 0(1) CRITICAL:  [core/cfg.y:3489]: yyerror_at(): parse 
> > error in config file /usr/local/etc/kamailio/kamailio.cfg, line 827, 
> > column
> > 1-23: pvar with transformations in assignment left side
> 
> This is the real issue. Are you doing anything with the transformed value, 
> like storing it in another variable? It cannot exist as a free-floating 
> statement.
> 
> --
> Alex Balashov | Principal | Evariste Systems LLC
> 
> Tel: +1-706-510-6800 / +1-800-250-5920 (toll-free)
> Web: http://www.evaristesys.com/, http://www.csrpswitch.com/
> 
> ___
> Kamailio (SER) - Users Mailing List
> sr-users@lists.kamailio.org
> https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
> ___
> Kamailio (SER) - Users Mailing List
> sr-users@lists.kamailio.org
> https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users

--
Alex Balashov | Principal | Evariste Systems LLC

Tel: +1-706-510-6800 / +1-800-250-5920 (toll-free)
Web: http://www.evaristesys.com/, http://www.csrpswitch.com/

___
Kamailio (SER) - Users Mailing List
sr-users@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
___
Kamailio (SER) - Users Mailing List
sr-users@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users


Re: [SR-Users] kamailio.cfg errors with this example from documentation

2018-09-07 Thread Alex Balashov
If I understand you correctly, you're saying ...

   $dlg_var(x) = $(var(x){s.substr,1,0});

doesn't work?

Bear in mind you can't just copy and paste the example. This, from the
example, will not work:

   $(var(x){s.substr,1,0});

... because Kamailio's grammar doesn't allow for it.

-- Alex

On Fri, Sep 07, 2018 at 02:36:50PM +, Wilkins, Steve wrote:

> Yes, I  will assign it to 
> $dlg_var(X) = $var(x);
> 
> -Original Message-
> From: sr-users  On Behalf Of Alex 
> Balashov
> Sent: Friday, September 7, 2018 10:31 AM
> To: Kamailio (SER) - Users Mailing List 
> Subject: Re: [SR-Users] kamailio.cfg errors with this example from 
> documentation
> 
> On Fri, Sep 07, 2018 at 02:20:11PM +, Wilkins, Steve wrote:
> 
> > 0(1) CRITICAL:  [core/cfg.y:3489]: yyerror_at(): parse error 
> > in config file /usr/local/etc/kamailio/kamailio.cfg, line 827, column
> > 1-23: pvar with transformations in assignment left side
> 
> This is the real issue. Are you doing anything with the transformed value, 
> like storing it in another variable? It cannot exist as a free-floating 
> statement.
> 
> --
> Alex Balashov | Principal | Evariste Systems LLC
> 
> Tel: +1-706-510-6800 / +1-800-250-5920 (toll-free)
> Web: http://www.evaristesys.com/, http://www.csrpswitch.com/
> 
> ___
> Kamailio (SER) - Users Mailing List
> sr-users@lists.kamailio.org
> https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
> ___
> Kamailio (SER) - Users Mailing List
> sr-users@lists.kamailio.org
> https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users

-- 
Alex Balashov | Principal | Evariste Systems LLC

Tel: +1-706-510-6800 / +1-800-250-5920 (toll-free) 
Web: http://www.evaristesys.com/, http://www.csrpswitch.com/

___
Kamailio (SER) - Users Mailing List
sr-users@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users


Re: [SR-Users] kamailio.cfg errors with this example from documentation

2018-09-07 Thread Wilkins, Steve
Yes, I  will assign it to 
$dlg_var(X) = $var(x);

-Original Message-
From: sr-users  On Behalf Of Alex Balashov
Sent: Friday, September 7, 2018 10:31 AM
To: Kamailio (SER) - Users Mailing List 
Subject: Re: [SR-Users] kamailio.cfg errors with this example from documentation

On Fri, Sep 07, 2018 at 02:20:11PM +, Wilkins, Steve wrote:

> 0(1) CRITICAL:  [core/cfg.y:3489]: yyerror_at(): parse error 
> in config file /usr/local/etc/kamailio/kamailio.cfg, line 827, column
> 1-23: pvar with transformations in assignment left side

This is the real issue. Are you doing anything with the transformed value, like 
storing it in another variable? It cannot exist as a free-floating statement.

--
Alex Balashov | Principal | Evariste Systems LLC

Tel: +1-706-510-6800 / +1-800-250-5920 (toll-free)
Web: http://www.evaristesys.com/, http://www.csrpswitch.com/

___
Kamailio (SER) - Users Mailing List
sr-users@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
___
Kamailio (SER) - Users Mailing List
sr-users@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users


Re: [SR-Users] kamailio.cfg errors with this example from documentation

2018-09-07 Thread Alex Balashov
On Fri, Sep 07, 2018 at 02:20:11PM +, Wilkins, Steve wrote:

> 0(1) CRITICAL:  [core/cfg.y:3489]: yyerror_at(): parse error
> in config file /usr/local/etc/kamailio/kamailio.cfg, line 827, column
> 1-23: pvar with transformations in assignment left side

This is the real issue. Are you doing anything with the transformed
value, like storing it in another variable? It cannot exist as a
free-floating statement.

-- 
Alex Balashov | Principal | Evariste Systems LLC

Tel: +1-706-510-6800 / +1-800-250-5920 (toll-free) 
Web: http://www.evaristesys.com/, http://www.csrpswitch.com/

___
Kamailio (SER) - Users Mailing List
sr-users@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users