Re: [asterisk-users] Bug or feature: SIP chanvars not overriden

2009-11-11 Thread Tilghman Lesher
On Wednesday 11 November 2009 14:23:31 Olivier wrote:
> Hello,
>
> Using 1.6.2-rc5, my settings include:
>
> [local-phone](!)
> context=mylocal
> type=friend
> nat=no
> canreinvite=no
> host=dynamic
> qualify=yes
> dtmf=info
> language=fr
> call-limit=5
> subscribecontext=subs
> disallow=all
> allow=alaw
> t38pt_udptl=no
> setvar=accountcode=foo
>
> [168](local-phone)
> defaultuser=168
> secret=pass168
> callerid=John Doe<168>
> mailbox=168
> setvar=longcid=01555
> setvar=accountcode=bar
>
>
> CLI> sip show peer 168
> ...
>   Variables:
>  accountcode = bar
>  longcid = 01555
>  accountcode = foo
>
>
> When running, ${SIPPEER(168,chanvar[accountcode])}) is valued to foo
> (instead of bar).
> Would you rate it as a feature ?

Neither.  It's a misunderstanding on your part of how this all works.  The
equivalent of your entry above is the context:

[168]
context=mylocal
type=friend
nat=no
canreinvite=no
host=dynamic
qualify=yes
dtmf=info
language=fr
call-limit=5
subscribecontext=subs
disallow=all
allow=alaw
t38pt_udptl=no
setvar=accountcode=foo
defaultuser=168
secret=pass168
callerid=John Doe<168>
mailbox=168
setvar=longcid=01555
setvar=accountcode=bar

The FIRST value is the value which takes precedence, not the last.

-- 
Tilghman Lesher
Digium, Inc. | Senior Software Developer
twitter: Corydon76 | IRC: Corydon76-dig (Freenode)
Check us out at: www.digium.com & www.asterisk.org

___
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users


[asterisk-users] Bug or feature: SIP chanvars not overriden

2009-11-11 Thread Olivier
Hello,

Using 1.6.2-rc5, my settings include:

[local-phone](!)
context=mylocal
type=friend
nat=no
canreinvite=no
host=dynamic
qualify=yes
dtmf=info
language=fr
call-limit=5
subscribecontext=subs
disallow=all
allow=alaw
t38pt_udptl=no
setvar=accountcode=foo

[168](local-phone)
defaultuser=168
secret=pass168
callerid=John Doe<168>
mailbox=168
setvar=longcid=01555
setvar=accountcode=bar


CLI> sip show peer 168
...
  Variables:
 accountcode = bar
 longcid = 01555
 accountcode = foo


When running, ${SIPPEER(168,chanvar[accountcode])}) is valued to foo
(instead of bar).
Would you rate it as a feature ?

Regards
___
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users