Hi guys:
i need to set an extension in my dialplan?in which?it divert calls if?the
extension?contain specific series ,For example?:
I need to divert calls which contain 3333 to specific? extension?(contain ,not
start or end with), as i know i should set Gotoif command but i?dont know what
to set after that,Any help will be appreciated.???
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
http://lists.digium.com/pipermail/asterisk-users/attachments/20100428/abcd6e8c/attachment.htm
Are talking about something like
exten => _.3333.,1,Noop(Have 3333 in this extension)
There is also this function that can be used to look for sub strings inside a
string.
core show function REGEX
-= Info about function 'REGEX' =-
[Syntax]
REGEX("<regular expression>" <data>)
[Synopsis]
Regular Expression
[Description]
Returns 1 if data matches regular expression, or 0 otherwise.
Please note that the space following the double quotes separating the regex from
the data
is optional and if present, is skipped. If a space is desired at the beginning
of the data,
then put two spaces there; the second will not be skipped.
--
Jim Dickenson
mailto:dickenson at cfmc.com
CfMC
http://www.cfmc.com/
On Apr 28, 2010, at 5:49 AM, wassim darwich wrote:
> Hi guys:
> i need to set an extension in my dialplan in which it divert calls if the
extension contain specific series ,For example :
> I need to divert calls which contain 3333 to specific extension (contain
,not start or end with), as i know i should set Gotoif command but i dont know
what to set after that,Any help will be appreciated.
>
> --
> _____________________________________________________________________
> -- Bandwidth and Colocation Provided by http://www.api-digital.com --
> New to Asterisk? Join us for a live introductory webinar every Thurs:
> http://www.asterisk.org/hello
>
> asterisk-users mailing list
> To UNSUBSCRIBE or update options visit:
> http://lists.digium.com/mailman/listinfo/asterisk-users
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
http://lists.digium.com/pipermail/asterisk-users/attachments/20100428/edea75c0/attachment.htm
GotoIf($["${CALLERID}":".*333.*"]?your_extension) (untested)
Something like that (fix variable name to suitable). Check Asterisk regular
expressions.
http://www.voip-info.org/wiki/view/Asterisk+Expressions#Regularexpressions
On Wed, Apr 28, 2010 at 3:49 PM, wassim darwich <wassimdarwich1 at
yahoo.com>
wrote:>
> Hi guys:
> i need to set an extension in my dialplan in which it divert calls if the
extension contain specific series ,For example :> I need to divert calls which contain 3333 to specific extension (contain
,not start or end with), as i know i should set Gotoif command but i dont
know what to set after that,Any help will be
appreciated.>
> --
> _____________________________________________________________________
> -- Bandwidth and Colocation Provided by http://www.api-digital.com --
> New to Asterisk? Join us for a live introductory webinar every Thurs:
> http://www.asterisk.org/hello
>
> asterisk-users mailing list
> To UNSUBSCRIBE or update options visit:
> http://lists.digium.com/mailman/listinfo/asterisk-users
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
http://lists.digium.com/pipermail/asterisk-users/attachments/20100428/73c64550/attachment.htm