Re: [Asterisk-Users] Prefix the * character
On Sun, Dec 07, 2003 at 10:57:33PM -0600, Tilghman Lesher wrote: Prefix is an older application which was more useful prior to being able to manipulate variables (the days of BYEXTENSION instead of ${EXTEN}). Instead, do: Dial(SIP/[EMAIL PROTECTED]) I have a smilar problem : I have a default context for an interface, where I'd like to prefix all incoming calls DID numbers (basically, the telco sends the last 4 digits dialed, I want to fully qualify my E164 number before doing extensions processing). I don't know much (yet!) about Asterisk, so I thought something like exten = s,1,Prefix(3312345) include = my_local_e164_extensions would do the trick. Unfortunatly, if the ${EXTEN} was 6060 at that time, I get a new extension as s6060 (instead of 33123456060). Is it supposed to be this way ? So instead I had to do something like exten = _,1,Prefix(3312345) include = my_local_e164_extension which works fine, except that now I'm at the 2 level in the context, and I had to modify my_local_e164 extension context accordingly. Does somebody know of a better way to do it ? Thanks. -- Nicolas Bougues Axialys Interactive ___ Asterisk-Users mailing list [EMAIL PROTECTED] http://lists.digium.com/mailman/listinfo/asterisk-users
RE: [Asterisk-Users] Prefix the * character
[EMAIL PROTECTED] wrote: I have a smilar problem : I have a default context for an interface, where I'd like to prefix all incoming calls DID numbers (basically, the telco sends the last 4 digits dialed, I want to fully qualify my E164 number before doing extensions processing). I don't know much (yet!) about Asterisk, so I thought something like exten = s,1,Prefix(3312345) include = my_local_e164_extensions would do the trick. Unfortunatly, if the ${EXTEN} was 6060 at that time, I get a new extension as s6060 (instead of 33123456060). Is it supposed to be this way ? So instead I had to do something like exten = _,1,Prefix(3312345) include = my_local_e164_extension which works fine, except that now I'm at the 2 level in the context, and I had to modify my_local_e164 extension context accordingly. Does somebody know of a better way to do it ? Thanks. The lines in a context get reordered. If you want to force the order of those lines, put the exten lines in separate contexts and include them... something like this: [some-context] include = prefix include = my_local_e164_extension [prefix] exten = _,1,Prefix(3312345) I don't know if that will solve your problem, but it is something to consider. Barton ___ Asterisk-Users mailing list [EMAIL PROTECTED] http://lists.digium.com/mailman/listinfo/asterisk-users
Re: [Asterisk-Users] Prefix the * character
On Mon, Dec 08, 2003 at 08:58:07AM -0600, Barton Hodges wrote: The lines in a context get reordered. If you want to force the order of those lines, put the exten lines in separate contexts and include them... something like this: [some-context] include = prefix include = my_local_e164_extension [prefix] exten = _,1,Prefix(3312345) I don't know if that will solve your problem, but it is something to consider. My problem is that the exten lines in my_local_e164_extension still have to start at 2, since prefix used the 1 position, and that's what I'd like to avoid by using s. To do that, I put immediate=yes on my PRI in zapata.conf, but unfortunatly the Prefix command will use s as the extension, and generate a new extension like 3316918s, which is not really nice. Is there any way ta manipulate ${EXTEN} as a variable, rather that wich the Prefix function ? If so, I haven't found out. -- Nicolas Bougues Axialys Interactive ___ Asterisk-Users mailing list [EMAIL PROTECTED] http://lists.digium.com/mailman/listinfo/asterisk-users
RE: [Asterisk-Users] Prefix the * character
[EMAIL PROTECTED] wrote: On Mon, Dec 08, 2003 at 08:58:07AM -0600, Barton Hodges wrote: The lines in a context get reordered. If you want to force the order of those lines, put the exten lines in separate contexts and include them... something like this: [some-context] include = prefix include = my_local_e164_extension [prefix] exten = _,1,Prefix(3312345) I don't know if that will solve your problem, but it is something to consider. My problem is that the exten lines in my_local_e164_extension still have to start at 2, since prefix used the 1 position, and that's what I'd like to avoid by using s. To do that, I put immediate=yes on my PRI in zapata.conf, but unfortunatly the Prefix command will use s as the extension, and generate a new extension like 3316918s, which is not really nice. Is there any way ta manipulate ${EXTEN} as a variable, rather that wich the Prefix function ? If so, I haven't found out. You could always do something like this: exten = 2,1,Dial(WHEREVER,3312345${EXTEN}) or assign it to a new variable: exten = 2,1,SetVar(NEWEXTEN=3312345${EXTEN}) exten = 2,2,Dial(WHEREVER,${NEWEXTEN}) If I still don't have a grasp on what you're trying to accomplish, could you post your extensions.conf? Barton ___ Asterisk-Users mailing list [EMAIL PROTECTED] http://lists.digium.com/mailman/listinfo/asterisk-users
Re: [Asterisk-Users] Prefix the * character
On Mon, 2003-12-08 at 09:15, Nicolas Bougues wrote: On Mon, Dec 08, 2003 at 08:58:07AM -0600, Barton Hodges wrote: The lines in a context get reordered. If you want to force the order of those lines, put the exten lines in separate contexts and include them... something like this: [some-context] include = prefix include = my_local_e164_extension [prefix] exten = _,1,Prefix(3312345) I don't know if that will solve your problem, but it is something to consider. My problem is that the exten lines in my_local_e164_extension still have to start at 2, since prefix used the 1 position, and that's what I'd like to avoid by using s. To do that, I put immediate=yes on my PRI in zapata.conf, but unfortunatly the Prefix command will use s as the extension, and generate a new extension like 3316918s, which is not really nice. With immediate=yes you won't be capturing your DID information. So turn it back to no. Then do a pattern match in your [prefix] context. Something like below. [prefix] exten = _,1,Goto(my_local_e164_extension,3312345${EXTEN},1) This will do the proper jump and get you back to priority 1 as you want. It also eliminates the need for an include into this context. Is there any way ta manipulate ${EXTEN} as a variable, rather that wich the Prefix function ? If so, I haven't found out. -- Steven Critchfield [EMAIL PROTECTED] ___ Asterisk-Users mailing list [EMAIL PROTECTED] http://lists.digium.com/mailman/listinfo/asterisk-users
[Asterisk-Users] Prefix the * character
Any ideas on how to do this one? FWD requires an * on certain calls as a prefix character, but I cannot seem to be able to get Prefix(*) to add that to the front of the extension that is dialed... Setting up an extension that dials (SIP/[EMAIL PROTECTED]) works just fine, but in trying to add the prefix to a dialed number, it acts as if the Prefix command was not even there, ie: exten = 1,1,Prefix(*) exten = *1,2,Dial(SIP/[EMAIL PROTECTED]) would dial [EMAIL PROTECTED], and not [EMAIL PROTECTED] Any ideas? Tnx Kris ___ Asterisk-Users mailing list [EMAIL PROTECTED] http://lists.digium.com/mailman/listinfo/asterisk-users
Re: [Asterisk-Users] Prefix the * character
On Sunday 07 December 2003 22:48, Kris Stark wrote: Any ideas on how to do this one? FWD requires an * on certain calls as a prefix character, but I cannot seem to be able to get Prefix(*) to add that to the front of the extension that is dialed... Setting up an extension that dials (SIP/[EMAIL PROTECTED]) works just fine, but in trying to add the prefix to a dialed number, it acts as if the Prefix command was not even there, ie: exten = 1,1,Prefix(*) exten = *1,2,Dial(SIP/[EMAIL PROTECTED]) would dial [EMAIL PROTECTED], and not [EMAIL PROTECTED] Any ideas? Prefix is an older application which was more useful prior to being able to manipulate variables (the days of BYEXTENSION instead of ${EXTEN}). Instead, do: Dial(SIP/[EMAIL PROTECTED]) -Tilghman ___ Asterisk-Users mailing list [EMAIL PROTECTED] http://lists.digium.com/mailman/listinfo/asterisk-users
Re: [Asterisk-Users] Prefix the * character
exten = _7X,2,Dial(SIP/*${EXTEN:[EMAIL PROTECTED]) On Sun, 7 Dec 2003, Kris Stark wrote: Any ideas on how to do this one? FWD requires an * on certain calls as a prefix character, but I cannot seem to be able to get Prefix(*) to add that to the front of the extension that is dialed... Setting up an extension that dials (SIP/[EMAIL PROTECTED]) works just fine, but in trying to add the prefix to a dialed number, it acts as if the Prefix command was not even there, ie: would dial [EMAIL PROTECTED], and not [EMAIL PROTECTED] Any ideas? Tnx Kris ___ Asterisk-Users mailing list [EMAIL PROTECTED] http://lists.digium.com/mailman/listinfo/asterisk-users ___ Asterisk-Users mailing list [EMAIL PROTECTED] http://lists.digium.com/mailman/listinfo/asterisk-users
Re: [Asterisk-Users] Prefix the * character
On Sun, 2003-12-07 at 23:57, Tilghman Lesher wrote: On Sunday 07 December 2003 22:48, Kris Stark wrote: Any ideas on how to do this one? FWD requires an * on certain calls as a prefix character, but I cannot seem to be able to get Prefix(*) to add that to the front of the extension that is dialed... Setting up an extension that dials (SIP/[EMAIL PROTECTED]) works just fine, but in trying to add the prefix to a dialed number, it acts as if the Prefix command was not even there, ie: exten = 1,1,Prefix(*) exten = *1,2,Dial(SIP/[EMAIL PROTECTED]) would dial [EMAIL PROTECTED], and not [EMAIL PROTECTED] Any ideas? Prefix is an older application which was more useful prior to being able to manipulate variables (the days of BYEXTENSION instead of ${EXTEN}). Instead, do: Dial(SIP/[EMAIL PROTECTED]) -Tilghman Thanks! I actually had tried this to no avail, but then noticed after digging through that it was in fact using the wrong entry to begin with... An simpler match was being made, and so it never got to that part of the dialplan... Thanks again! Kris ___ Asterisk-Users mailing list [EMAIL PROTECTED] http://lists.digium.com/mailman/listinfo/asterisk-users