RE: [asterisk-users] Match a Numer - then continue with dialplan
-Original Message- From: Tzafrir Cohen [mailto:[EMAIL PROTECTED] Sent: Tuesday, December 19, 2006 10:18 PM To: Asterisk Users Mailing List - Non-Commercial Discussion Subject: Re: [asterisk-users] Match a Numer - then continue with dialplan On Tue, Dec 19, 2006 at 05:19:57PM -0700, Douglas Garstang wrote: -Original Message- From: Watkins, Bradley [mailto:[EMAIL PROTECTED] Sent: Tuesday, December 19, 2006 4:16 PM To: Asterisk Users Mailing List - Non-Commercial Discussion Subject: RE: [asterisk-users] Match a Numer - then continue with dialplan Please correct me if I'm misunderstanding your requirements, but see below (inline) for what I would do: -Original Message- [snip] [coo1_CallStart] include = coo1_OnNet include = syst_OnNet include = syst_OffNet Instead of including your system-wide logic for offnet calling, introduce a per-company offnet and include that instead: [coo1_CallStart] include = coo1_OnNet include = syst_OnNet include = coo1_OffNet [coo1_OffNet] exten = _X.,1,Set(CALLERID(NUM)=3254000) exten = _X.,2,Set(CALLERID(NUM)=Widgets Inc.) exten = _X.,3,Goto(syst_OffNet,${EXTEN},1) Bradley, If I do this, then I can no longer continue with further extensions in my dialplan as Asterisk has already matched a number. An explicit WaitExten? No I don't want the user to have to enter another number. Processing should continue with the original number dialled. *sigh* Doug. ___ --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
RE: [asterisk-users] Match a Numer - then continue with dialplan
[snip] [coo1_CallStart] include = coo1_OnNet include = syst_OnNet include = syst_OffNet Instead of including your system-wide logic for offnet calling, introduce a per-company offnet and include that instead: [coo1_CallStart] include = coo1_OnNet include = syst_OnNet include = coo1_OffNet [coo1_OffNet] exten = _X.,1,Set(CALLERID(NUM)=3254000) exten = _X.,2,Set(CALLERID(NUM)=Widgets Inc.) exten = _X.,3,Goto(syst_OffNet,${EXTEN},1) Bradley, If I do this, then I can no longer continue with further extensions in my dialplan as Asterisk has already matched a number. I still need to check black/white lists, set pic codes and rate centers, 4 digit extensions etc within the company context. I just need to set the caller id and then move on. If I goto over to ${EXTEN} within syst_OffNet, I'd have to put ALL this logic within that extension, which would mean potentiall several hundred priorities. Asterisk really does need a way to match a number, execute some code, and then go back to looking for extensions. Why not do something like this (in pseudo dialplan): matching and initial dialplan stuff decide the outgoing callerid should change SetVar(outgoing_callerid=1234567) continue with dialplan and do all kinds of weird things Set(CALLERID(NUM)=${outgoing_callerid}) Dial(outgoing destination) This will not screw up your extesnions matching, but you will need to check that outgoing_callerid has been filled before setting callerid (or make sure it is always filled with something sensible). Check the variables page in the wiki on exact syntax ;-) -- Andreas SikkemaBBeyond Software EngineerPlaneetbaan 4 +31 (0)23 70743422132 HZ Hoofddorp ___ --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
RE: [asterisk-users] Match a Numer - then continue with dialplan
-Original Message- From: Andreas Sikkema [mailto:[EMAIL PROTECTED] Sent: Wednesday, December 20, 2006 9:08 AM To: Asterisk Users Mailing List - Non-Commercial Discussion Subject: RE: [asterisk-users] Match a Numer - then continue with dialplan [snip] [coo1_CallStart] include = coo1_OnNet include = syst_OnNet include = syst_OffNet Instead of including your system-wide logic for offnet calling, introduce a per-company offnet and include that instead: [coo1_CallStart] include = coo1_OnNet include = syst_OnNet include = coo1_OffNet [coo1_OffNet] exten = _X.,1,Set(CALLERID(NUM)=3254000) exten = _X.,2,Set(CALLERID(NUM)=Widgets Inc.) exten = _X.,3,Goto(syst_OffNet,${EXTEN},1) Bradley, If I do this, then I can no longer continue with further extensions in my dialplan as Asterisk has already matched a number. I still need to check black/white lists, set pic codes and rate centers, 4 digit extensions etc within the company context. I just need to set the caller id and then move on. If I goto over to ${EXTEN} within syst_OffNet, I'd have to put ALL this logic within that extension, which would mean potentiall several hundred priorities. Asterisk really does need a way to match a number, execute some code, and then go back to looking for extensions. Why not do something like this (in pseudo dialplan): matching and initial dialplan stuff decide the outgoing callerid should change Ok... SetVar(outgoing_callerid=1234567) Bzzt. In order to call SetVar, I have to match the extension dialled. When that happens, there is NO WAY to continue searching the dialplan after that point for another extension to match. continue with dialplan and do all kinds of weird things Can only continue within the current proirity... which means that at this point, all my further logic has to be coded as priorities in the extension that called SetVar. Seeing as though I have several dozen more contexts to include, this isn't feesible. Set(CALLERID(NUM)=${outgoing_callerid}) Dial(outgoing destination) This will not screw up your extesnions matching, but you will need to check that outgoing_callerid has been filled before setting callerid (or make sure it is always filled with something sensible). Thanks for trying. ___ --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
RE: [asterisk-users] Match a Numer - then continue with dialplan
Bzzt. In order to call SetVar, I have to match the extension dialled. When that happens, there is NO WAY to continue searching the dialplan after that point for another extension to match. You can't use a generic extension and search a database table for $EXTEN - callerid relation and then set it? Your diallingplan is _so_ different to what we do, yet what you want to do is pretty much the same to what we do all the time. But our Asterisk boxes have _no_ sip CPE's registered to them and our diallingplan is littered with database lookups. We have no static stuff in our dialingplan. And we have quite a number of users. But no queues etc. -- Andreas SikkemaBBeyond Software EngineerPlaneetbaan 4 +31 (0)23 70743422132 HZ Hoofddorp ___ --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
Re: [asterisk-users] Match a Numer - then continue with dialplan
On 20/12/06, Douglas Garstang [EMAIL PROTECTED] wrote: Bzzt. In order to call SetVar, I have to match the extension dialled. When that happens, there is NO WAY to continue searching the dialplan after that point for another extension to match. Can you not use either Goto or the Local channel, maybe a combination, to restart the dialplan with your variable set? (Might need a _ or two on the variable name to get it to survive) Peter -- Peter Bowyer Email: [EMAIL PROTECTED] ___ --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
RE: [asterisk-users] Match a Numer - then continue with dialplan
-Original Message- From: Andreas Sikkema [mailto:[EMAIL PROTECTED] Sent: Wednesday, December 20, 2006 9:42 AM To: Asterisk Users Mailing List - Non-Commercial Discussion Subject: RE: [asterisk-users] Match a Numer - then continue with dialplan Bzzt. In order to call SetVar, I have to match the extension dialled. When that happens, there is NO WAY to continue searching the dialplan after that point for another extension to match. You can't use a generic extension and search a database table for $EXTEN - callerid relation and then set it? Yes, I can do that. However, in order to do all that, I have to match an extension first. Same problem as before. Your diallingplan is _so_ different to what we do, yet what you want to do is pretty much the same to what we do all the time. I dunno about that. I think we're the only crazy ones offering company masked caller id, or else there'd be lots of people asking how to do it. But our Asterisk boxes have _no_ sip CPE's registered to them and our diallingplan is littered with database lookups. We have no static stuff in our dialingplan. And we have quite a number of users. If you have no statuc stuff in your dialplan, how do you use the 'include =' statement? We don't have users... we have companies. It's a hosted IPT service... and to make the problem even more insane, each company has multiple levels of organisational structure. ___ --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
Re: [asterisk-users] Match a Numer - then continue with dialplan
Douglas Garstang wrote: Anyone know if there's a way to match a dialplan extension, execute some code, say set a variable, and then continue with the dialplan? I want to set a variable when the dialplan flows beyond a certain context. This would be a great feature. Match dialed digits of 668 exten = 669,1,Set(FNORD=bob) exten = 669,2,AGI(eris.pm) exten = 669,3,More Stuff Here/ ___ --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
RE: [asterisk-users] Match a Numer - then continue with dialplan
-Original Message- From: Peter Bowyer [mailto:[EMAIL PROTECTED] Sent: Wednesday, December 20, 2006 9:44 AM To: Asterisk Users Mailing List - Non-Commercial Discussion Subject: Re: [asterisk-users] Match a Numer - then continue with dialplan On 20/12/06, Douglas Garstang [EMAIL PROTECTED] wrote: Bzzt. In order to call SetVar, I have to match the extension dialled. When that happens, there is NO WAY to continue searching the dialplan after that point for another extension to match. Can you not use either Goto or the Local channel, maybe a combination, to restart the dialplan with your variable set? (Might need a _ or two on the variable name to get it to survive) The Goto() command requires priority (extension, context). I'd need to jump to a context, without supplying an extension, which it won't accept. If I pass a priority, we're right back at square one, we're I'm stuck in a priority and can't get back to an extension. I tried putting a Dial(Local/${EXTEN}), but the problem was that Asterisk then went into an infinite when I tried to include all the company contexts together (because it was matching the Dial/Local again). ___ --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
Re: [asterisk-users] Match a Numer - then continue with dialplan
Douglas Garstang wrote: -Original Message- From: David Thomas [mailto:[EMAIL PROTECTED] Sent: Tuesday, December 19, 2006 3:01 PM To: Asterisk Users Mailing List - Non-Commercial Discussion Subject: Re: [asterisk-users] Match a Numer - then continue with dialplan On 12/19/06, Douglas Garstang [EMAIL PROTECTED] wrote: Anyone know if there's a way to match a dialplan extension, execute some code, say set a variable, and then continue with the dialplan? I want to set a variable when the dialplan flows beyond a certain context. This would be a great feature. Doug. Have you tried using the SetVar cmd? I haven't tried it but it sounds like it might work for this. http://www.voip-info.org/wiki/view/Asterisk+variables Regards, David David, If I call setvar, my variable will be set, but dialplan processing will stop... Then something else is wrong. SetVar will not stop dialplan processing. In 1.4, I believe SetVar() was removed. Check upgrade.txt. Use Set in 1.4 instead. ___ --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
RE: [asterisk-users] Match a Numer - then continue with dialplan
-Original Message- From: Eric ManxPower Wieling [mailto:[EMAIL PROTECTED] Sent: Wednesday, December 20, 2006 10:17 AM To: Asterisk Users Mailing List - Non-Commercial Discussion Subject: Re: [asterisk-users] Match a Numer - then continue with dialplan Douglas Garstang wrote: Anyone know if there's a way to match a dialplan extension, execute some code, say set a variable, and then continue with the dialplan? I want to set a variable when the dialplan flows beyond a certain context. This would be a great feature. Match dialed digits of 668 exten = 669,1,Set(FNORD=bob) exten = 669,2,AGI(eris.pm) exten = 669,3,More Stuff Here/ Ugh. 'More Stuff Here' isn't what I need Eric. I need to continue the dialplan. I need do be able to continue to search for extensions. All I want to do is set the callerid, so that later on, when we find a match, the extension can be dialled with the new caller id already set. This ain't gonna work... exten = 669,1,Set(FNORD=bob) exten = 669,2,AGI(eris.pm) exten = 669,3,include = blacklist exten = 669,3,include = blacklist exten = 669,3,include = blacklist exten = 669,3,include = blacklist ___ --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
RE: [asterisk-users] Match a Numer - then continue with dialplan
-Original Message- From: Douglas Garstang Sent: Wednesday, December 20, 2006 10:54 AM To: 'Asterisk Users Mailing List - Non-Commercial Discussion' Subject: RE: [asterisk-users] Match a Numer - then continue with dialplan -Original Message- From: Eric ManxPower Wieling [mailto:[EMAIL PROTECTED] Sent: Wednesday, December 20, 2006 10:17 AM To: Asterisk Users Mailing List - Non-Commercial Discussion Subject: Re: [asterisk-users] Match a Numer - then continue with dialplan Douglas Garstang wrote: Anyone know if there's a way to match a dialplan extension, execute some code, say set a variable, and then continue with the dialplan? I want to set a variable when the dialplan flows beyond a certain context. This would be a great feature. Match dialed digits of 668 exten = 669,1,Set(FNORD=bob) exten = 669,2,AGI(eris.pm) exten = 669,3,More Stuff Here/ Ugh. 'More Stuff Here' isn't what I need Eric. I need to continue the dialplan. I need do be able to continue to search for extensions. All I want to do is set the callerid, so that later on, when we find a match, the extension can be dialled with the new caller id already set. This ain't gonna work... exten = 669,1,Set(FNORD=bob) exten = 669,2,AGI(eris.pm) exten = 669,3,include = blacklist exten = 669,3,include = blacklist exten = 669,3,include = blacklist exten = 669,3,include = blacklist Dang it. My fat fingers posted too soon by mistake. As I was trying to say, This obviously won't work... exten = 669,1,Set(FNORD=bob) exten = 669,2,AGI(eris.pm) exten = 669,3,include = blacklist exten = 669,4,include = whitelist exten = 669,5,include = PIC_Code_Insertion exten = 669,6,include = Rate_Center_Insertion exten = 669,7,include = Findme/Followme ___ --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
RE: [asterisk-users] Match a Numer - then continue with dialplan
-Original Message- From: Eric ManxPower Wieling [mailto:[EMAIL PROTECTED] Sent: Wednesday, December 20, 2006 10:19 AM To: Asterisk Users Mailing List - Non-Commercial Discussion Subject: Re: [asterisk-users] Match a Numer - then continue with dialplan Douglas Garstang wrote: -Original Message- From: David Thomas [mailto:[EMAIL PROTECTED] Sent: Tuesday, December 19, 2006 3:01 PM To: Asterisk Users Mailing List - Non-Commercial Discussion Subject: Re: [asterisk-users] Match a Numer - then continue with dialplan On 12/19/06, Douglas Garstang [EMAIL PROTECTED] wrote: Anyone know if there's a way to match a dialplan extension, execute some code, say set a variable, and then continue with the dialplan? I want to set a variable when the dialplan flows beyond a certain context. This would be a great feature. Doug. Have you tried using the SetVar cmd? I haven't tried it but it sounds like it might work for this. http://www.voip-info.org/wiki/view/Asterisk+variables Regards, David David, If I call setvar, my variable will be set, but dialplan processing will stop... Then something else is wrong. SetVar will not stop dialplan processing. In 1.4, I believe SetVar() was removed. Check upgrade.txt. Use Set in 1.4 instead. I was not clear. EXTENSION processing will stop. Once you've matched an extension, and your logic is running through priorities in an extension, you no longer have the ability to search for another extension to match against. That's what I need to do. Again, when control flows beyond a certain point, ie when all calls are now known to be extra-company, we need to set the callerid to the external company id... so that later on when we dial, the caller id presented to person in the other company is correct. ___ --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
RE: [asterisk-users] Match a Numer - then continue with dialplan
If you have no statuc stuff in your dialplan, how do you use the 'include =' statement? We don't have users... we have companies. It's a hosted IPT service... and to make the problem even more insane, each company has multiple levels of organisational structure. Hardly, you're not required to use it ;-) You have heard of the s? I think in our hundreds of lines of dialplan, I think we have at most 10 lines that match extensions, the rest is all handled by s. What we have a lot is the following in extensions.conf include extensions/example.conf [default] exten = _.,1,Goto(example-outgoing,s,1) And then in example.conf: [example-outgoing] exten = s,1,DoSomeStuff exten = s,2,SetVar(outgoingCallerID=VALUE) exten = s,3,Goto(example_real_outgoing,s,1) [example_real_outgoing] exten = s,1,DoSomeMoreStuff exten = s,2,*SET outgoign caller id* exten = s,3,Dial() ___ --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
[asterisk-users] Match a Numer - then continue with dialplan
Anyone know if there's a way to match a dialplan extension, execute some code, say set a variable, and then continue with the dialplan? I want to set a variable when the dialplan flows beyond a certain context. This would be a great feature. Doug. ___ --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
Re: [asterisk-users] Match a Numer - then continue with dialplan
On 12/19/06, Douglas Garstang [EMAIL PROTECTED] wrote: Anyone know if there's a way to match a dialplan extension, execute some code, say set a variable, and then continue with the dialplan? I want to set a variable when the dialplan flows beyond a certain context. This would be a great feature. Doug. Have you tried using the SetVar cmd? I haven't tried it but it sounds like it might work for this. http://www.voip-info.org/wiki/view/Asterisk+variables Regards, David ___ --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
RE: [asterisk-users] Match a Numer - then continue with dialplan
I just know someone is going to ask 'why would you ever want to do that?'. Here's my answer. We have two companies, each with a dialplan similar to what's below. In the event that the number being dialled does not match any number within our OWN company, we want to set the caller id to be a generic one for the company, NOT one for the user. This is a pretty normal requirement that most companies want. So, in the event that the logic flows beyond coo1_OnNet, we want to reset the caller id of say, 3254001 Doug, to 3254000 Widgets Inc. If there was a way to match against a number in the dialplan, and then continue execution after that point, we could put this statement at the end of the coo1_OnNet context and it would all be sweet. Without that, I don't have a clue how to do this... unless we stick with out current 3,000 line python script. [coo1_CallStart] include = coo1_OnNet include = syst_OnNet include = syst_OffNet [coo1_OnNet] exten = 3254101,1,Dial(SIP/3254101,20,tr) exten = 3254102,1,Dial(SIP/3254102,20,tr) exten = 3254103,1,Dial(SIP/3254103,20,tr) exten = 1000,1,Answer exten = 1000,2,Wait(1) exten = 1000,3,NoOp(${FOO}) [syst_OnNet] include = coo1_OnNet include = coo2_OnNet [syst_OffNet] exten = _X.,1,Dial(SIP/[EMAIL PROTECTED],180,tr) ~ -Original Message- From: Douglas Garstang Sent: Tuesday, December 19, 2006 2:46 PM To: Asterisk Users Mailing List - Non-Commercial Discussion Subject: [asterisk-users] Match a Numer - then continue with dialplan Anyone know if there's a way to match a dialplan extension, execute some code, say set a variable, and then continue with the dialplan? I want to set a variable when the dialplan flows beyond a certain context. This would be a great feature. Doug. ___ --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 ___ --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
RE: [asterisk-users] Match a Numer - then continue with dialplan
-Original Message- From: David Thomas [mailto:[EMAIL PROTECTED] Sent: Tuesday, December 19, 2006 3:01 PM To: Asterisk Users Mailing List - Non-Commercial Discussion Subject: Re: [asterisk-users] Match a Numer - then continue with dialplan On 12/19/06, Douglas Garstang [EMAIL PROTECTED] wrote: Anyone know if there's a way to match a dialplan extension, execute some code, say set a variable, and then continue with the dialplan? I want to set a variable when the dialplan flows beyond a certain context. This would be a great feature. Doug. Have you tried using the SetVar cmd? I haven't tried it but it sounds like it might work for this. http://www.voip-info.org/wiki/view/Asterisk+variables Regards, David David, If I call setvar, my variable will be set, but dialplan processing will stop... ___ --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
RE: [asterisk-users] Match a Numer - then continue with dialplan
Please correct me if I'm misunderstanding your requirements, but see below (inline) for what I would do: -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Douglas Garstang Sent: Tuesday, December 19, 2006 5:04 PM To: Asterisk Users Mailing List - Non-Commercial Discussion Subject: RE: [asterisk-users] Match a Numer - then continue with dialplan I just know someone is going to ask 'why would you ever want to do that?'. Here's my answer. We have two companies, each with a dialplan similar to what's below. In the event that the number being dialled does not match any number within our OWN company, we want to set the caller id to be a generic one for the company, NOT one for the user. This is a pretty normal requirement that most companies want. So, in the event that the logic flows beyond coo1_OnNet, we want to reset the caller id of say, 3254001 Doug, to 3254000 Widgets Inc. If there was a way to match against a number in the dialplan, and then continue execution after that point, we could put this statement at the end of the coo1_OnNet context and it would all be sweet. Without that, I don't have a clue how to do this... unless we stick with out current 3,000 line python script. [coo1_CallStart] include = coo1_OnNet include = syst_OnNet include = syst_OffNet Instead of including your system-wide logic for offnet calling, introduce a per-company offnet and include that instead: [coo1_CallStart] include = coo1_OnNet include = syst_OnNet include = coo1_OffNet [coo1_OffNet] exten = _X.,1,Set(CALLERID(NUM)=3254000) exten = _X.,2,Set(CALLERID(NUM)=Widgets Inc.) exten = _X.,3,Goto(syst_OffNet,${EXTEN},1) The rest of this can stay untouched. [coo1_OnNet] exten = 3254101,1,Dial(SIP/3254101,20,tr) exten = 3254102,1,Dial(SIP/3254102,20,tr) exten = 3254103,1,Dial(SIP/3254103,20,tr) exten = 1000,1,Answer exten = 1000,2,Wait(1) exten = 1000,3,NoOp(${FOO}) [syst_OnNet] include = coo1_OnNet include = coo2_OnNet [syst_OffNet] exten = _X.,1,Dial(SIP/[EMAIL PROTECTED],180,tr) Regards, - Brad The contents of this e-mail are intended for the named addressee only. It contains information that may be confidential. Unless you are the named addressee or an authorized designee, you may not copy or use it, or disclose it to anyone else. If you received it in error please notify us immediately and then destroy it. ___ --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
RE: [asterisk-users] Match a Numer - then continue with dialplan
-Original Message- From: Watkins, Bradley [mailto:[EMAIL PROTECTED] Sent: Tuesday, December 19, 2006 4:16 PM To: Asterisk Users Mailing List - Non-Commercial Discussion Subject: RE: [asterisk-users] Match a Numer - then continue with dialplan Please correct me if I'm misunderstanding your requirements, but see below (inline) for what I would do: -Original Message- [snip] [coo1_CallStart] include = coo1_OnNet include = syst_OnNet include = syst_OffNet Instead of including your system-wide logic for offnet calling, introduce a per-company offnet and include that instead: [coo1_CallStart] include = coo1_OnNet include = syst_OnNet include = coo1_OffNet [coo1_OffNet] exten = _X.,1,Set(CALLERID(NUM)=3254000) exten = _X.,2,Set(CALLERID(NUM)=Widgets Inc.) exten = _X.,3,Goto(syst_OffNet,${EXTEN},1) Bradley, If I do this, then I can no longer continue with further extensions in my dialplan as Asterisk has already matched a number. I still need to check black/white lists, set pic codes and rate centers, 4 digit extensions etc within the company context. I just need to set the caller id and then move on. If I goto over to ${EXTEN} within syst_OffNet, I'd have to put ALL this logic within that extension, which would mean potentiall several hundred priorities. Asterisk really does need a way to match a number, execute some code, and then go back to looking for extensions. ___ --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
Re: [asterisk-users] Match a Numer - then continue with dialplan
Douglas Garstang wrote: I just know someone is going to ask 'why would you ever want to do that?'. Here's my answer. We have two companies, each with a dialplan similar to what's below. In the event that the number being dialled does not match any number within our OWN company, we want to set the caller id to be a generic one for the company, NOT one for the user. This is a pretty normal requirement that most companies want. So, in the event that the logic flows beyond coo1_OnNet, we want to reset the caller id of say, 3254001 Doug, to 3254000 Widgets Inc. If there was a way to match against a number in the dialplan, and then continue execution after that point, we could put this statement at the end of the coo1_OnNet context and it would all be sweet. Without that, I don't have a clue how to do this... unless we stick with out current 3,000 line python script. If you're not using realtime to store your SIP registry, you should be able to look up the number in the family SIP/Registry (case sensitive) using the DB functions. If you're using realtime, then you'll have to do an SQL query. Leo ___ --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
RE: [asterisk-users] Match a Numer - then continue with dialplan
Leo, sorry I completely don't follow you. I don't see how the registry (astdb) can help me here. -Original Message- From: Leo Ann Boon [mailto:[EMAIL PROTECTED] Sent: Tue 12/19/2006 6:15 PM To: Asterisk Users Mailing List - Non-Commercial Discussion Cc: Subject:Re: [asterisk-users] Match a Numer - then continue with dialplan Douglas Garstang wrote: I just know someone is going to ask 'why would you ever want to do that?'. Here's my answer. We have two companies, each with a dialplan similar to what's below. In the event that the number being dialled does not match any number within our OWN company, we want to set the caller id to be a generic one for the company, NOT one for the user. This is a pretty normal requirement that most companies want. So, in the event that the logic flows beyond coo1_OnNet, we want to reset the caller id of say, 3254001 Doug, to 3254000 Widgets Inc. If there was a way to match against a number in the dialplan, and then continue execution after that point, we could put this statement at the end of the coo1_OnNet context and it would all be sweet. Without that, I don't have a clue how to do this... unless we stick with out current 3,000 line python script. If you're not using realtime to store your SIP registry, you should be able to look up the number in the family SIP/Registry (case sensitive) using the DB functions. If you're using realtime, then you'll have to do an SQL query. Leo ___ --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 winmail.dat___ --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
Re: [asterisk-users] Match a Numer - then continue with dialplan
On Tue, Dec 19, 2006 at 05:19:57PM -0700, Douglas Garstang wrote: -Original Message- From: Watkins, Bradley [mailto:[EMAIL PROTECTED] Sent: Tuesday, December 19, 2006 4:16 PM To: Asterisk Users Mailing List - Non-Commercial Discussion Subject: RE: [asterisk-users] Match a Numer - then continue with dialplan Please correct me if I'm misunderstanding your requirements, but see below (inline) for what I would do: -Original Message- [snip] [coo1_CallStart] include = coo1_OnNet include = syst_OnNet include = syst_OffNet Instead of including your system-wide logic for offnet calling, introduce a per-company offnet and include that instead: [coo1_CallStart] include = coo1_OnNet include = syst_OnNet include = coo1_OffNet [coo1_OffNet] exten = _X.,1,Set(CALLERID(NUM)=3254000) exten = _X.,2,Set(CALLERID(NUM)=Widgets Inc.) exten = _X.,3,Goto(syst_OffNet,${EXTEN},1) Bradley, If I do this, then I can no longer continue with further extensions in my dialplan as Asterisk has already matched a number. An explicit WaitExten? -- Tzafrir Cohen icq#16849755jabber:[EMAIL PROTECTED] +972-50-7952406 mailto:[EMAIL PROTECTED] http://www.xorcom.com iax:[EMAIL PROTECTED]/tzafrir ___ --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