Setvar Not Executed When Call Comes In Via Registry
Hi,
I have a line like
register => 1yyyyyyy1:xxxxxxxxxxxx@sipconnect.sipgate.de/incoming
in sip.conf, and a corresponding stanza (note especially the final setvar):
[trunk-sipgate]
type=peer
qualify=yes
insecure=invite
language=de
dtmfmode=rfc2833
host=sipconnect.sipgate.de
fromdomain=sipconnect.sipgate.de
fromuser=1yyyyyyy1
defaultuser=1yyyyyyy1
secret=xxxxxxxxxxxx
context=in-trunk-sipgate
session-timers=accept
allow=!all,alaw,ulaw,g726
setvar=FOO=BAR
If I ‘sip show peer trunk-sipgate’, the variable FOO is there.
I also have a stanza for my local SIP phone, e.g.
[0020fe8200de]
; abbreviated
md5secret=abcdabcdabcdabcadbcdabcadbcdabcd
context=in-martin
setvar=DEFAULT_ORIGIN=11
When I make a call with this phone, the dialplan has access to
${DEFAULT_ORIGIN}.
However, when a call comes in through the sipgate trunk and gets routed to the in-trunk-sipgate context, the ${FOO} variable is not set and thus not available from the dialplan.
Am I doing something wrong (* v11.13 on Debian)
Thanks,
One thought on - Setvar Not Executed When Call Comes In Via Registry
also sprach martin f krafft [2015-09-02 14:16 +0200]:
Thanks to [TK]-Fender, we isolated the problem to a different stanza matching the incoming call. :/