how does a GotoIf-challenge look like to match e.g. only the first two digits? i want to strip the first two digits from an incoming pstn-call and add a zero instead so when i forward a call to a mobile the called party gets the correct number of the caller. at the moment, incoming calls from the austrian pstn are recognized as e.g. 43650123123 by asterisk, when i forward the call e.g. to a mobile, the austrian telcos add a +43 to the number so it appears as +4343650123123 to the called person(when the first digit would be a zero, it is beeing stripped and the +43 added so it would appear correct). since not all calls should be handled that way, i need a gotoif-challenge. but how does the challenge look like to match only the first two digits? Thank you for your help! regards christian
After reading http://www.voip-info.org/tiki-index.php?page=Asterisk%20cmd%20GotoIf _thoroughly_ i've realized that the match would look like "${CALLERIDNUM:0:2}" = "43". there doesn't seem to be an OR function though - would be nice... On Sat, 10 Sep 2005 09:46:21 +0200 ChB <a0305292@unet.univie.ac.at> wrote:> how does a GotoIf-challenge look like to match e.g. only the first two digits? i want to strip the first two digits from an incoming pstn-call and add a zero instead so when i forward a call to a mobile the called party gets the correct number of the caller. at the moment, incoming calls from the austrian pstn are recognized as e.g. 43650123123 by asterisk, when i forward the call e.g. to a mobile, the austrian telcos add a +43 to the number so it appears as +4343650123123 to the called person(when the first digit would be a zero, it is beeing stripped and the +43 added so it would appear correct). since not all calls should be handled that way, i need a gotoif-challenge. but how does the challenge look like to match only the first two digits? Thank you for your help! > > regards > christian
i'm sorry, i still have a problem to edit the callerID - since stripMSD and prefix seem to work only for extensions, how can i edit the number automated(i mean not like SetCIDNum(0650123123) but a valid rule for all numbers beginning with 43)? thanks for your input christian On Sat, 10 Sep 2005 09:46:21 +0200 ChB <a0305292@unet.univie.ac.at> wrote:> how does a GotoIf-challenge look like to match e.g. only the first two digits? i want to strip the first two digits from an incoming pstn-call and add a zero instead so when i forward a call to a mobile the called party gets the correct number of the caller. at the moment, incoming calls from the austrian pstn are recognized as e.g. 43650123123 by asterisk, when i forward the call e.g. to a mobile, the austrian telcos add a +43 to the number so it appears as +4343650123123 to the called person(when the first digit would be a zero, it is beeing stripped and the +43 added so it would appear correct). since not all calls should be handled that way, i need a gotoif-challenge. but how does the challenge look like to match only the first two digits? Thank you for your help! > > regards > christian > _______________________________________________ > --Bandwidth and Colocation sponsored by Easynews.com -- > > Asterisk-Users mailing list > Asterisk-Users@lists.digium.com > http://lists.digium.com/mailman/listinfo/asterisk-users > To UNSUBSCRIBE or update options visit: > http://lists.digium.com/mailman/listinfo/asterisk-users