Hello, Is it possible to set a variable in dialpan when the someone calls a particular DID number so that i can use that variable for calls coming to that number only. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.digium.com/pipermail/asterisk-users/attachments/20100819/25402ade/attachment.htm
From: asterisk-users-bounces at lists.digium.com [mailto:asterisk-users-bounces at lists.digium.com] On Behalf Of Tino Subject: [asterisk-users] setting variable for a DID number>Hello,>Is it possible to set a variable in dialpan when the someone calls aparticular DID number so that i can use that variable for calls coming to that number only. As you asked the question: Exten => 5551212,1,Set(GLOBAL(TINO)=tino) Will set a variable to be used by any call when the user dials 5551212. If your incoming number is 5551212, you would want to use "ex-girlfriend" logic like this Exten => _X/5551212,n,Set(GLOBAL(TINO)=tino) Sets TINO when incoming line 5551212 rings. That's it for now. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.digium.com/pipermail/asterisk-users/attachments/20100819/4bff37e8/attachment.htm
But when i call my DID number following dialplans are being executed. What i need is to set a variable with one value for one DID number and set the same variable with another value for another DID number. Also any contexts should be able to use this variable. --------- NoOp("SIP/5070-00005407", "Received incoming SIP connection from unknown peer to <DID NUMBER>") in new stack -- Executing [<DID NUMBER>@from-sip-external:2] Set("SIP/5070-00005407", "DID=<DID NUMBER>") in new stack -- Executing [<DID NUMBER>@from-sip-external:3] Goto("SIP/5070-00005407", "s|1") in new stack -- Goto (from-sip-external,s,1) -- Executing [s at from-sip-external:1] GotoIf("SIP/5070-00005407", "1?checklang:noanonymous") in new stack -- Goto (from-sip-external,s,2) -- Executing [s at from-sip-external:2] GotoIf("SIP/5070-00005407", "0?setlanguage:from-trunk|<DID NUMBER>|1") in new stack -- Goto (from-trunk,<DID NUMBER>,1) -- Executing [<DID NUMBER>@from-trunk:1] Set("SIP/5070-00005407", "__FROM_DID=<DID NUMBER>") in new stack -- Executing [<DID NUMBER>@from-trunk:2] Gosub("SIP/5070-00005407", "app-blacklist-check|s|1") in new stack -- Executing [s at app-blacklist-check:1] LookupBlacklist("SIP/5070-00005407", "") in new stack -- Executing [s at app-blacklist-check:2] GotoIf("SIP/5070-00005407", "0?blacklisted") in new stack -- Executing [s at app-blacklist-check:3] Set("SIP/5070-00005407", "CALLED_BLACKLIST=1") in new stack -- Executing [s at app-blacklist-check:4] Return("SIP/5070-00005407", "") in new stack -- Executing [<DID NUMBER>@from-trunk:3] ExecIf("SIP/5070-00005407", "0 |Set|CALLERID(name)=Anonymous") in new stack -- Executing [<DID NUMBER>@from-trunk:4] Set("SIP/5070-00005407", "__CALLINGPRES_SV=allowed_not_screened") in new stack -- Executing [<DID NUMBER>@from-trunk:5] SetCallerPres("SIP/5070-00005407", "allowed_not_screened") ------------ P.S : used <DID NUMBER> in place of actual DID number -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.digium.com/pipermail/asterisk-users/attachments/20100819/e1ffccb4/attachment.htm
On Thu, 19 Aug 2010, Tino wrote:> But when i call my DID number following dialplans are being executed.? > What i need is to set a variable with one value for one DID number and > set the same variable with another value for another DID number. Also > any contexts should be able to use this variable.exten = _x.,n, set(FOO=XXX) exten = _x.,n, execif($["${ANI}" = "5555551212"],set,FOO=YYY}) -- Thanks in advance, ------------------------------------------------------------------------- Steve Edwards sedwards at sedwards.com Voice: +1-760-468-3867 PST Newline Fax: +1-760-731-3000
jzhehd Ksjfyejzhehd Sent from an unlocked GSM Palm Pre Plus on T-Mobile On Aug 19, 2010 12:50 PM, Tino <tino at sparksupport.com> wrote: But when i call my DID number following dialplans are being executed. What i need is to set a variable with one value for one DID number and set the same variable with another value for another DID number. Also any contexts should be able to use this variable. --------- NoOp("SIP/5070-00005407", "Received incoming SIP connection from unknown peer to <DID NUMBER>") in new stack -- Executing [<DID NUMBER>@from-sip-external:2] Set("SIP/5070-00005407", "DID=<DID NUMBER>") in new stack -- Executing [<DID NUMBER>@from-sip-external:3] Goto("SIP/5070-00005407", "s|1") in new stack -- Goto (from-sip-external,s,1) -- Executing [s at from-sip-external:1] GotoIf("SIP/5070-00005407", "1?checklang:noanonymous") in new stack -- Goto (from-sip-external,s,2) -- Executing [s at from-sip-external:2] GotoIf("SIP/5070-00005407", "0?setlanguage:from-trunk|<DID NUMBER>|1") in new stack -- Goto (from-trunk,<DID NUMBER>,1) -- Executing [<DID NUMBER>@from-trunk:1] Set("SIP/5070-00005407", "__FROM_DID=<DID NUMBER>") in new stack -- Executing [<DID NUMBER>@from-trunk:2] Gosub("SIP/5070-00005407", "app-blacklist-check|s|1") in new stack -- Executing [s at app-blacklist-check:1] LookupBlacklist("SIP/5070-00005407", "") in new stack -- Executing [s at app-blacklist-check:2] GotoIf("SIP/5070-00005407", "0?blacklisted") in new stack -- Executing [s at app-blacklist-check:3] Set("SIP/5070-00005407", "CALLED_BLACKLIST=1") in new stack -- Executing [s at app-blacklist-check:4] Return("SIP/5070-00005407", "") in new stack -- Executing [<DID NUMBER>@from-trunk:3] ExecIf("SIP/5070-00005407", "0 |Set|CALLERID(name)=Anonymous") in new stack -- Executing [<DID NUMBER>@from-trunk:4] Set("SIP/5070-00005407", "__CALLINGPRES_SV=allowed_not_screened") in new stack -- Executing [<DID NUMBER>@from-trunk:5] SetCallerPres("SIP/5070-00005407", "allowed_not_screened") ------------ P.S : used <DID NUMBER> in place of actual DID number -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.digium.com/pipermail/asterisk-users/attachments/20100821/4200b9d3/attachment.htm