| Asterisk Support Forum Technical support, how-to guides, troubleshooting, and general assistance, from beginner to seasoned pro, this is where to discuss Asterisk, the most powerful open source PBX. |  | 
February 20th, 2006, 01:23 AM
| | Senior Member | | Join Date: Dec 2004
Posts: 192
| | Want calls from the Whitehouse routed to my cell phone Okay, I really don't but it's the easiest way to ask this, and I have been looking around, and didn't see an answer that works.
Lets say I am the Vice prez, and I want all calls from the Whitehouse 1 202 456 1414 to goto my cell phone.. I know they have a pbx, and sometimes the number that goes out is 2024561400 or 1411 or 1401, you get the idea.
So I want all calls that come from 202456XXXX to get routed to my cell phone... how do I do this w/o having to write some logical script.
For example, lets say my DID is 4085551212 if I put
exten => _4085551212/202456XXXX,1,Answer
exten => _4085551212/202456XXXX,1,Goto(custom-mycellphone,s,1)
doesn't work..doesn't even filter, all calls with a 202456xxxx get handeled the same way as ones that are not.
Neither does 4085551212/_202456XXXX
or I've even tried s/202456XXXX or s/_202456XXXX not working either...
Any ideas? Thank you! | 
February 20th, 2006, 01:41 AM
|  | Senior Member | | Join Date: Aug 2004 Location: USA or Japan
Posts: 5,013
| | RE: Want calls from the Whitehouse routed to my cell phone Have you read this thread yet? In there, earlier today I described how to discriminate on Caller ID using the GotoIf command instead of the xxx/xxx method. This should do exactly what you are looking for.
__________________ Please do not send technical questions via PM.
Please post all questions to the forum. | 
February 20th, 2006, 04:48 AM
| | Senior Member | | Join Date: Dec 2004
Posts: 192
| | RE: Want calls from the Whitehouse routed to my cell phone mberlant, I did see that post, however, I thought you were matching your gotoif using a specific whole 10 number, which is what the author of the thread wanted, but it did come up later, what I wanted, and that was to match partial numbers. I guess it's just going to have to be written out to have a gotoIF matching the first few digits.
I was hoping there would be a more simple way of doing it. Like the other methods with matching DID/caller ID with wildcards.
So here is my best guess at it..using what you have provided... Code: exten => 4085551212,1,Answer
exten => 4085551212,2,GotoIf($["${CALLERIDNUM:0:6}" = "202456"]?s|101)
exten => 4085551212,3,Goto(custom-normal-in-here,s,1) ; direct all other calls here
exten => 4085551212,100,Hangup
exten => 4085551212,101,Goto(custom-mycellphone,s,1) ; direct all calls from 202-456-xxxx to cell
exten => 4085551212,102,Hangup
| 
February 20th, 2006, 02:00 PM
|  | Senior Member | | Join Date: Aug 2004 Location: USA or Japan
Posts: 5,013
| | RE: Want calls from the Whitehouse routed to my cell phone I'd need to confirm with cmd info gotoif, but I think that your ?s|201 should be ?201 instead. Other than that, what you presented here should get Dubya's calls right through to your cell phone.
__________________ Please do not send technical questions via PM.
Please post all questions to the forum. | 
February 21st, 2006, 01:44 AM
| | Senior Member | | Join Date: Dec 2004
Posts: 192
| | RE: Want calls from the Whitehouse routed to my cell phone thanks mberlant!
Both ways worked! (with and w/o the |) - so I spoofed my caller ID to myself to verify, and it caught that.. I am also blocking all calls with 000 000 0000 xxx 555 1212 and a big list of spammers. Thanks again for all your help.
__________________ [iSEPIC] |  | | Thread Tools | | | | Display Modes | Rate This Thread | Linear Mode | |
Posting Rules
| You may not post new threads You may not post replies You may not post attachments You may not edit your posts HTML code is Off | | | | | |