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

_______________________________________________
--Bandwidth and Colocation provided by Easynews.com --

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

Reply via email to