[asterisk-users] addressing peers dynamically
Danny Nicholas
danny at debsinc.com
Mon Nov 19 12:00:36 CST 2012
I had a similar problem (I work on 3 lans; when my firewall is down, the two
non-native lans are unaccessible) I wrote an AGI to execute "sip show
peers" and process only the ones that return OK and pass my peer numbers to
the AGI like this -
[dialall]
Exten => s,1,AGI(sipcheck.agi,100,200,300)
exten => s,n,Gotoif($[ "${LEN(${DIAL-100})}" != "7"]?dialall,s,4)
exten => s,n,Set(TODIAL=${TODIAL}'&'${DIAL-100})
exten => s,n,Gotoif($[ "${LEN(${DIAL-200})}" != "7"]?dialall,s,6)
exten => s,n,Set(TODIAL=${TODIAL}'&'${DIAL-200})
exten => s,n,Gotoif($[ "${LEN(${DIAL-300})}" != "7"]?dialall,s,8)
exten => s,n,Set(TODIAL=${TODIAL}'&'${DIAL-300)
exten => s,n,Dial(${TODIAL},40,i,KktTm)
From: asterisk-users-bounces at lists.digium.com
[mailto:asterisk-users-bounces at lists.digium.com] On Behalf Of Andre Gronwald
Sent: Monday, November 19, 2012 2:00 AM
To: asterisk-users
Subject: [asterisk-users] addressing peers dynamically
hi,
in my small setup (just for home usage) i have 5 phones configured. but only
2 of them are permanent connected to asterisk.
nevertheless i want to address beside those two phones other peers if
available. nowadays i address them always, resulting in error messages:
Unable to create channel of type 'SIP' (cause 20 - Subscriber absent)
Is there a way to avoid those messages? I think about something like a
virtual queue (please excuse if the wording is incorrect, i am not in too
deep to asterisk, i am more firm with genesys) that is addressed and peers
are registering to that queue.
is that the right path, or am i barking the wrong tree?
regards,
andre
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-users/attachments/20121119/ec350dbb/attachment.htm>
More information about the asterisk-users
mailing list