[asterisk-users] Re: Match a Numer - then continue with, dialplan
RL == Richard Lyman [EMAIL PROTECTED] writes: RL grr, i hate when i typo (and reply to my own posts) exten = RL s/,2,Set(CALLERID(name)=OUTSIDE NAME|CALLERID(num)=xx) Heh, if you want to chase typos, perhaps you should add an underscore before ? /Benny ___ --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] Re: Match a Numer - then continue with, dialplan
Benny Amorsen wrote: RL == Richard Lyman [EMAIL PROTECTED] writes: RL grr, i hate when i typo (and reply to my own posts) exten = RL s/,2,Set(CALLERID(name)=OUTSIDE NAME|CALLERID(num)=xx) Heh, if you want to chase typos, perhaps you should add an underscore before ? /Benny if that were the case, then you should also change the CALLERID(name/num) references to macros! eh merry christmas to all! ___ --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] Re: Match a Numer - then continue with, dialplan
-Original Message- From: Richard Lyman [mailto:[EMAIL PROTECTED] Sent: Wednesday, December 20, 2006 4:29 PM To: Asterisk Users Mailing List - Non-Commercial Discussion Subject: Re: [asterisk-users] Re: Match a Numer - then continue with, dialplan Douglas Garstang wrote: -Original Message- From: David Gomillion [mailto:[EMAIL PROTECTED] *snipped David, this is completely different from what I am trying to do. Let's try this a different way. Let's say you have two companies. When someone calls a number in their own company, we use their INTERNAL caller id. When they call someone in another company, we want to send their EXTERNAL caller id. How would you do this? Doug. if it is just callerid then wouldn't the gf stuff (if it still exists) work? it was something like (man i'm getting old, looking up in wiki) exten = s,1,Answer() exten = s,,2,Set(CALLERID(name)=OUTSIDE NAME|CALLERID(num)=xx) exten = s,2,Set(CALLERID(name)=INSIDE NAME|CALLERID(num)=xx) exten = s,3,Dial(yadda) would obviously be the callerid num of the internal exten I don't think that scales to hundreds of companies. ___ --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
OT: Re: [asterisk-users] Re: Match a Numer - then continue with, dialplan
Douglas Garstang wrote: -Original Message- From: Richard Lyman [mailto:[EMAIL PROTECTED] Sent: Wednesday, December 20, 2006 4:29 PM To: Asterisk Users Mailing List - Non-Commercial Discussion Subject: Re: [asterisk-users] Re: Match a Numer - then continue with, dialplan Douglas Garstang wrote: -Original Message- From: David Gomillion [mailto:[EMAIL PROTECTED] *snipped David, this is completely different from what I am trying to do. Let's try this a different way. Let's say you have two companies. When someone calls a number in their own company, we use their INTERNAL caller id. When they call someone in another company, we want to send their EXTERNAL caller id. How would you do this? Doug. if it is just callerid then wouldn't the gf stuff (if it still exists) work? it was something like (man i'm getting old, looking up in wiki) exten = s,1,Answer() exten = s,,2,Set(CALLERID(name)=OUTSIDE NAME|CALLERID(num)=xx) exten = s,2,Set(CALLERID(name)=INSIDE NAME|CALLERID(num)=xx) exten = s,3,Dial(yadda) would obviously be the callerid num of the internal exten I don't think that scales to hundreds of companies. hey doug, did you forget you already replied to this with If there's hundreds of companies on this box, we'd need an exponentially larger number of statements... not to mention it was YOU that defined it as Let's try this a different way. Let's say you have two companies. When someone calls a number in their own company, we use their INTERNAL caller id. When they call someone in another company, we want to send their EXTERNAL caller id. How would you do this? note: 2 companies tagged OT: as this doesn't even have a direction anymore. ___ --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] Re: Match a Numer - then continue with dialplan
DG == Douglas Garstang [EMAIL PROTECTED] writes: DG So, in the event that the logic flows beyond DG coo1_OnNet, we want to reset the caller id of say, 3254001 Doug, DG to 3254000 Widgets Inc. DG exten = 3254101,1,Dial(SIP/3254101,20,tr) DG exten = 3254102,1,Dial(SIP/3254102,20,tr) DG exten = 3254103,1,Dial(SIP/3254103,20,tr) [coo1_CallStart] include = coo1_OnNet You want something which executes here, if coo1_OnNet didn't match? exten = _.,1,Set(CALLERID(all)=Widgets Inc 3254001) will do that. If you then want to continue in priority 1 instead of 2, you just do exten = _.,n,Goto(coo1_CallStart2,${EXTEN},1) [coo1_CallStart2] include = syst_OnNet include = syst_OffNet /Benny ___ --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] Re: Match a Numer - then continue with dialplan
-Original Message- From: Benny Amorsen [mailto:[EMAIL PROTECTED] Sent: Wednesday, December 20, 2006 6:16 AM To: asterisk-users@lists.digium.com Subject: [asterisk-users] Re: Match a Numer - then continue with dialplan DG == Douglas Garstang [EMAIL PROTECTED] writes: DG So, in the event that the logic flows beyond DG coo1_OnNet, we want to reset the caller id of say, 3254001 Doug, DG to 3254000 Widgets Inc. DG exten = 3254101,1,Dial(SIP/3254101,20,tr) DG exten = 3254102,1,Dial(SIP/3254102,20,tr) DG exten = 3254103,1,Dial(SIP/3254103,20,tr) [coo1_CallStart] include = coo1_OnNet You want something which executes here, if coo1_OnNet didn't match? exten = _.,1,Set(CALLERID(all)=Widgets Inc 3254001) will do that. If you then want to continue in priority 1 instead of 2, you just do exten = _.,n,Goto(coo1_CallStart2,${EXTEN},1) [coo1_CallStart2] include = syst_OnNet include = syst_OffNet That won't do it. Processing will continue in the current extension priority. I need it to continue looking for an extension to match against. Once Asterisk has matched the dialled number against an extension in the dialplan, your stuck in an extension you can never get out and get Asterisk to go back to looking for extensions to match against. ___ --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] Re: Match a Numer - then continue with dialplan
I haven't really been following this thread but doesn't the following snipet kinda do this [out-international] exten = _011,1,goto(process-international,s,1) [process-international] exten = s,1,playback(international-call) exten = s,n,playback(please-enter-the) exten = s,n,read(number,number) exten = s,n,Dial(SIP/[EMAIL PROTECTED],120,T) exten = s,n,Macro(failann,${DIALSTATUS}) This matches 011 then could do any number of things. Here I just goto, then it looks for more numbers (the announcement is optional) and then dials them. Maybe not what you are looking for but it is an example of Asterisk matching an extension and then going on to take more digits that then branch based on other digits. Here the 011 is prepended to the final number. BTW - what is a numer? 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] Re: Match a Numer - then continue with dialplan
-Original Message- From: Doug Crompton [mailto:[EMAIL PROTECTED] Sent: Wednesday, December 20, 2006 8:36 AM To: Asterisk Users Mailing List - Non-Commercial Discussion Subject: RE: [asterisk-users] Re: Match a Numer - then continue with dialplan I haven't really been following this thread but doesn't the following snipet kinda do this [out-international] exten = _011,1,goto(process-international,s,1) [process-international] exten = s,1,playback(international-call) exten = s,n,playback(please-enter-the) exten = s,n,read(number,number) exten = s,n,Dial(SIP/[EMAIL PROTECTED],120,T) exten = s,n,Macro(failann,${DIALSTATUS}) This matches 011 then could do any number of things. Here I just goto, then it looks for more numbers (the announcement is optional) and then dials them. Maybe not what you are looking for but it is an example of Asterisk matching an extension and then going on to take more digits that then branch based on other digits. Here the 011 is prepended to the final number. Don't get offended Doug, but I get really frustrated when I try to explain what I am trying to do with Asterisk, and people don't seem to quite get it. Your about the 4th person who's replied to this post, and hasn't quite grasped my question. :) --- smiley.. see...we're all cool. I don't want Asterisk to go on to ask for more digits. I want to do a very simple thing. I want to set a variable when call flow continues beyond a certain point (without asking the user for more digits), and then continue on, and use that variable later. It's a very simple thing, I can't work out why Asterisk doesn't let me do that. Surely other people have hit the situation where they first check extensions within a company, and then if there's no match, you glue all the other companies dialplans together with this one. At that point, when one company dials another, the caller id that's sent should be the company caller id, not the caller id of the individual extension. It's a very common business requirement... at least that's what my boss, who has spend many years installing TDM pbx's tells me. BTW - what is a numer? A numer is a spelling mistake. I was going to change the title, but it would have broken the thread. ___ --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] Re: Match a Numer - then continue with, dialplan
I think you're making it far too difficult. What I do is something like this: [outgoing] include = internal include = longdistance ;Always include internal first, as matches from the first include ;will be used first. This allows you to make sure your internal ;extensions don't go out your trunks. [longdistance] ignorepat = 9; include = default; already included from local, but putting here for clarity include = local; exten = _91XXX,1,Macro(trunkout,${EXTEN}) ;Medium Distance exten = _91XX,1,Macro(trunkout,${EXTEN}) ;Long Distance Then, I have: [macro-trunkout] exten = s,1,Set(cname=${DB(showname/${CALLERIDNUM})}); exten = s,n,Set(cnum=${DB(shownum/${CALLERIDNUM})}); exten = s,n,GotoIf($[foo${cnum} = foo]?6); //if calling from ZAP channel that set caller ID already exten = s,n,Set(CALLERID(name)=${cname}|a); exten = s,n,Set(CALLERID(number)=${cnum}|a); exten = s,n,Dial(${TRUNK}/${ARG1:${TRUNKMSD}}); exten = s,n,Goto(s-${DIALSTATUS},1) exten = s-ANSWER,1,Hangup exten = s-CONGESTION,1,Congestion(30) exten = s-CONGESTION,2,Hangup exten = s-CANCEL,1,Hangup exten = s-BUSY,1,Busy(30) exten = s-BUSY,2,Hangup Why is this important? It's not. But it is fundamentally different from what you're asking. You want to match a partial extension dialed and then continue appending digits. What you really need to do is wait for the whole number, then decide what kind of number it is, do the processing, and send it on its way. It's just a slight change in the way you're thinking, because you understand that there's a class of numbers to treat differently. And that's OK. Just don't do anything with it until the whole extension has been entered! You'll notice that, anything not going through the trunkout macro doesn't get tweaked, and anything that goes through there will read from the database. I could just as easily set a single value, but I have some users that I want to go out as themselves, and different departments that have a general number, etc. I found the Asterisk Database to be the easiest to tweak, as I have some scripts to allow admins to change the effective CallerID on the fly. I hope this helps! Asterisk can do what you're asking, and it does every day. ___ --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] Re: Match a Numer - then continue with dialplan
In article [EMAIL PROTECTED], Douglas Garstang [EMAIL PROTECTED] wrote: Don't get offended Doug, but I get really frustrated when I try to explain what I am trying to do with Asterisk, and people don't seem to quite get it. Your about the 4th person who's replied to this post, and hasn't quite grasped my question. :) --- smiley.. see...we're all cool. Perhaps its the terminology you used that is confusing people. See below: I don't want Asterisk to go on to ask for more digits. I want to do a very simple thing. I want to set a variable when call flow continues beyond a certain point (without asking the user for more digits), and then continue on, and use that variable later. It's a very simple thing, I can't work out why Asterisk doesn't let me do that. To almost all people call flow would mean executing one priority after another for a given extension. After reading and re-reading your posts trying to work out what you are trying to do, it seems to me that when *you* say call flow, you mean the act of trying to find an extension. And what your looking for is a way to do things a different points in the *search*, while it is still trying to decide on a statement to land on. Is that correct? If so, I think you need to re-think the strategy a bit. The only way a command gets executed in a dialplan is when Asterisk has matched an extension and a priority. Then once it has executed that command, it increments the priority (unless it was a Goto or something) and starts searching again. However, don't forget that it searches for matching extensions every time the priority changes. You are not locked into a particular pattern or extension number from priority 1 onwards. You can mix and match patterns with literal extensions, even across includes, e.g. [example] include = ctx31X include = ctx3XX exten = _X.,1,NoOp(this gets executed first for everything) exten = _X.,2,NoOp(this gets executed second only if ctx31X or ctx3XX didnt match) exten = _X.,3,NoOp(this gets executed third for everything) [ctx31X] exten = _31X,2,NoOp(this gets executed second for 310-319) [ctx3XX] exten = _3XX,2,NoOp(this gets executed second for 300-309 and 320-399) So you might be able to do something along these lines by being creative with priorities and includes, and setting or testing variables. Something along these lines: 1. Each company starts off in its own context, and at priority 1 in _X. it sets a variable like SRCCOMPANY to something specific to it. It includes all the destination contexts. 2. Each destination context starts at priority 2 and sets a variable like DESTCOMPANY to something specific to that destination. 3. At priority 3 in each source context, SRCCOMPANY and DESTCOMPANY are compared, in order to decide whether to override the CallerID with the source company's generic callerID. Let's say this uses priorities 3, 4 and 5 (for the GotoIf doing the compare, then the SetCallerID, and the NoOp target for the GotoIf when the callerID doesn't need rewriting). The destination contexts do not have priorities 3, 4 and 5. 4. The destination contexts continue at priority 6 to route the call. I think by interleaving priorities between contxts like this you should be able to achieve what you are looking for. Please let us know on the list if you are successful - it encourages us to keep helping in the future! Hope this helps Cheers Tony -- Tony Mountifield Work: [EMAIL PROTECTED] - http://www.softins.co.uk Play: [EMAIL PROTECTED] - http://tony.mountifield.org ___ --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] Re: Match a Numer - then continue with, dialplan
-Original Message- From: David Gomillion [mailto:[EMAIL PROTECTED] Sent: Wednesday, December 20, 2006 10:27 AM To: asterisk-users@lists.digium.com Subject: [asterisk-users] Re: Match a Numer - then continue with, dialplan I think you're making it far too difficult. What I do is something like this: [outgoing] include = internal include = longdistance ;Always include internal first, as matches from the first include ;will be used first. This allows you to make sure your internal ;extensions don't go out your trunks. [longdistance] ignorepat = 9; include = default; already included from local, but putting here for clarity include = local; exten = _91XXX,1,Macro(trunkout,${EXTEN}) ;Medium Distance exten = _91XX,1,Macro(trunkout,${EXTEN}) ;Long Distance Then, I have: [macro-trunkout] exten = s,1,Set(cname=${DB(showname/${CALLERIDNUM})}); exten = s,n,Set(cnum=${DB(shownum/${CALLERIDNUM})}); exten = s,n,GotoIf($[foo${cnum} = foo]?6); //if calling from ZAP channel that set caller ID already exten = s,n,Set(CALLERID(name)=${cname}|a); exten = s,n,Set(CALLERID(number)=${cnum}|a); exten = s,n,Dial(${TRUNK}/${ARG1:${TRUNKMSD}}); exten = s,n,Goto(s-${DIALSTATUS},1) exten = s-ANSWER,1,Hangup exten = s-CONGESTION,1,Congestion(30) exten = s-CONGESTION,2,Hangup exten = s-CANCEL,1,Hangup exten = s-BUSY,1,Busy(30) exten = s-BUSY,2,Hangup Why is this important? It's not. But it is fundamentally different from what you're asking. You want to match a partial extension dialed and then continue appending digits. What you really need to do is wait for the whole number, then decide what kind of number it is, do the processing, and send it on its way. It's just a slight change in the way you're thinking, because you understand that there's a class of numbers to treat differently. And that's OK. Just don't do anything with it until the whole extension has been entered! Uhm, No. I'm not trying to partially match extensions and then continue appending digits. What makes you think that? You'll notice that, anything not going through the trunkout macro doesn't get tweaked, and anything that goes through there will read from the database. I could just as easily set a single value, but I have some users that I want to go out as themselves, and different departments that have a general number, etc. I found the Asterisk Database to be the easiest to tweak, as I have some scripts to allow admins to change the effective CallerID on the fly. David, this is completely different from what I am trying to do. Let's try this a different way. Let's say you have two companies. When someone calls a number in their own company, we use their INTERNAL caller id. When they call someone in another company, we want to send their EXTERNAL caller id. How would you do this? Doug. I hope this helps! Asterisk can do what you're asking, and it does every day. ___ --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] Re: Match a Numer - then continue with dialplan
-Original Message- From: Tony Mountifield [mailto:[EMAIL PROTECTED] Sent: Wednesday, December 20, 2006 11:47 AM To: asterisk-users@lists.digium.com Subject: [asterisk-users] Re: Match a Numer - then continue with dialplan In article [EMAIL PROTECTED], Douglas Garstang [EMAIL PROTECTED] wrote: Don't get offended Doug, but I get really frustrated when I try to explain what I am trying to do with Asterisk, and people don't seem to quite get it. Your about the 4th person who's replied to this post, and hasn't quite grasped my question. :) --- smiley.. see...we're all cool. Perhaps its the terminology you used that is confusing people. See below: I don't want Asterisk to go on to ask for more digits. I want to do a very simple thing. I want to set a variable when call flow continues beyond a certain point (without asking the user for more digits), and then continue on, and use that variable later. It's a very simple thing, I can't work out why Asterisk doesn't let me do that. To almost all people call flow would mean executing one priority after another for a given extension. After reading and re-reading your posts trying to work out what you are trying to do, it seems to me that when *you* say call flow, you mean the act of trying to find an extension. And what your looking for is a way to do things a different points in the *search*, while it is still trying to decide on a statement to land on. Is that correct? Yes to the first sentence. Not quite sure what you mean after that. If so, I think you need to re-think the strategy a bit. The only way a command gets executed in a dialplan is when Asterisk has matched an extension and a priority. Then once it has executed that command, it increments the priority (unless it was a Goto or something) and starts searching again. That was my original question. I was asking if there was a way to set a variable and the continue, which doesn't seem like too strange a thing to have Asterisk support. However, don't forget that it searches for matching extensions every time the priority changes. You are not locked into a particular pattern or extension number from priority 1 onwards. You can mix and match patterns with literal extensions, even across includes, e.g. Don't follow you. When asterisk matches an extension, it starts interating through the priorities until there's none left, or you Goto() somewhere else. [example] include = ctx31X include = ctx3XX exten = _X.,1,NoOp(this gets executed first for everything) exten = _X.,2,NoOp(this gets executed second only if ctx31X or ctx3XX didnt match) exten = _X.,3,NoOp(this gets executed third for everything) You lost me here. [ctx31X] exten = _31X,2,NoOp(this gets executed second for 310-319) [ctx3XX] exten = _3XX,2,NoOp(this gets executed second for 300-309 and 320-399) So you might be able to do something along these lines by being creative with priorities and includes, and setting or testing variables. Something along these lines: 1. Each company starts off in its own context, and at Can't do that. The point at which a phone enters the dial plan needs to start with rather a long list of include= statements, to grant/deny access to certain features. priority 1 in _X. it sets a variable like SRCCOMPANY to something specific to it. It includes all the destination contexts. 2. Each destination context starts at priority 2 and sets a variable like DESTCOMPANY to something specific to that destination. 3. At priority 3 in each source context, SRCCOMPANY and DESTCOMPANY are compared, in order to decide whether to override the CallerID with the source company's generic callerID. Let's say this uses priorities 3, 4 and 5 (for the GotoIf doing the compare, then the SetCallerID, and the NoOp target for the GotoIf when the callerID doesn't need rewriting). The destination contexts do not have priorities 3, 4 and 5. 4. The destination contexts continue at priority 6 to route the call. I think by interleaving priorities between contxts like this you should be able to achieve what you are looking for. Please let us know on the list if you are successful - it encourages us to keep helping in the future! I tried your example, which I completely don't follow, and it didn't seem to execute as you expected. Dialling 311 yields: *CLI -- Executing NoOp(SIP/3254101-d10e, this gets executed first for everything) in new stack -- Executing NoOp(SIP/3254101-d10e, this gets executed second only if ctx31X or ctx3XX didnt match) in new stack -- Executing NoOp(SIP/3254101-d10e, this gets executed third for everything) in new stack I need to make extensive use of the include= directive, and I just can't see how getting stuck in priorities within an extension is going to allow me to do that. Doug. ___
RE: [asterisk-users] Re: Match a Numer - then continue with dialplan
-Original Message- From: Tony Mountifield [mailto:[EMAIL PROTECTED] Sent: Wednesday, December 20, 2006 11:47 AM To: asterisk-users@lists.digium.com Subject: [asterisk-users] Re: Match a Numer - then continue with dialplan In article [EMAIL PROTECTED], Douglas Garstang [EMAIL PROTECTED] wrote: Don't get offended Doug, but I get really frustrated when I try to explain what I am trying to do with Asterisk, and people don't seem to quite get it. Your about the 4th person who's replied to this post, and hasn't quite grasped my question. :) --- smiley.. see...we're all cool. Perhaps its the terminology you used that is confusing people. See below: I don't want Asterisk to go on to ask for more digits. I want to do a very simple thing. I want to set a variable when call flow continues beyond a certain point (without asking the user for more digits), and then continue on, and use that variable later. It's a very simple thing, I can't work out why Asterisk doesn't let me do that. To almost all people call flow would mean executing one priority after another for a given extension. After reading and re-reading your posts trying to work out what you are trying to do, it seems to me that when *you* say call flow, you mean the act of trying to find an extension. And what your looking for is a way to do things a different points in the *search*, while it is still trying to decide on a statement to land on. Is that correct? If so, I think you need to re-think the strategy a bit. The only way a command gets executed in a dialplan is when Asterisk has matched an extension and a priority. Then once it has executed that command, it increments the priority (unless it was a Goto or something) and starts searching again. However, don't forget that it searches for matching extensions every time the priority changes. You are not locked into a particular pattern or extension number from priority 1 onwards. You can mix and match patterns with literal extensions, even across includes, e.g. [example] include = ctx31X include = ctx3XX exten = _X.,1,NoOp(this gets executed first for everything) exten = _X.,2,NoOp(this gets executed second only if ctx31X or ctx3XX didnt match) exten = _X.,3,NoOp(this gets executed third for everything) [ctx31X] exten = _31X,2,NoOp(this gets executed second for 310-319) [ctx3XX] exten = _3XX,2,NoOp(this gets executed second for 300-309 and 320-399) So you might be able to do something along these lines by being creative with priorities and includes, and setting or testing variables. Something along these lines: 1. Each company starts off in its own context, and at priority 1 in _X. it sets a variable like SRCCOMPANY to something specific to it. It includes all the destination contexts. I think that's the deal breaker right there. I can't start a company within an extension. The starting point for each phone within a company needs to make extensive use of the include= directive. Features will be disabled by default, so there will be a list of includes to block unpurchased features. Then we'll include contexts for 911, voicemail retrieval and general numbers, ie: [coo1_CallStart] include = syst_FeaturePersonalMeetmeBlock include = syst_FeatureIntercomBlock include = syst_FeatureIDDBlock include = syst_Emergency include = syst_VMRetrieve include = coo1_General include = syst_GeneralInternal include = syst_ExportedApps include = syst_Route Finally, when we're finished scanning for blocked services, and asterisk terminated extensions, we try to route the call from this phone to the destination number, either OnNet or OffNet. That's where syst_Route comes in. For managability, we have to use lots of includes. We can't have our entire dialplan as one big _X. extension match. ___ --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] Re: Match a Numer - then continue with dialplan
DG == Douglas Garstang [EMAIL PROTECTED] writes: DG If I pass a priority, we're right back at square one, we're I'm DG stuck in a priority and can't get back to an extension. You ALWAYS have both a priority and an extension. There is no such thing as being stuck in a priority. /Benny ___ --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] Re: Match a Numer - then continue with dialplan
-Original Message- From: Benny Amorsen [mailto:[EMAIL PROTECTED] Sent: Wednesday, December 20, 2006 1:04 PM To: asterisk-users@lists.digium.com Subject: [asterisk-users] Re: Match a Numer - then continue with dialplan DG == Douglas Garstang [EMAIL PROTECTED] writes: DG If I pass a priority, we're right back at square one, we're I'm DG stuck in a priority and can't get back to an extension. You ALWAYS have both a priority and an extension. There is no such thing as being stuck in a priority. Benny, lets say I have this... exten = _X.,1,NoOp(1) exten = _X.,2,NoOp(2) exten = _X.,3,NoOp(3) - Current code execution location exten = 555,1,NoOp(1) exten = 555,2,NoOp(2) exten = 555,3,NoOp(3) How would I jump back into the dialplan from the current execution location and continue to search for matches? 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
[asterisk-users] Re: Match a Numer - then continue with dialplan
DG == Douglas Garstang [EMAIL PROTECTED] writes: -Original Message- From: Benny Amorsen [mailto:[EMAIL PROTECTED] Sent: Wednesday, December 20, 2006 6:16 AM To: asterisk-users@lists.digium.com Subject: [asterisk-users] Re: Match a Numer - then continue with dialplan exten = _.,n,Goto(coo1_CallStart2,${EXTEN},1) [coo1_CallStart2] include = syst_OnNet include = syst_OffNet DG That won't do it. Processing will continue in the current DG extension priority. I need it to continue looking for an extension DG to match against. Once Asterisk has matched the dialled number DG against an extension in the dialplan, your stuck in an DG extension you can never get out and get Asterisk to go back to DG looking for extensions to match against. It looks for extensions to match against all the time. What you say makes no sense. E.g. this code works, with EXTEN being 321 and starting in incoming. [incoming] exten = _3XX,1,NoOp(We get to this place) exten = _X2X,2,Goto(incoming,${EXTEN},700) exten = _XX1,700,NoOp(We end up here) If EXTEN was 301, only priority 1 would run. If it was 320, priority 1 and 2 would run. /Benny ___ --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] Re: Match a Numer - then continue with dialplan
[example] include = ctx31X include = ctx3XX exten = _X.,1,NoOp(this gets executed first for everything) exten = _X.,2,NoOp(this gets executed second only if ctx31X or ctx3XX didnt match) exten = _X.,3,NoOp(this gets executed third for everything) [ctx31X] exten = _31X,2,NoOp(this gets executed second for 310-319) [ctx3XX] exten = _3XX,2,NoOp(this gets executed second for 300-309 and 320-399) Does this really work? I've never seen this behavior documented anywhere. Asterisk always searches the current context before looking in included ones for a start. Second, I don't see how it can just jump out of [example] into [ctx31X] and back again without being told to do so ___ --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] Re: Match a Numer - then continue with dialplan
DG == Douglas Garstang [EMAIL PROTECTED] writes: DG Surely other people have hit the situation where they first check DG extensions within a company, and then if there's no match, you DG glue all the other companies dialplans together with this one. Of course we have. Just Goto(gluedtogethercontext,${EXTEN},1) /Benny ___ --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] Re: Match a Numer - then continue with dialplan
-Original Message- From: Benny Amorsen [mailto:[EMAIL PROTECTED] Sent: Wednesday, December 20, 2006 1:16 PM To: asterisk-users@lists.digium.com Subject: [asterisk-users] Re: Match a Numer - then continue with dialplan DG == Douglas Garstang [EMAIL PROTECTED] writes: DG Surely other people have hit the situation where they first check DG extensions within a company, and then if there's no match, you DG glue all the other companies dialplans together with this one. Of course we have. Just Goto(gluedtogethercontext,${EXTEN},1) After doing which, you can no longer use the include = directive. ___ --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] Re: Match a Numer - then continue with dialplan
-Original Message- From: Benny Amorsen [mailto:[EMAIL PROTECTED] Sent: Wednesday, December 20, 2006 1:14 PM To: asterisk-users@lists.digium.com Subject: [asterisk-users] Re: Match a Numer - then continue with dialplan DG == Douglas Garstang [EMAIL PROTECTED] writes: -Original Message- From: Benny Amorsen [mailto:[EMAIL PROTECTED] Sent: Wednesday, December 20, 2006 6:16 AM To: asterisk-users@lists.digium.com Subject: [asterisk-users] Re: Match a Numer - then continue with dialplan exten = _.,n,Goto(coo1_CallStart2,${EXTEN},1) [coo1_CallStart2] include = syst_OnNet include = syst_OffNet DG That won't do it. Processing will continue in the current DG extension priority. I need it to continue looking for an extension DG to match against. Once Asterisk has matched the dialled number DG against an extension in the dialplan, your stuck in an DG extension you can never get out and get Asterisk to go back to DG looking for extensions to match against. It looks for extensions to match against all the time. What you say makes no sense. E.g. this code works, with EXTEN being 321 and starting in incoming. [incoming] exten = _3XX,1,NoOp(We get to this place) exten = _X2X,2,Goto(incoming,${EXTEN},700) exten = _XX1,700,NoOp(We end up here) If EXTEN was 301, only priority 1 would run. If it was 320, priority 1 and 2 would run. Ok, but how does that help me? All I want to do is set a variable to be used later on in the dialplan. Eg, if someone dialls 2944000, which is in a different company...: [co1_phone-start] include = co1_did include = sys_glue [co1_did] exten = 3254101,1,Dial(SIP/3254101,18,tr) exten = 3254102,1,Dial(SIP/3254102,18,tr) exten = 3254103,1,Dial(SIP/3254103,18,tr) ; No match, so now we want to use the external caller id variable for use later on, when ; we finally dial the dest number after performing all restriction and feature checks. ; Actually I just realised we want to SET the caller id. [sys-glue] include co1_did include co2_did ___ --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] Re: Match a Numer - then continue with dialplan
DG Surely other people have hit the situation where they first check DG extensions within a company, and then if there's no match, you DG glue all the other companies dialplans together with this one. Of course we have. Just Goto(gluedtogethercontext,${EXTEN},1) After doing which, you can no longer use the include = directive. Perhaps I can get a clarification before proceeding further... In reading the thread the situation seems to be: Company A users has a user with extension/callerid XXX, he calls someone in company B and you want to set the callerid to company A's main number rather than the userr's default callerid? Is this correct? Mike ___ --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] Re: Match a Numer - then continue with dialplan
-Original Message- From: Mike [mailto:[EMAIL PROTECTED] Sent: Wednesday, December 20, 2006 1:53 PM To: Asterisk Users Mailing List - Non-Commercial Discussion Subject: Re: [asterisk-users] Re: Match a Numer - then continue with dialplan DG Surely other people have hit the situation where they first check DG extensions within a company, and then if there's no match, you DG glue all the other companies dialplans together with this one. Of course we have. Just Goto(gluedtogethercontext,${EXTEN},1) After doing which, you can no longer use the include = directive. Perhaps I can get a clarification before proceeding further... In reading the thread the situation seems to be: Company A users has a user with extension/callerid XXX, he calls someone in company B and you want to set the callerid to company A's main number rather than the userr's default callerid? Is this correct? Mike, Exactamundo. 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] Re: Match a Numer - then continue with dialplan
Perhaps I can get a clarification before proceeding further... In reading the thread the situation seems to be: Company A users has a user with extension/callerid XXX, he calls someone in company B and you want to set the callerid to company A's main number rather than the userr's default callerid? Is this correct? Mike, Exactamundo. Doug. Ok. How about: ;outgoing context for company A [companyA] ;Various include statements include = foo . . . ;Handle calls from A - B ;Here will match company B numbers exten = , 1, Set(CALLERID=CompanyAMain) exten = , 1, Dial(${EXTEN} You can do the inverse for companyB, or you could l have a single macro that deals with calls to/from each company and decides what do to based on the callerid making the call. Mike. ___ --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] Re: Match a Numer - then continue with dialplan
Typo, sorry. Should be: Here will match company B numbers exten = , 1, Set(CALLERID=CompanyAMain) exten = , 2, Dial(${EXTEN}) ;Handle calls from A - B ;Here will match company B numbers exten = , 1, Set(CALLERID=CompanyAMain) exten = , 1, Dial(${EXTEN} You can do the inverse for companyB, or you could l have a single macro that deals with calls to/from each company and decides what do to based on the callerid making the call. Mike. ___ --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] Re: Match a Numer - then continue with dialplan
-Original Message- From: Mike [mailto:[EMAIL PROTECTED] Sent: Wednesday, December 20, 2006 2:18 PM To: Asterisk Users Mailing List - Non-Commercial Discussion Subject: Re: [asterisk-users] Re: Match a Numer - then continue with dialplan Perhaps I can get a clarification before proceeding further... In reading the thread the situation seems to be: Company A users has a user with extension/callerid XXX, he calls someone in company B and you want to set the callerid to company A's main number rather than the userr's default callerid? Is this correct? Mike, Exactamundo. Doug. Ok. How about: ;outgoing context for company A [companyA] ;Various include statements include = foo . . . ;Handle calls from A - B ;Here will match company B numbers exten = , 1, Set(CALLERID=CompanyAMain) exten = , 1, Dial(${EXTEN} You can do the inverse for companyB, or you could l have a single macro that deals with calls to/from each company and decides what do to based on the callerid making the call. Mike. Mike, this is a hosted IPT solution. There's potentially going to be hundreds (we hope) of companies hosted and configured on this box. I'd have to write static code to compare every number in every company to every number in every other company, and that's just not feesible. 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
[asterisk-users] Re: Match a Numer - then continue with dialplan
In article [EMAIL PROTECTED], Douglas Garstang [EMAIL PROTECTED] wrote: [example] include = ctx31X include = ctx3XX exten = _X.,1,NoOp(this gets executed first for everything) exten = _X.,2,NoOp(this gets executed second only if ctx31X or ctx3XX didnt match) exten = _X.,3,NoOp(this gets executed third for everything) [ctx31X] exten = _31X,2,NoOp(this gets executed second for 310-319) [ctx3XX] exten = _3XX,2,NoOp(this gets executed second for 300-309 and 320-399) Does this really work? I've never seen this behavior documented anywhere. Asterisk always searches the current context before looking in included ones for a start. Second, I don't see how it can just jump out of [example] into [ctx31X] and back again without being told to do so No, I forgot one thing. Since includes are searched in order, the default needs to go in an include as well: [example] include = ctx31X include = ctx3XX include = ctxdflt [ctxdflt] exten = _X.,1,NoOp(this gets executed first for everything) exten = _X.,2,NoOp(this gets executed second only if ctx31X or ctx3XX didnt match) exten = _X.,3,NoOp(this gets executed third for everything) [ctx31X] exten = _31X,2,NoOp(this gets executed second for 310-319) [ctx3XX] exten = _3XX,2,NoOp(this gets executed second for 300-309 and 320-399) That should work as I described. Cheers Tony -- Tony Mountifield Work: [EMAIL PROTECTED] - http://www.softins.co.uk Play: [EMAIL PROTECTED] - http://tony.mountifield.org ___ --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] Re: Match a Numer - then continue with, dialplan
In article [EMAIL PROTECTED], Douglas Garstang [EMAIL PROTECTED] wrote: Let's try this a different way. Let's say you have two companies. When someone calls a number in their own company, we use their INTERNAL caller id. When they call someone in another company, we want to send their EXTERNAL caller id. How would you do this? Firstly, in the setup you are envisaging, how do you distinguish which company the caller is calling from? Their extensions number? The context at which they enter the dialplan? Or something else? Secondly, how do you distinguish between destination numbers in one company from those in another? Number range? Context? Cheers Tony -- Tony Mountifield Work: [EMAIL PROTECTED] - http://www.softins.co.uk Play: [EMAIL PROTECTED] - http://tony.mountifield.org ___ --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] Re: Match a Numer - then continue with dialplan
In article [EMAIL PROTECTED], Tony Mountifield [EMAIL PROTECTED] wrote: In article [EMAIL PROTECTED], Douglas Garstang [EMAIL PROTECTED] wrote: [example] include = ctx31X include = ctx3XX exten = _X.,1,NoOp(this gets executed first for everything) exten = _X.,2,NoOp(this gets executed second only if ctx31X or ctx3XX didnt match) exten = _X.,3,NoOp(this gets executed third for everything) [ctx31X] exten = _31X,2,NoOp(this gets executed second for 310-319) [ctx3XX] exten = _3XX,2,NoOp(this gets executed second for 300-309 and 320-399) Does this really work? I've never seen this behavior documented anywhere. Asterisk always searches the current context before looking in included ones for a start. Second, I don't see how it can just jump out of [example] into [ctx31X] and back again without being told to do so No, I forgot one thing. Since includes are searched in order, the default needs to go in an include as well: [example] include = ctx31X include = ctx3XX include = ctxdflt [ctxdflt] exten = _X.,1,NoOp(this gets executed first for everything) exten = _X.,2,NoOp(this gets executed second only if ctx31X or ctx3XX didnt match) exten = _X.,3,NoOp(this gets executed third for everything) [ctx31X] exten = _31X,2,NoOp(this gets executed second for 310-319) [ctx3XX] exten = _3XX,2,NoOp(this gets executed second for 300-309 and 320-399) That should work as I described. And having just tried it out, it does indeed. Cheers Tony -- Tony Mountifield Work: [EMAIL PROTECTED] - http://www.softins.co.uk Play: [EMAIL PROTECTED] - http://tony.mountifield.org ___ --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] Re: Match a Numer - then continue with dialplan
On Wed, 20 Dec 2006 12:16:45 -0700, Douglas Garstang wrote: I think that's the deal breaker right there. I can't start a company within an extension. The starting point for each phone within a company needs to make extensive use of the include= directive. Features will be disabled by default, so there will be a list of includes to block unpurchased features. Then we'll include contexts for 911, voicemail retrieval and general numbers, ie: [coo1_CallStart] include = syst_FeaturePersonalMeetmeBlock include = syst_FeatureIntercomBlock include = syst_FeatureIDDBlock include = syst_Emergency include = syst_VMRetrieve include = coo1_General include = syst_GeneralInternal include = syst_ExportedApps include = syst_Route Finally, when we're finished scanning for blocked services, and asterisk terminated extensions, we try to route the call from this phone to the destination number, either OnNet or OffNet. That's where syst_Route comes in. Can't you in coo1_General have a line that sets a var of the current company, then in syst_Route compare that var with where the call is going and set the correct CID? Or instead of including syst_Route, include syst_gotoRoute: exten = 123XXX,1,SET(CALLERID etc. exten = 123XXX,n,Goto(syst_Route,${EXTEN},1) /Niklas ___ --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] Re: Match a Numer - then continue with dialplan
DG == Douglas Garstang [EMAIL PROTECTED] writes: DG Benny, lets say I have this... DG exten = _X.,1,NoOp(1) DG exten = _X.,2,NoOp(2) DG exten = _X.,3,NoOp(3) - Current code execution location DG exten = 555,1,NoOp(1) DG exten = 555,2,NoOp(2) DG exten = 555,3,NoOp(3) DG How would I jump back into the dialplan from the current execution DG location and continue to search for matches? You just Goto() wherever you want to go. Of course if you Goto back in the same context, you'll have an infinite loop. So don't do that, make a separate context without the exten you did Goto() from. /Benny ___ --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] Re: Match a Numer - then continue with, dialplan
-Original Message- From: Tony Mountifield [mailto:[EMAIL PROTECTED] Sent: Wednesday, December 20, 2006 2:41 PM To: asterisk-users@lists.digium.com Subject: [asterisk-users] Re: Match a Numer - then continue with, dialplan In article [EMAIL PROTECTED], Douglas Garstang [EMAIL PROTECTED] wrote: Let's try this a different way. Let's say you have two companies. When someone calls a number in their own company, we use their INTERNAL caller id. When they call someone in another company, we want to send their EXTERNAL caller id. How would you do this? Firstly, in the setup you are envisaging, how do you distinguish which company the caller is calling from? Their extensions number? The context at which they enter the dialplan? Or something else? Good questions, all of them. Unfortnately, I don't have answers to them. I wanted to take our 3000 line python script, which we'd used due to inadequacies of the dialplan, and throw the horrible nasty thing out the window. Secondly, how do you distinguish between destination numbers in one company from those in another? Number range? Context? My brain hurts. ___ --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] Re: Match a Numer - then continue with dialplan
DG == Douglas Garstang [EMAIL PROTECTED] writes: [example] include = ctx31X include = ctx3XX exten = _X.,1,NoOp(this gets executed first for everything) exten = _X.,2,NoOp(this gets executed second only if ctx31X or ctx3XX didnt match) exten = _X.,3,NoOp(this gets executed third for everything) [ctx31X] exten = _31X,2,NoOp(this gets executed second for 310-319) [ctx3XX] exten = _3XX,2,NoOp(this gets executed second for 300-309 and 320-399) DG Does this really work? Yes DG I've never seen this behavior documented anywhere. Asterisk always DG searches the current context before looking in included ones for a DG start. Second, I don't see how it can just jump out of [example] DG into [ctx31X] and back again without being told to do so Ah, there's your confusion. Asterisk never leaves the [example] context to go into the other contexts. It stays in the example context. Asterisk just cut-n-pastes the two other contexts in. Ordering is important here though! includes are processed in order; everything else gets reordered by Asterisk. /Benny ___ --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] Re: Match a Numer - then continue with dialplan
In article [EMAIL PROTECTED], Douglas Garstang [EMAIL PROTECTED] wrote: From: Tony Mountifield [mailto:[EMAIL PROTECTED] However, don't forget that it searches for matching extensions every time the priority changes. You are not locked into a particular pattern or extension number from priority 1 onwards. You can mix and match patterns with literal extensions, even across includes, e.g. Don't follow you. When asterisk matches an extension, it starts interating through the priorities until there's none left, or you Goto() somewhere else. Not exactly, and this may be where you're feeling unduly restricted. The asterisk engine always searches for the combination of extension and priority at every step. So if you dial extension 123, it will look in the relevant context (and then any included contexts, in order) for a line that matches (123,1). This could be 123,1 or _X.,1 or _1XX,1, and so on. When found, it executes the command (application) specified on that line. If the command was not any kind of goto, Asterisk then increments the priority from 1 to 2, and then does a completely fresh search for (123,2). This could again be matched by 123,2 or _X.,2 or _X2X,2 or whatever, and DOESN'T HAVE TO BE THE SAME PATTERN, NOR IN THE SAME INCLUDE, AS THE LINE THAT MATCHED (123,1). This is the point. However, please try to get away from the mindset of wanting Asterisk to do stuff while it is searching. It can only execute things that are on lines that fulfil its search. Many of us are trying to suggest solutions based on what Asterisk CAN do. *WE* get frustrated when you reject such suggestions because you want Asterisk to work in a way it doesn't. Please start to see Asterisk as a fun challenge rather than something that has been inflicted upon you! Cheers Tony -- Tony Mountifield Work: [EMAIL PROTECTED] - http://www.softins.co.uk Play: [EMAIL PROTECTED] - http://tony.mountifield.org ___ --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] Re: Match a Numer - then continue with dialplan
DG == Douglas Garstang [EMAIL PROTECTED] writes: DG Ok, but how does that help me? All I want to do is set a variable DG to be used later on in the dialplan. Eg, if someone dialls DG 2944000, which is in a different company...: DG [co1_phone-start] DG include = co1_did DG include = sys_glue DG [co1_did] DG exten = 3254101,1,Dial(SIP/3254101,18,tr) DG exten = 3254102,1,Dial(SIP/3254102,18,tr) DG exten = 3254103,1,Dial(SIP/3254103,18,tr) DG ; No match, so now we want to use the external caller id variable for use later on, when DG ; we finally dial the dest number after performing all restriction and feature checks. DG ; Actually I just realised we want to SET the caller id. DG [sys-glue] DG include co1_did DG include co2_did Change co1_phone-start to: include = co1_did exten = _.,1,Set(CALLERID(num)=12345) exten = _.,n,Goto(sys-glue,${EXTEN},1) /Benny ___ --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] Re: Match a Numer - then continue with, dialplan
Firstly, in the setup you are envisaging, how do you distinguish which company the caller is calling from? Their extensions number? The context at which they enter the dialplan? Or something else? Good questions, all of them. Unfortnately, I don't have answers to them. I wanted to take our 3000 line python script, which we'd used due to inadequacies of the dialplan, and throw the horrible nasty thing out the window. Secondly, how do you distinguish between destination numbers in one company from those in another? Number range? Context? Tony, Thank you for asking the appropriate questions! I think you've gotten to the crux of the matter. Doug, take some Advil and read the rest of this post tomorrow! :) At my work, we have a saying that we use when trying to figure out how to overcome some technical challenge. It helps us to focus on the solution, not the problem. We simply ask, What is Utopia? Then, in plain English, we describe the perfect world. (Choose the language of your locale for this exercise.) Doug, could we try this exercise? Could you collate the bits and pieces of your posts in this thread and distill them into a point-by-point description of your Utopia? Use as few technical terms and Asterisk-specific references as possible. A good starting point is the list of to-do's that you do for each call: Do they have voicemail? Do they have feature ABC? Do they have feature XYZ? After listing all of that, then give us the description of what needs to happen next, the part about deciding which caller ID info to send. Pretend like you're explaining it to a bunch of idiots who understand only small words and short sentences. :) My gut tells me that the solution lies in the big picture, not the details. The more eyes that see the big picture the better. Thanks for your patience! -MC ___ --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] Re: Match a Numer - then continue with, dialplan
In article [EMAIL PROTECTED], Douglas Garstang [EMAIL PROTECTED] wrote: From: Tony Mountifield [mailto:[EMAIL PROTECTED] Firstly, in the setup you are envisaging, how do you distinguish which company the caller is calling from? Their extensions number? The context at which they enter the dialplan? Or something else? Good questions, all of them. Unfortnately, I don't have answers to them. I wanted to take our 3000 line python script, which we'd used due to inadequacies of the dialplan, and throw the horrible nasty thing out the window. Well, OK. But how did IT know whether a source extension or a destination number belonged to company A, B or C? Secondly, how do you distinguish between destination numbers in one company from those in another? Number range? Context? My brain hurts. Hmmm. If you're trying to make logic decisions, or we're trying to suggest possibilities, you/we need to know on what information the decisions are to be based! Cheers Tony. -- Tony Mountifield Work: [EMAIL PROTECTED] - http://www.softins.co.uk Play: [EMAIL PROTECTED] - http://tony.mountifield.org ___ --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] Re: Match a Numer - then continue with, dialplan
Douglas Garstang wrote: -Original Message- From: David Gomillion [mailto:[EMAIL PROTECTED] *snipped David, this is completely different from what I am trying to do. Let's try this a different way. Let's say you have two companies. When someone calls a number in their own company, we use their INTERNAL caller id. When they call someone in another company, we want to send their EXTERNAL caller id. How would you do this? Doug. if it is just callerid then wouldn't the gf stuff (if it still exists) work? it was something like (man i'm getting old, looking up in wiki) exten = s,1,Answer() exten = s,,2,Set(CALLERID(name)=OUTSIDE NAME|CALLERID(num)=xx) exten = s,2,Set(CALLERID(name)=INSIDE NAME|CALLERID(num)=xx) exten = s,3,Dial(yadda) would obviously be the callerid num of the internal exten ___ --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] Re: Match a Numer - then continue with, dialplan
Richard Lyman wrote: Douglas Garstang wrote: -Original Message- From: David Gomillion [mailto:[EMAIL PROTECTED] *snipped David, this is completely different from what I am trying to do. Let's try this a different way. Let's say you have two companies. When someone calls a number in their own company, we use their INTERNAL caller id. When they call someone in another company, we want to send their EXTERNAL caller id. How would you do this? Doug. if it is just callerid then wouldn't the gf stuff (if it still exists) work? it was something like (man i'm getting old, looking up in wiki) exten = s,1,Answer() exten = s,,2,Set(CALLERID(name)=OUTSIDE NAME|CALLERID(num)=xx) exten = s,2,Set(CALLERID(name)=INSIDE NAME|CALLERID(num)=xx) exten = s,3,Dial(yadda) would obviously be the callerid num of the internal exten grr, i hate when i typo (and reply to my own posts) exten = s/,2,Set(CALLERID(name)=OUTSIDE NAME|CALLERID(num)=xx) / after the s sorry ___ --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] Re: Match a Numer - then continue with, dialplan
-Original Message- From: Richard Lyman [mailto:[EMAIL PROTECTED] Sent: Wednesday, December 20, 2006 4:29 PM To: Asterisk Users Mailing List - Non-Commercial Discussion Subject: Re: [asterisk-users] Re: Match a Numer - then continue with, dialplan Douglas Garstang wrote: -Original Message- From: David Gomillion [mailto:[EMAIL PROTECTED] *snipped David, this is completely different from what I am trying to do. Let's try this a different way. Let's say you have two companies. When someone calls a number in their own company, we use their INTERNAL caller id. When they call someone in another company, we want to send their EXTERNAL caller id. How would you do this? Doug. if it is just callerid then wouldn't the gf stuff (if it still exists) work? it was something like (man i'm getting old, looking up in wiki) exten = s,1,Answer() exten = s,,2,Set(CALLERID(name)=OUTSIDE NAME|CALLERID(num)=xx) exten = s,2,Set(CALLERID(name)=INSIDE NAME|CALLERID(num)=xx) exten = s,3,Dial(yadda) would obviously be the callerid num of the internal exten If there's hundreds of companies on this box, we'd need an exponentially larger number of statements... ___ --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] Re: Match a Numer - then continue with, dialplan
On Wed, 20 Dec 2006, Michael Collins wrote: After listing all of that, then give us the description of what needs to happen next, the part about deciding which caller ID info to send. Pretend like you're explaining it to a bunch of idiots who understand only small words and short sentences. :) Damn, I didn't know Bush was subscribed to this list! ___ --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] Re: Match a Numer - then continue with, dialplan
I seriously doubt he'd know how to get on the 'Internets' -Original Message- From: Doug Crompton [mailto:[EMAIL PROTECTED] Sent: Wed 12/20/2006 8:07 PM To: Asterisk Users Mailing List - Non-Commercial Discussion Cc: Subject:RE: [asterisk-users] Re: Match a Numer - then continue with, dialplan On Wed, 20 Dec 2006, Michael Collins wrote: After listing all of that, then give us the description of what needs to happen next, the part about deciding which caller ID info to send. Pretend like you're explaining it to a bunch of idiots who understand only small words and short sentences. :) Damn, I didn't know Bush was subscribed to this list! ___ --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