[asterisk-users] Re: Ring locally when home or roadwarrior via IAX
when away
Arik Raffael Funke
arik.funke at gmx.de
Mon Nov 6 12:27:15 MST 2006
Anselm Martin Hoffmeister wrote:
> Am Montag, den 06.11.2006, 11:04 +0000 schrieb Arik Raffael Funke:
>> I guess, in short my question reduces to: How do I find the IP adress of
>> a specific iax client?
> With a set of statements like
>
> exten => _5XX,1,Set(IPADDR=${CUT(${DB(SIP/sip${EXTEN})},:,1)})
> exten => _5XX,2,GotoIf($["10.0." = "${IPADDR:0:5}"]?100)
> exten => _5XX,3,GotoIf($["" = "${IPADDR}"]?100)
> exten => _5XX,4,NoOp(Stuff for calling the client via SIP)
> exten => _5XX,100,NoOp(Stuff for calling via the phoneline, cause user
> is local)
>
> This is untested though, but I hope to give you a useful hint here.
Thanks Anselm. Your solution does work for iax as well, except for some
typos. I have it working with following set of commands now, in case
anybody is wondering:
exten => s,1,Set(IPADDR=${CUT(DB(IAX/Registry/arik)|:|1)})
exten => s,2,GotoIf($["192.168.0." = "${IPADDR:0:10}"]?100)
exten => s,3,GotoIf($["" = "${IPADDR}"]?100)
exten => s,4,Dial(${ARIK_WEB},,t)
exten => s,100,Dial(${ARIK},,t)
Note ${ARIK} contains the fixed line channel, ${ARIK_WEB} the IAX
channel. arik is the iax login username.
Regards,
Arik
More information about the asterisk-users
mailing list