Blocking calls in onMessage

I'm sure this one has been asked before, but I can't seem to find anything:
I have a servlet client listening to a tempory message queue. The sample code
for such a thing from BEA use object.wait and notify to block and collect all
the messages, and exits only when a preset count of messages received is reached.
In my case I know that number as well, but what happens if the servlet doesn't
get the required number? It will sit in the blocked state FOREVER. I'm thinking
of setting a java.util.timer to wake up after a certain time, but I hear that
is bad news in an EJB system.
Is the 'Timer for Application Servers' for real? I saw the code, but is it really
usuable? And if not how in heavens name do you timeout a blocked queue listener?
Thanks in advance.

"Don Henton" <[email protected]> wrote in message news:40868b31$[email protected]..
>
I'm sure this one has been asked before, but I can't seem to find anything:
I have a servlet client listening to a tempory message queue. The sample code
for such a thing from BEA use object.wait and notify to block and collect all
the messages, and exits only when a preset count of messages received is reached.
In my case I know that number as well, but what happens if the servlet doesn't
get the required number? It will sit in the blocked state FOREVER. I'm thinking
of setting a java.util.timer to wake up after a certain time, but I hear that
is bad news in an EJB system.You can use wait(long time) method to ensure that you don't wait forever.
Regards,
Slava Imeshev

Similar Messages

  • Assertion failed: poll() is a blocking call and cannot be called on the Service thread

    Hi
    We are getting a strange issue, the application successfully joins the cluster but after start failing with following exception.
    The cluster have three nodes storage disabled web-logic and two standalone coherence JVM's, we are using distributed cache with Local scheme
    <Error> (thread=DistributedCache, member=4): Assertion failed: poll() is a blocking call and cannot be called on the Service thread
    at com.tangosol.coherence.component.util.daemon.queueProcessor.service.Grid.poll(Grid.CDB:5)
    at com.tangosol.coherence.component.util.daemon.queueProcessor.service.Grid.poll(Grid.CDB:11)
    at com.tangosol.coherence.component.util.daemon.queueProcessor.service.grid.partitionedService.PartitionedCache$BinaryMap.get(PartitionedCache.CDB:26)
    at com.tangosol.util.ConverterCollections$ConverterMap.get(ConverterCollections.java:1655)
    at com.tangosol.coherence.component.util.daemon.queueProcessor.service.grid.partitionedService.PartitionedCache$ViewMap.get(PartitionedCache.CDB:1)
    at com.tangosol.coherence.component.util.SafeNamedCache.get(SafeNamedCache.CDB:1)
    at com.thehartford.pi.core.referencedata.dao.cachedaoimpl.ReferenceCacheDAOImpl.getReferenceData(Unknown Source)
    at com.thehartford.pi.core.caching.cachestore.ReferenceCacheStore.load(Unknown Source)
    at com.tangosol.net.cache.ReadWriteBackingMap$CacheLoaderCacheStore.load(ReadWriteBackingMap.java:6132)
    at com.tangosol.net.cache.ReadWriteBackingMap$CacheStoreWrapper.loadInternal(ReadWriteBackingMap.java:5616)
    at com.tangosol.net.cache.ReadWriteBackingMap$StoreWrapper.load(ReadWriteBackingMap.java:4698)
    at com.tangosol.net.cache.ReadWriteBackingMap.get(ReadWriteBackingMap.java:717)
    at com.tangosol.coherence.component.util.daemon.queueProcessor.service.grid.partitionedService.PartitionedCache$Storage.get(PartitionedCache.CDB:10)
    at com.tangosol.coherence.component.util.daemon.queueProcessor.service.grid.partitionedService.PartitionedCache.onGetRequest(PartitionedCache.CDB:23)
    at com.tangosol.coherence.component.util.daemon.queueProcessor.service.grid.partitionedService.PartitionedCache$GetRequest.run(PartitionedCache.CDB:1)
    at com.tangosol.coherence.component.net.message.requestMessage.DistributedCacheKeyRequest.onReceived(DistributedCacheKeyRequest.CDB:12)
    at com.tangosol.coherence.component.util.daemon.queueProcessor.service.Grid.onMessage(Grid.CDB:34)
    at com.tangosol.coherence.component.util.daemon.queueProcessor.service.Grid.onNotify(Grid.CDB:33)
    at com.tangosol.coherence.component.util.daemon.queueProcessor.service.grid.PartitionedService.onNotify(PartitionedService.CDB:3)
    at com.tangosol.coherence.component.util.daemon.queueProcessor.service.grid.partitionedService.PartitionedCache.onNotify(PartitionedCache.CDB:3)
    at com.tangosol.coherence.component.util.Daemon.run(Daemon.CDB:42)
    at java.lang.Thread.run(Thread.java:722)
    ERROR 2013-09-20 09:06:42,515    :  [2013-09-20 09:06:42.515/8740.228 Oracle Coherence GE 3.7.1.0 <Error> (thread=DistributedCache, member=4): Assertion failed: poll() is a blocking call and cannot be called on the Service thread
    at com.tangosol.coherence.component.util.daemon.queueProcessor.service.Grid.poll(Grid.CDB:5)
    at com.tangosol.coherence.component.util.daemon.queueProcessor.service.Grid.poll(Grid.CDB:11)
    at com.tangosol.coherence.component.util.daemon.queueProcessor.service.grid.partitionedService.PartitionedCache$BinaryMap.get(PartitionedCache.CDB:26)
    at com.tangosol.util.ConverterCollections$ConverterMap.get(ConverterCollections.java:1655)
    at com.tangosol.coherence.component.util.daemon.queueProcessor.service.grid.partitionedService.PartitionedCache$ViewMap.get(PartitionedCache.CDB:1)
    at com.tangosol.coherence.component.util.SafeNamedCache.get(SafeNamedCache.CDB:1)
    at com.thehartford.pi.core.referencedata.dao.cachedaoimpl.ReferenceCacheDAOImpl.getReferenceData(Unknown Source)
    at com.thehartford.pi.core.caching.cachestore.ReferenceCacheStore.load(Unknown Source)
    at com.tangosol.net.cache.ReadWriteBackingMap$CacheLoaderCacheStore.load(ReadWriteBackingMap.java:6132)
    at com.tangosol.net.cache.ReadWriteBackingMap$CacheStoreWrapper.loadInternal(ReadWriteBackingMap.java:5616)
    at com.tangosol.net.cache.ReadWriteBackingMap$StoreWrapper.load(ReadWriteBackingMap.java:4698)
    at com.tangosol.net.cache.ReadWriteBackingMap.get(ReadWriteBackingMap.java:717)
    at com.tangosol.coherence.component.util.daemon.queueProcessor.service.grid.partitionedService.PartitionedCache$Storage.get(PartitionedCache.CDB:10)
    at com.tangosol.coherence.component.util.daemon.queueProcessor.service.grid.partitionedService.PartitionedCache.onGetRequest(PartitionedCache.CDB:23)
    at com.tangosol.coherence.component.util.daemon.queueProcessor.service.grid.partitionedService.PartitionedCache$GetRequest.run(PartitionedCache.CDB:1)
    at com.tangosol.coherence.component.net.message.requestMessage.DistributedCacheKeyRequest.onReceived(DistributedCacheKeyRequest.CDB:12)
    at com.tangosol.coherence.component.util.daemon.queueProcessor.service.Grid.onMessage(Grid.CDB:34)
    at com.tangosol.coherence.component.util.daemon.queueProcessor.service.Grid.onNotify(Grid.CDB:33)
    at com.tangosol.coherence.component.util.daemon.queueProcessor.service.grid.PartitionedService.onNotify(PartitionedService.CDB:3)
    at com.tangosol.coherence.component.util.daemon.queueProcessor.service.grid.partitionedService.PartitionedCache.onNotify(PartitionedCache.CDB:3)
              at com.tangosol.coherence.component.util.Daemon.run(Daemon.CDB:42)

    Hi
    The problem is that you are making a re-entrant call back into a cache service from the service thread or worker thread of a cache service. This is a bad thing to do as you risk deadlocking your cluster by consuming all of the threads in the service. From the stack trace it looks like you are doing a get on a cache which is calling through to a cache store which is then doing a get on another cache.
    For example, you have done a "get" on a cache, that has now consumed a worker thread (call it Thread-1), that thread is calling the cache store which is doing a get on another cache in the same cache service so will now consume another thread (call it Thread-2) so you now have two threads in use, Thread-1 will not return until Thread-2 completes. Now say you had 2 worker threads on your cache service and two "get" calls came in at the same time, Get-1 and Get-2. Both worker threads are now in use so when Get-1 calls the cache store to do a get on the other cache then it has to wait for a worker thread to become free to process the get. The same applies to Get-2, it is calling the cache store and waiting for a thread to become free. The problem is no threads will become free as they are all waiting. Hopefully that is a clear enough explanation of why you get the warning.
    Read this Constraints on Re-entrant Calls - 12c (12.1.2) This is for 12.1.2 but the same applies for any Coherence version.
    JK

  • AssertionException poll() is blocking call cant be called on Service thread

    I'm getting this:
    Exception in thread "main" (Wrapped: Failed request execution for DistributedCache service on Member(Id=1, Timestamp=2009-07-16 15:23:58.704,
    Address=192.168.10.167:8088, MachineId=25255, Location=machine:box2,process:4700, Role=CoherenceServer)) com.tangosol.util.AssertionException: poll()
    is a blocking call and cannot be called on the Service thread
         at com.tangosol.util.Base.ensureRuntimeException(Base.java:293)
         at com.tangosol.coherence.component.util.daemon.queueProcessor.service.Grid.tagException(Grid.CDB:36)
         at com.tangosol.coherence.component.util.daemon.queueProcessor.service.grid.DistributedCache.onPutRequest(DistributedCache.CDB:66)
         at com.tangosol.coherence.component.util.daemon.queueProcessor.service.grid.DistributedCache$PutRequest.run(DistributedCache.CDB:1)
         at com.tangosol.coherence.component.net.message.requestMessage.DistributedCacheKeyRequest.onReceived(DistributedCacheKeyRequest.CDB:12)
         at com.tangosol.coherence.component.net.message.requestMessage.distributedCacheKeyRequest.ExtendedKeyRequest.onReceived(ExtendedKeyRequest.CDB:4)
         at com.tangosol.coherence.component.util.daemon.queueProcessor.service.Grid.onMessage(Grid.CDB:9)
         at com.tangosol.coherence.component.util.daemon.queueProcessor.service.Grid.onNotify(Grid.CDB:136)
         at com.tangosol.coherence.component.util.daemon.queueProcessor.service.grid.DistributedCache.onNotify(DistributedCache.CDB:3)
         at com.tangosol.coherence.component.util.Daemon.run(Daemon.CDB:37)
         at java.lang.Thread.run(Thread.java:619)
    Caused by: com.tangosol.util.AssertionException: poll() is a blocking call and cannot be called on the Service thread
         at com.tangosol.coherence.Component._assertFailed(Component.CDB:12)
         at com.tangosol.coherence.Component._assert(Component.CDB:3)
         at com.tangosol.coherence.component.util.daemon.queueProcessor.service.Grid.poll(Grid.CDB:4)
         at com.tangosol.coherence.component.util.daemon.queueProcessor.service.Grid.poll(Grid.CDB:11)
         at com.tangosol.coherence.component.util.daemon.queueProcessor.service.grid.DistributedCache$BinaryMap.containsKey(DistributedCache.CDB:24)
         at com.tangosol.util.ConverterCollections$ConverterMap.containsKey(ConverterCollections.java:1494)
         at com.tangosol.coherence.component.util.daemon.queueProcessor.service.grid.DistributedCache$ViewMap.containsKey(DistributedCache.CDB:1)
         at com.tangosol.coherence.component.util.SafeNamedCache.containsKey(SafeNamedCache.CDB:1)
         at oms.ExecutionMapTrigger.process(ExecutionMapTrigger.java:22)
         at com.tangosol.coherence.component.util.daemon.queueProcessor.service.grid.DistributedCache$Storage.processTriggers(DistributedCache.CDB:12)
         at com.tangosol.coherence.component.util.daemon.queueProcessor.service.grid.DistributedCache$Storage.put(DistributedCache.CDB:30)
         at com.tangosol.coherence.component.util.daemon.queueProcessor.service.grid.DistributedCache.onPutRequest(DistributedCache.CDB:37)
         ... 8 moreIt's caused by doing a CacheFactory.getCache(...) inside a MapTrigger's process(MapTrigger.Entry entry) method. Is there some other way I can access a cache from another cache's MapTrigger? My MapTrigger looks like this. The idea of course is that when new Executions are placed in the cache, Coherence updates a Position in the positions cache in response to this event.
    public class ExecutionMapTrigger implements MapTrigger {
        public ExecutionMapTrigger() {
        InvocableMap.EntryProcessor positionFillProc = new PositionFillProcessor();
        public void process(MapTrigger.Entry entry) {
            Execution e = (Execution)entry.getValue();
            Position.connectToCache(); // CacheFactory.getCache("positions");
            PositionKey positionKey = new PositionKey(e.getSymbol(), e.getAccount());
            if (!Position.cache.containsKey(positionKey)) {
               System.out.println("\tNEW position: " + e.getAccount() + " " + e.getSymbol()  );
               Position p = new Position();
               p.setSymbol(e.getSymbol());
               p.setAccount(e.getAccount());
               Position.cache.put(positionKey, p);
            } else {
               System.out.println("\tEXISTING position: " + e.getAccount() + " " + e.getSymbol() + " " + Position.cache.get(positionKey));
            Position.cache.invoke(positionKey, positionFillProc);
        // ---- hashCode() and equals() must be implemented
        public boolean equals(Object o) {
            return o != null && o.getClass() == this.getClass();
        public int hashCode() {
            return getClass().getName().hashCode();
    }Is there a different way I should be doing this? Using a BackingMapListener?
    Thanks,
    Andrew

    I am also stuck with similar issue. I used a backingmap listener and wanted to transformation on the data sent by the client. I am unable to update another cache.
         CoherenceTransformer transformer= new CoherenceTransformer();
              TransformedTransactionData transformedRecord = new TransformedTransactionData() ;
              ReconTransformedRecord reconTransformedRecord = new ReconTransformedRecord();
         //     NamedCache cache = CacheFactory.getCache("TxnData_TransformedRecordCache");
              System.out.println(" < <<<< Entry Inserted in ImportRecord Cache>>>>");
         //     PivotCreationListener pivotcreator ;
              ReconImportRecord i = (ReconImportRecord) event.getNewValue();
              if (logger.isDebugEnabled()) {
                   logger.debug(i.getImportRecord().toString());
              transformedRecord = (TransformedTransactionData) transformer.transform((TransactionData) i.getImportRecord(),transformedRecord);
              if (logger.isDebugEnabled()) {
                   logger.debug(transformedRecord.toString());
              reconTransformedRecord.setKey(i.getKey());
              reconTransformedRecord.setTransformedRecord(transformedRecord);
              System.out.println(reconTransformedRecord);
         Thread thread = new Thread(new ProcessorThread(reconTransformedRecord));
              thread.start();
    2010-10-26 05:22:34.171/43.280 Oracle Coherence GE 3.6.0.0 <Warning> (thread=DistributedCache:PartitionedPofCache, member=1): Application code running on "PartitionedPofCache" service thread(s) should not call ensureCache as this may result in deadlock. The most common case is a CacheFactory call from a custom CacheStore implementation.
    2010-10-26 05:22:34.171/43.281 Oracle Coherence GE 3.6.0.0 <Error> (thread=DistributedCache:PartitionedPofCache, member=1): Assertion failed: poll() is a blocking call and cannot be called on the Service thread
         at com.tangosol.coherence.component.util.daemon.queueProcessor.service.Grid.poll(Grid.CDB:5)
         at com.tangosol.coherence.component.util.daemon.queueProcessor.service.Grid.poll(Grid.CDB:11)
         at com.tangosol.coherence.component.util.daemon.queueProcessor.service.grid.partitionedService.PartitionedCache.ensureCache(PartitionedCache.CDB:29)
         at com.tangosol.coherence.component.util.daemon.queueProcessor.service.grid.partitionedService.PartitionedCache.ensureCache(PartitionedCache.CDB:36)
         at com.tangosol.coherence.component.util.safeService.SafeCacheService.ensureCache$Router(SafeCacheService.CDB:1)
         at com.tangosol.coherence.component.util.safeService.SafeCacheService.ensureCache(SafeCacheService.CDB:33)
         at com.tangosol.net.DefaultConfigurableCacheFactory.ensureCache(DefaultConfigurableCacheFactory.java:875)
         at com.tangosol.net.DefaultConfigurableCacheFactory.configureCache(DefaultConfigurableCacheFactory.java:1231)
         at com.tangosol.net.DefaultConfigurableCacheFactory.ensureCache(DefaultConfigurableCacheFactory.java:290)
         at com.tangosol.net.CacheFactory.getCache(CacheFactory.java:735)
         at com.tangosol.net.CacheFactory.getCache(CacheFactory.java:712)
         at com.xxx.listeners.ProcessorThread.<init>(ProcessorThread.java:10)
    Few Questions
    How do i start a thread that is not involved with service thread ?
    How do I directly update a backingmap. Some example would help.

  • I keep getting calls from a block caller id and it's some dude speaking arabian what do i do? How do i stop this?

    I keep getting calls from a block caller id and it's some dude speaking arabian what do i do? How do i stop this?

    Stop answering calls with blocked numbers. If it's someone who really wants to talk to you, they'll leave you a message and you can call them back.

  • How can we encourage Apple to develop blocking calls from specific numbers?

    Looking through posts on here, I see that neither AT&T nor the iPhone itself permits an iPhone owner to block calls from one or more specific numbers.
    For some reason, although I've had my mobile number for years, I've recently started to receive daily calls from one specific number, an ignorant person who calls at all times of the day and night, barely apologizing for yet again dialing incorrectly. Very annoying.
    Yes, I know I could change my number, but literally hundreds of people have used this number for years, and I'm truly loathe to start over.
    In reading posts here and on AT&T, I gather this is not an uncommon problem. I assume that even if AT&T is unwilling to institute call blocking, this is a problem Apple could solve with iPhone software. What's the best way to encourage Apple to include this in a future iPhone software update?
    In advance, thanks for your guidance.

    This would be something ATT would have to do since they provide the actual phone service.
    In the meantime, you could create a ringtone of "silence" and assign it to that person's number. This way you wouldn't be disturbed when the person calls until you can work out a solution with ATT.

  • How do I block calls and texts on a prepaid phone?  Says service unavailble when I try to do it through VZW

    How do I block calls and texts on a prepaid phone?  Says service unavailble when I try to do it through VZW

    bathgate69, sorry for this inconvenience. Which make/model phone do you have?
    For your convenience, you can also reach our Prepaid customer service department at 888-294-6804 for help, as well.
    LasinaH_VZW
    Follow us on Twitter @VZWSupport
    If my response answered your question please click the "Correct Answer" button under my response. This ensures others can benefit from our conversation. Thanks in advance for your help with this!!

  • How can I block calls on my G3 when Verizon took away that functionality?

    I find it very interesting that I used to receive a small amount of SPAM calls/texts on my old phone (older version of Android) but once I updated my phone last August, after waiting for years to find the options, design, and features that I wanted, to the LGG3 through Verizon I am receiving these calls at least once a week and sometimes several times a week.  I ordered the G3 specifically because of the design and features.  One of these features was the ability to block calls from the call settings menu.  Unfortunately it appears that Verizon has taken away my choice to be able to do that by removing this feature from the Android OS on the G3 (and possibly other phones as well from my reading of these forums and other media online) Verizon tells me that I can block up to 5 numbers for a period of 90 days for free but if I want to block a number permanently I need to pay for their service at $5 a month and even then it is only up to 20 numbers.  Sounds a little suspicious to me in that I should be able to do a block for free on my phone but yet Verizon wants me to pay up to $60 per year to use their service when they are the ones sharing my number pursuant to their privacy policy.  I want the functionality back on my phone.  This is probably part of the reason that the new android update is not working for most people as I can only speculate that Verizon has most likely "piece-mealed" the update to comply with features that they believe we need and allows them to add to their bottom line instead of letting the consumer decide what they want.

    Called well actually chatted with Tech Support this morning...the option is not there and Tech Support of course would not admit that Verizon contracted with LG to have their phones produced without that option (though I explained T-Mobile G3 has the option) Tech support started wanting to change my plan to lower my plan price to offset the cost of Family Base-- I called ** on this --no changes made. Was given a number to contact LG but I doubt that will get me anywhere as well; what about the Mister Number app? I heard that was supposed to be a good one as well....but anyway I quite frankly told the representative that I could only believe that this was greed on Verizon's part since the functionality was removed but in order to use the functionality I have to pay for it on their site and that I refused to do so.  Like you stated I should not have to pay for privacy. Very frustrating; she also tried telling me that there may be an update in the future that may change this on my device but she couldn't speak to when; again I am calling **...I have heard nothing but bad news on the Lollipop update and wont be doing that until I see all the bugs are worked out

  • How to block calls based ANI for individual user?

    I want to know how to block calls based on ANI for individual user in CUCM?  Lets say if the individual wants to block calls from certain number.
    Malicious call id - softkey will not work for our purpose.
    calls come to cucm via mgcp gateway.  cucm 9.x
    thanks,

    How to block calls has been asked hundreds, and hundreds of times at CSC, a simple search would have provided you with all the necesarry information. Please search before you ask
    https://supportforums.cisco.com/docs/DOC-19628
    HTH
    java
    if this helps, please rate
    www.cisco.com/go/pdihelpdesk

  • How can I interrupt the blocking call when call timeout?

    Hi,Guys
    I wrote an application server(daemon process) to talk with oracle server
    continuous which used oracle9 OCCI lib, each 5 min it executes the procedure
    on the DB server.
    Now I have come cross a problem:
    If the network is blocked, app server will blocked at occi call and would
    never pass, and no exception was catched :-(
    for e.g.
    1. Oracle server reboot without shutdown oracle process
    2. udp broadcast message storm blocked the connection between app server and
    oracle DB.
    I consider maybe it's because OCCI using the blocking mode of connection
    that caused this problem.
    How can I interrupt the blocking call when call timeout?

    Manage the timeout using a separate thread. When the timeout happens, issue a break on the OCCI connection. There is no direct way as of now. You need to do this to break a OCCI connection.
    retrieve the OCI handle from the OCCI handle (e.g. using Connection::getOCIServer or Connection::getOCIServiceContext methods) and issue a OCIBreak on it. Do not forget to allocate a error handle which should be passed to OCIBreak call.

  • Can you set a picture for unknown or blocked calls

    Is there a way to set a picture for calls that are unknown numbers...not in address book...or blocked calls?
    iPhone 4s

    Nope.

  • Non-Blocking call to read the Keyboard

    does anyone know how to make a JAVA program make a non-blocking call to read the keyboard? eg. write a program which generates prime number until a keyboard key is pressed.

    if you use a gui you can use keyListener
    Would work only if your gui elements have focus right now.

  • Blocking Calls App

    Almost every other OS on a cell phones has allows developers to create an app to block calls. Is there some reason why Iphone app developers can not develop one?

    http://www.wireless.att.com/answer-center/main.jsp?solutionId=KB102428&t=solutio nTab is the official info on blocking calls.

  • Blocking Calls on Spring using Palm Pre

    Somehow, someone programmed my number into MovieFone so it calls me multiple every day and I have no way to stop it.  I have not found any way to contact MovieFone and Sprint says there is no way to block the calls from coming everyday.
    Does anyone know of a way to block calls on Sprint or know if s way to block a call from a Palm Pre.  I know I can change the ring, but how can I change the ring so it does nothing instead of ringing?
    I do have to say that I was amazed that Sprint did not have the capabilities to block calls.  I have never had the need to use this, but I thought it was common.
    Thanks to anyone who can help me,
    Craig
    Post relates to:

    Same issue, Sprint says there is no way they can block calls the only option they provided was changing phone numbers.
    If Palm won't include a Call Filtering program with WebOS, then why not allow third party developers to do it for you? Windows Mobile, Blackberry, and Android all have 3rd party call block applications that will block certain numbers or private/unknown callers.
    A WM developer stated that because Palm hasn't opened the telephony programming interface to developers, they are unable to create a call block program. A simple google for WebOS call block and you'll see how much of a wanted feature this is.
    I hope Palm will re-consider adding some type of call filter to WebOS in an OTA update, or open up the programming so a 3rd party can do it instead.

  • Blocking calls to Canada from USA

    Is there a way to block calls to Canada on certain phone lines?

    The only way I can think of is to take off International Calling ability to the specific lines. There is no way to do it in usage controls and certainly no way I can think of VZW doing it for you when asking about a specific country on specific lines.
    Hope all works out,
    --kwm1337

  • Blocking Calls Inbound - ??

    Hello:
    Is there a way to block calls inbound on the gateway router (coming in via the Pri)coming into an ip phone?
    Or is this something that needs to be configured in the CCM for that particular phone.
    Trying to block some 1-800 numbers from calling into an ip phone.
    Thanks.

    Thank you, much.
    So based on this: I am thinking of the following configuration:
    #voice translation-rule 1
    #rule 1 reject /1800*/
    #voice translation-profile Block_1800
    #translate calling 1
    #dial-peer voice 22 pots
    #call-block translation-profile incoming Block_1800
    #call-block disconnect cause incoming call-reject incoming called-number
    #port 1/0:23
    #end
    Would this work to block any 1800 number from calling into the IP Phone?
    Thank you.

Maybe you are looking for