PLEASE HELP ME! I need help with stacks.

I need some insight on using stacks to evaluate logical expressions. Can someone please show me where I should begin? My program should convert infix expressions to postfix notation. The program will read from a file with logical expressions. Where do I begin? I desparately need your help!
Thanks a million!

I have never managed to find a really simple way of doing this, though I have implemented several
expression parsers. If you are really desparate (and this is not a college project) I can mail you some code, that, while not doing what you want, will help you on your way.
Rob

Similar Messages

  • Please help with "You can't open the application NovamediaDiskSupressor because PowerPC applications are no longer supported." I have seen other responses on this but am not a techie and would not know how to start with that solution.

    Please help with the message I am receving on startup ""You can't open the application NovamediaDiskSupressor because PowerPC applications are no longer supported."
    I have read some of the replies in the Apple Support Communities, but as I am no techie, I would have no idea how I would implement that solution.
    Please help with what I need to type, how, where, etc.
    Many thanks
    AppleSueIn HunterCreek

    I am afraid there is no solution.
    PowerPC refers to the processing chip used by Apple before they transferred to Intel chips. They are very different, and applications written only for PPC Macs cannot work on a Mac running Lion.
    You could contact the developers to see if they have an updated version in the pipeline.

  • HT3209 Purchased DVD in US for Cdn viewing. Digital download will not work in Cda or US? please help with new Digital code that will work

    Purchased DVD in US for Cdn viewing. Digital download will not work in Cda or US? please help with new Digital code that will work

    You will need to contact the movie studio that produced the DVD and ask if they can issue you a new code valid for Canada. Apple cannot help you, and everyone here in these forums is just a fellow user.
    Regards.

  • Please help with slideshow problems!

    Am using Photoshop Elements 8 and trying to make a slideshow. Have tried 4 times now and keep ending up with same problem, cannot reopen project to continue edititing.  Won't show up in orginizer and when I find on harddrive and try to open get message " wmv file cannot be opened".  How can I save a
    slideshow inprogress and be able to reopen and continue to edit and make slideshow?  I want to thank anyone who can help me with this in advance as I
    have gotten so frustrated that I want to just scream.
    Thanks

    Thanks for the help, thought I had done so but maybe not.  Anyway will have another go at it, now may I ask another
    question?  I am trying to add audio to slideshow.  I have some music I purchased thru amazon as mp3 files but I get
    message no codec and when I try to add wmv I get same message.  What type of file do I need and how can I add
    multiple songs to one slideshow.   I have one little wmv file that will go in, but it just replicates itself multiple times until
    it fills slide show. 
    Thanks again, sorry to be a bother, but this thing is driving this old man crazy.
    Date: Sun, 26 Dec 2010 20:34:32 -0700
    From: [email protected]
    To: [email protected]
    Subject: Please help with slideshow problems!
    You need to save the slideshow project in order to be able to go back later and make changes or additions to an existing slideshow . The wmv file is a final output format.
    Now you are most probably using only the Output command: that is what makes the wmv file.
    You should also do the Save Project command. (and I make it a practice to do the Save Project command before I do the Output command).
    If you look at the Elements Organizer 8 Help, there is a topic on "Create a slide show".
    -- Very close to the beginning of that topic is a screen shot of the Sldie Show Editor screen,
    -- The bar below the usual menu bar is labeled with a "B" and called the Shortcuts bar.
    -- The 1st entry on that Shortcuts bar is "Save Project"
    It is the Save Project command that saves the information about which photos, audio, etc you placed in that specific slide show so that you can come back again to do subsequent editing.  Save each Project with a unique name.
    After completing the Save Project command, you shoud see an "icon" in the Organizer for that slide show.
    Note:  you must also keep the photo files and audio files which you have used in this slide show: you can't delete them because the project file does NOT contain a copy of the photos, it only has the identification and folder location of the photo and audio files.
    >

  • HT5824 I switched over from an iPhone to a Samsung Galaxy S3 & I haven't been able to receive any text messages from iPhones. Please help with turning my iMessage completely off..

    I switched over from an iPhone to a Samsung Galaxy S3 & I haven't been able to receive any text messages from iPhones. I have no problem sending the text messages but I'm not receivng any from iPhones at all. It has been about a week now that I'm having this problem. I've already tried fixing it myself and I also went into the sprint store, they tried everything as well. My last option was to contact Apple directly. Please help with turning my iMessage completely off so that I can receive my texts.

    If you registered your iPhone with Apple using a support profile, try going to https://supportprofile.apple.com/MySupportProfile.do and unregistering it.  Also, try changing the password associated with the Apple ID that you were using for iMessage.

  • How can I sync my iPhone on a different computer without erasing my applications? My iPhone was earlier synced with a PC which I don't use anymore. Please help with proper steps, if any.

    How can I sync my iPhone on a different computer without erasing my applications? My iPhone was earlier synced with a PC which I don't use anymore.
    On the new computer, I am getting a message that my all purchases would be deleted if I sync it with new iTunes library.
    Please help with proper steps, if any.

    Also see... these 2 Links...
    Recovering your iTunes library from your iPod or iOS device
    https://discussions.apple.com/docs/DOC-3991
    Syncing to a New Computer...
    https://discussions.apple.com/docs/DOC-3141

  • Hi, please help with the installation of Lightroom 4, I bought a new Mac (Apple) and I want to install a software that I have on the album cd. My new computer does not have the drives. Can I download software from Adobe? Is my license number just to be ab

    Hi, please help with the installation of Lightroom 4, I bought a new Mac (Apple) and I want to install a software that I have on the album cd. My new computer does not have the drives. Can I download software from Adobe? Is my license number just to be able to download the srtony adobe.

    Adobe - Lightroom : For Macintosh
    Hal

  • [ETL]Could you please help with a problem accessing UML stereotype attributes ?

    Hi all,
    Could you please help with a problem accessing UML stereotype attributes and their values ?
    Here is the description :
    -I created a UML model with Papyrus tool and I applied MARTE profile to this UML model.
    -Then, I applied <<PaStep>> stereotype to an AcceptEventAction ( which is one of the element that I created in this model ), and set the extOpDemand property of the stereotype to 2.7 with Papyrus.
    -Now In the ETL file, I can find the stereotype property of extOpDemand as follows :
    s.attribute.selectOne(a|a.name="extOpDemand") , where s is a variable of type Stereotype.
    -However I can't access the value 2.7 of the extOpDemand attribute of the <<PaStep>> Stereotype. How do I do that ?
    Please help
    Thank you

    Hi Dimitris,
    Thank you , a minimal example is provided now.
    Version of the Epsilon that I am using is : ( Epsilon Core 1.2.0.201408251031 org.eclipse.epsilon.core.feature.feature.group Eclipse.org)
    Instructions for reproducing the problem :
    1-Run the uml2etl.etl transformation with the supplied launch configuration.
    2-Open lqn.model.
    There are two folders inside MinimalExample folder, the one which is called MinimalExample has 4 files, model.uml , lqn.model, uml2lqn.etl and MinimalExampleTransformation.launch.
    The other folder which is LQN has four files. (.project),LQN.emf,LQN.ecore and untitled.model which is an example model conforming to the LQN metamodel to see how the model looks like.
    Thank you
    Mana

  • Want a complete migration guide to upgrade 11.1.0.7 to 11.2.0.3 database using DBUA..We are implementing R12.1.3 version and then have to migrate the default 11gR1 database to 11.2.0.3 version. Please help with some step by step docs

    Want a complete migration guide to upgrade 11.1.0.7 to 11.2.0.3 database using DBUA..We are implementing R12.1.3 version and then have to migrate the default 11gR1 database to 11.2.0.3 version. Please help with some step by step docs

    Upgrade to 11.2.0.3 -- Interoperability Notes Oracle EBS R12 with Oracle Database 11gR2 (11.2.0.3) (Doc ID 1585578.1)
    Upgrade to 11.2.0.4 (latest 11gR2 patchset certified with R12) -- Interoperability Notes EBS 12.0 and 12.1 with Database 11gR2 (Doc ID 1058763.1)
    Thanks,
    Hussein

  • Welcome. At the outset, I'm sorry for my English :) Please help with configuration Photoshop CS6 appearance. How to disable the background of the program so you can see the desktop. (same menus and tools) Chiałbym to be the same effect as CS5.

    Welcome.
    At the outset, I'm sorry for my English
    Please help with configuration Photoshop CS6 appearance.
    How to disable the background of the program so you can see the desktop. (same menus and tools)
    i wantto be the same effect as CS5.

    Please try turning off
    Window > Application Frame

  • HT201210 cont contact apple server error please help with ipad touch 4. im just fed up with apple please help me because why is it only apple with these kind of problems?

    cont contact apple server error please help with ipad touch 4. im just fed up with apple please help me because why is it only apple with these kind of problems?

    If you mean updae server
    Update Server
    Try:
    - Powering off and then back on your router.
    - iTunes for Windows: iTunes cannot contact the iPhone, iPad, or iPod software update server
    - Change the DNS to either Google's or Open DNS servers
    Public DNS — Google Developers
    OpenDNS IP Addresses
    - For one user uninstalling/reinstalling iTunes resolved the problem
    - Try on another computer/network
    - Wait if it is an Apple problem
    Otherwise what server are you talking about

  • Hi. I have an iPhone 4s. The music doesn't play when I connect it to my car stereo. It used to play previously but stopped playing all of a sudden. My phone is getting charged when I cut it to the USB port. Please help with this. The iOS is 6.1.3.

    Hi. I have an iPhone 4s. The music doesn't play when I connect it to my car stereo. It used to play previously but stopped playing all of a sudden. My phone is getting charged when I cut it to the USB port. Please help with this. The iOS is 6.1.3.

    Hello Priyanks,
    I found an article with steps you can take to troubleshoot issues with an iPhone not connecting to your car stereo:
    iOS: Troubleshooting car stereo connections
    http://support.apple.com/kb/TS3581
    Thank you for using Apple Support Communities.
    Best,
    Sheila M.

  • My "fn" button is stuck on only revealing mission control in Lion. With this problem none of my "f" keys will work nor can I hold "fn" and delete to delete text in opposite direction. Can someone please help with this?

    My "fn" button is stuck on only revealing mission control in Lion. With this problem none of my "f" keys will work nor can I hold "fn" and delete to delete text in opposite direction. Can someone please help with this?

    Following the fix here worked for me:
    https://discussions.apple.com/message/15680566#15680566
    except my plist file was in ~/Library instead of /Library.
    -Scott

  • Ipod Nano 6th generation setting issue - hi, when i am listening music and the screen goes to sleep my music stop playing.Please help with settings

    hi, when i am listening music and the screen goes to sleep my music stop playing.Please help with settings

    No problem.   And no worries, several people have made this same mistake!
    Either way enjoy the iPod!
    Brock

  • Please help with SIP configuration on 2801 router

    Hi All.
    Please help me to setup a SIP account. I’m already struggling to do that for a few days, and can’t find out how to finish that. We have 2xISDN lines running, so I need to add a SIP trunk to existing config.
    The information from our SIP provider:
    We have issued the following DDI range: 018877000 – 99
    There is no need to register the DDI’s as these will be offered to your PABX IP address provided to in the completed SIP trunking form.
    Configuration details are as follows:
    Our Primary Proxy:-        99.234.56.78
    Codec supported:-             G711Alaw, G729 (G711Alaw is the preferred codec)
    Fax Support:-                     T38 and G711Alaw
    DTMF:-                                 RFC2833 and INFO
    CLI Method:-                     Remote-Party-ID
    Trunk doesn’t require registration; you just need to send Invite. In cisco this is done through Dial-peer session-target command. We are authenticating your IP address for outgoing calls and incoming calls we then forward to the IP mentioned in the sip form.
    This is a SIP configuration on Cisco2801 router (I used outgoing calls only):
    translation-rule 10
    Rule 0 ^90 0
    Rule 1 ^91 1
    Rule 2 ^92 2
    Rule 3 ^93 3
    Rule 4 ^94 4
    Rule 5 ^95 5
    Rule 6 ^96 6
    Rule 7 ^97 7
    Rule 8 ^98 8
    Rule 9 ^99 9
    interface FastEthernet0/0.1
    description ***DATA VLAN***
    encapsulation dot1Q 1 native
    ip address 10.1.1.101 255.255.255.0
    interface FastEthernet0/0.2
    description ***VOICE VLAN***
    encapsulation dot1Q 2
    ip address 192.168.22.1 255.255.255.0
    voice service voip
    allow-connections h323 to h323
    allow-connections h323 to sip
    allow-connections sip to h323
    allow-connections sip to sip
    supplementary-service h450.12
    h323
      call start slow
    sip
      bind control source-interface FastEthernet0/0.2
      bind media source-interface FastEthernet0/0.2
      registrar server expires max 36000 min 600
    voice class codec 1
    codec preference 1 g729r8
    codec preference 2 g711ulaw
    codec preference 3 g711alaw
    dial-peer voice 1 pots
    description ### External Dialling via BRI ###
    preference 7
    destination-pattern 9T
    translate-outgoing called 10
    direct-inward-dial
    port 0/0/0
    forward-digits all
    dial-peer voice 2 pots
    description ### External Dialling via BRI ###
    preference 2
    destination-pattern 9T
    translate-outgoing called 10
    direct-inward-dial
    port 0/0/1
    forward-digits all
    dial-peer voice 9000 voip
    description ** Outgoing calls to SIP **
    preference 1
    destination-pattern 9T
    voice-class sip dtmf-relay force rtp-nte
    session protocol sipv2
    session target ipv4:99.234.56.78:5060
    dtmf-relay rtp-nte
    codec g711alaw
    no vad
    sip-ua
    timers connect 100
    sip-server ipv4:99.234.56.78
    I used debugging commands to troubleshoot the calls.
    2801(config-dial-peer)#
    094509: Jan 24 09:27:06.204: //-1/xxxxxxxxxxxx/DPM/dpAssociateIncomingPeerCore:
       Calling Number=211, Called Number=, Voice-Interface=0x65FA35B4,
       Timeout=TRUE, Peer Encap Type=ENCAP_VOICE, Peer Search Type=PEER_TYPE_VOICE,
       Peer Info Type=DIALPEER_INFO_SPEECH
    094510: Jan 24 09:27:06.204: //-1/xxxxxxxxxxxx/DPM/dpAssociateIncomingPeerCore:
       Result=Success(0) after DP_MATCH_ORIGINATE; Incoming Dial-peer=20018
    094511: Jan 24 09:27:06.716: //-1/6A877F6F9054/DPM/dpMatchPeersCore:
       Calling Number=, Called Number=9, Peer Info Type=DIALPEER_INFO_SPEECH
    094512: Jan 24 09:27:06.716: //-1/6A877F6F9054/DPM/dpMatchPeersCore:
       Match Rule=DP_MATCH_DEST; Called Number=9
    094513: Jan 24 09:27:06.716: //-1/6A877F6F9054/DPM/dpMatchPeersCore:
       Result=Partial Matches(1) after DP_MATCH_DEST
    094514: Jan 24 09:27:06.716: //-1/6A877F6F9054/DPM/dpMatchPeersMoreArg:
       Result=MORE_DIGITS_NEEDED(1)
    094515: Jan 24 09:27:06.816: //-1/6A877F6F9054/DPM/dpMatchPeersCore:
       Calling Number=, Called Number=90, Peer Info Type=DIALPEER_INFO_SPEECH
    094516: Jan 24 09:27:06.816: //-1/6A877F6F9054/DPM/dpMatchPeersCore:
       Match Rule=DP_MATCH_DEST; Called Number=90
    094517: Jan 24 09:27:06.816: //-1/6A877F6F9054/DPM/dpMatchPeersCore:
       Result=Partial Matches(1) after DP_MATCH_DEST
    094518: Jan 24 09:27:06.816: //-1/6A877F6F9054/DPM/dpMatchPeersMoreArg:
       Result=MORE_DIGITS_NEEDED(1)
    094519: Jan 24 09:27:06.912: //-1/6A877F6F9054/DPM/dpMatchPeersCore:
       Calling Number=, Called Number=908, Peer Info Type=DIALPEER_INFO_SPEECH
    094520: Jan 24 09:27:06.912: //-1/6A877F6F9054/DPM/dpMatchPeersCore:
       Match Rule=DP_MATCH_DEST; Called Number=908
    094521: Jan 24 09:27:06.916: //-1/6A877F6F9054/DPM/dpMatchPeersCore:
       Result=Partial Matches(1) after DP_MATCH_DEST
    094522: Jan 24 09:27:06.916: //-1/6A877F6F9054/DPM/dpMatchPeersMoreArg:
       Result=MORE_DIGITS_NEEDED(1)
    094523: Jan 24 09:27:07.012: //-1/6A877F6F9054/DPM/dpMatchPeersCore:
       Calling Number=, Called Number=9086, Peer Info Type=DIALPEER_INFO_SPEECH
    094524: Jan 24 09:27:07.012: //-1/6A877F6F9054/DPM/dpMatchPeersCore:
       Match Rule=DP_MATCH_DEST; Called Number=9086
    094525: Jan 24 09:27:07.016: //-1/6A877F6F9054/DPM/dpMatchPeersCore:
       Result=Partial Matches(1) after DP_MATCH_DEST
    094526: Jan 24 09:27:07.016: //-1/6A877F6F9054/DPM/dpMatchPeersMoreArg:
       Result=MORE_DIGITS_NEEDED(1)
    094527: Jan 24 09:27:07.116: //-1/6A877F6F9054/DPM/dpMatchPeersCore:
       Calling Number=, Called Number=90862, Peer Info Type=DIALPEER_INFO_SPEECH
    094528: Jan 24 09:27:07.116: //-1/6A877F6F9054/DPM/dpMatchPeersCore:
       Match Rule=DP_MATCH_DEST; Called Number=90862
    094529: Jan 24 09:27:07.116: //-1/6A877F6F9054/DPM/dpMatchPeersCore:
       Result=Partial Matches(1) after DP_MATCH_DEST
    094530: Jan 24 09:27:07.116: //-1/6A877F6F9054/DPM/dpMatchPeersMoreArg:
       Result=MORE_DIGITS_NEEDED(1)
    094531: Jan 24 09:27:07.212: //-1/6A877F6F9054/DPM/dpMatchPeersCore:
       Calling Number=, Called Number=908621, Peer Info Type=DIALPEER_INFO_SPEECH
    094532: Jan 24 09:27:07.212: //-1/6A877F6F9054/DPM/dpMatchPeersCore:
       Match Rule=DP_MATCH_DEST; Called Number=908621
    094533: Jan 24 09:27:07.216: //-1/6A877F6F9054/DPM/dpMatchPeersCore:
       Result=Partial Matches(1) after DP_MATCH_DEST
    094534: Jan 24 09:27:07.216: //-1/6A877F6F9054/DPM/dpMatchPeersMoreArg:
       Result=MORE_DIGITS_NEEDED(1)
    094535: Jan 24 09:27:07.316: //-1/6A877F6F9054/DPM/dpMatchPeersCore:
       Calling Number=, Called Number=9086215, Peer Info Type=DIALPEER_INFO_SPEECH
    094536: Jan 24 09:27:07.316: //-1/6A877F6F9054/DPM/dpMatchPeersCore:
       Match Rule=DP_MATCH_DEST; Called Number=9086215
    094537: Jan 24 09:27:07.316: //-1/6A877F6F9054/DPM/dpMatchPeersCore:
       Result=Partial Matches(1) after DP_MATCH_DEST
    094538: Jan 24 09:27:07.316: //-1/6A877F6F9054/DPM/dpMatchPeersMoreArg:
       Result=MORE_DIGITS_NEEDED(1)
    094539: Jan 24 09:27:07.412: //-1/6A877F6F9054/DPM/dpMatchPeersCore:
       Calling Number=, Called Number=90862157, Peer Info Type=DIALPEER_INFO_SPEECH
    094540: Jan 24 09:27:07.412: //-1/6A877F6F9054/DPM/dpMatchPeersCore:
       Match Rule=DP_MATCH_DEST; Called Number=90862157
    094541: Jan 24 09:27:07.416: //-1/6A877F6F9054/DPM/dpMatchPeersCore:
       Result=Partial Matches(1) after DP_MATCH_DEST
    094542: Jan 24 09:27:07.416: //-1/6A877F6F9054/DPM/dpMatchPeersMoreArg:
       Result=MORE_DIGITS_NEEDED(1)
    094543: Jan 24 09:27:07.516: //-1/6A877F6F9054/DPM/dpMatchPeersCore:
       Calling Number=, Called Number=908621577, Peer Info Type=DIALPEER_INFO_SPEECH
    094544: Jan 24 09:27:07.516: //-1/6A877F6F9054/DPM/dpMatchPeersCore:
       Match Rule=DP_MATCH_DEST; Called Number=908621577
    094545: Jan 24 09:27:07.516: //-1/6A877F6F9054/DPM/dpMatchPeersCore:
       Result=Partial Matches(1) after DP_MATCH_DEST
    094546: Jan 24 09:27:07.516: //-1/6A877F6F9054/DPM/dpMatchPeersMoreArg:
       Result=MORE_DIGITS_NEEDED(1)
    094547: Jan 24 09:27:07.612: //-1/6A877F6F9054/DPM/dpMatchPeersCore:
       Calling Number=, Called Number=9086215777, Peer Info Type=DIALPEER_INFO_SPEECH
    094548: Jan 24 09:27:07.612: //-1/6A877F6F9054/DPM/dpMatchPeersCore:
       Match Rule=DP_MATCH_DEST; Called Number=9086215777
    094549: Jan 24 09:27:07.616: //-1/6A877F6F9054/DPM/dpMatchPeersCore:
       Result=Partial Matches(1) after DP_MATCH_DEST
    094550: Jan 24 09:27:07.616: //-1/6A877F6F9054/DPM/dpMatchPeersMoreArg:
       Result=MORE_DIGITS_NEEDED(1)
    094551: Jan 24 09:27:07.716: //-1/6A877F6F9054/DPM/dpMatchPeersCore:
       Calling Number=, Called Number=90862157774, Peer Info Type=DIALPEER_INFO_SPEECH
    094552: Jan 24 09:27:07.716: //-1/6A877F6F9054/DPM/dpMatchPeersCore:
       Match Rule=DP_MATCH_DEST; Called Number=90862157774
    094553: Jan 24 09:27:07.716: //-1/6A877F6F9054/DPM/dpMatchPeersCore:
       Result=Partial Matches(1) after DP_MATCH_DEST
    094554: Jan 24 09:27:07.716: //-1/6A877F6F9054/DPM/dpMatchPeersMoreArg:
       Result=MORE_DIGITS_NEEDED(1)
    094555: Jan 24 09:27:10.711: //-1/6A877F6F9054/DPM/dpMatchPeersCore:
       Calling Number=, Called Number=90862157774T, Peer Info Type=DIALPEER_INFO_SPEECH
    094556: Jan 24 09:27:10.711: //-1/6A877F6F9054/DPM/dpMatchPeersCore:
       Match Rule=DP_MATCH_DEST; Called Number=90862157774T
    094557: Jan 24 09:27:10.711: //-1/6A877F6F9054/DPM/dpMatchPeersCore:
       Result=Success(0) after DP_MATCH_DEST
    094558: Jan 24 09:27:10.711: //-1/6A877F6F9054/DPM/dpMatchPeersMoreArg:
       Result=SUCCESS(0)
       List of Matched Outgoing Dial-peer(s):
         1: Dial-peer Tag=9000
         2: Dial-peer Tag=2
         3: Dial-peer Tag=1
    094559: Jan 24 09:27:10.711: //-1/xxxxxxxxxxxx/DPM/dpMatchPeersCore:
       Calling Number=90862157774, Called Number=90862157774, Peer Info Type=DIALPEER_INFO_SPEECH
    094560: Jan 24 09:27:10.711: //-1/xxxxxxxxxxxx/DPM/dpMatchPeersCore:
       Match Rule=DP_MATCH_DEST; Called Number=90862157774
    094561: Jan 24 09:27:10.715: //-1/xxxxxxxxxxxx/DPM/dpMatchPeersCore:
       Result=Success(0) after DP_MATCH_DEST
    094562: Jan 24 09:27:10.715: //-1/xxxxxxxxxxxx/DPM/dpMatchPeersMoreArg:
       Result=SUCCESS(0)
       List of Matched Outgoing Dial-peer(s):
         1: Dial-peer Tag=9000
         2: Dial-peer Tag=2
         3: Dial-peer Tag=1
    094563: Jan 24 09:27:10.715: //-1/xxxxxxxxxxxx/DPM/dpAssociateIncomingPeerCore:
       Calling Number=90862157774, Called Number=, Voice-Interface=0x0,
       Timeout=TRUE, Peer Encap Type=ENCAP_VOIP, Peer Search Type=PEER_TYPE_VOICE,
       Peer Info Type=DIALPEER_INFO_SPEECH
    094564: Jan 24 09:27:10.715: //-1/xxxxxxxxxxxx/DPM/dpAssociateIncomingPeerCore:
       Result=Success(0) after DP_MATCH_ORIGINATE; Incoming Dial-peer=9000
    094565: Jan 24 09:27:10.715: //-1/6A877F6F9054/DPM/dpMatchPeersCore:
       Calling Number=, Called Number=90862157774, Peer Info Type=DIALPEER_INFO_SPEECH
    094566: Jan 24 09:27:10.715: //-1/6A877F6F9054/DPM/dpMatchPeersCore:
       Match Rule=DP_MATCH_DEST; Called Number=90862157774
    094567: Jan 24 09:27:10.715: //-1/6A877F6F9054/DPM/dpMatchPeersCore:
       Result=Success(0) after DP_MATCH_DEST
    094568: Jan 24 09:27:10.715: //-1/6A877F6F9054/DPM/dpMatchPeersMoreArg:
       Result=SUCCESS(0)
       List of Matched Outgoing Dial-peer(s):
         1: Dial-peer Tag=9000
         2: Dial-peer Tag=2
         3: Dial-peer Tag=1
    094569: Jan 24 09:27:10.719: fb_get_reject_cause_code: ERROR cause_code NULL
    094570: Jan 24 09:27:10.727: //-1/xxxxxxxxxxxx/SIP/Msg/ccsipDisplayMsg:
    Sent:
    INVITE sip:[email protected]:5060 SIP/2.0
    Via: SIP/2.0/UDP 192.168.22.1:5060;branch=z9hG4bK47D116D3
    Remote-Party-ID: "Sam " <sip:[email protected]>;party=calling;screen=no;privacy=off
    From: "Sam " <sip:[email protected]>;tag=CDCFB8AC-F98
    To: <sip:[email protected]>
    Date: Tue, 24 Jan 2012 09:27:10 GMT
    Call-ID: [email protected]
    Supported: 100rel,timer,resource-priority,replaces
    Min-SE:  1800
    Cisco-Guid: 1787264879-1168380385-2421457215-1958389771
    User-Agent: Cisco-SIPGateway/IOS-12.x
    Allow: INVITE, OPTIONS, BYE, CANCEL, ACK, PRACK, UPDATE, REFER, SUBSCRIBE, NOTIFY, INFO, REGISTER
    CSeq: 101 INVITE
    Max-Forwards: 70
    Timestamp: 1327397230
    Contact: <sip:[email protected]:5060>
    Expires: 180
    Allow-Events: telephone-event
    Content-Type: application/sdp
    Content-Disposition: session;handling=required
    Content-Length: 244
    v=0
    o=CiscoSystemsSIP-GW-UserAgent 3237 2021 IN IP4 192.168.22.1
    s=SIP Call
    c=IN IP4 192.168.22.1
    t=0 0
    m=audio 18258 RTP/AVP 8 101
    c=IN IP4 192.168.22.1
    a=rtpmap:8 PCMA/8000
    a=rtpmap:101 telephone-event/8000
    a=fmtp:101 0-16
    a=ptime:20
    094571: Jan 24 09:27:11.227: //-1/xxxxxxxxxxxx/SIP/Msg/ccsipDisplayMsg:
    Sent:
    INVITE sip:[email protected]:5060 SIP/2.0
    Via: SIP/2.0/UDP 192.168.22.1:5060;branch=z9hG4bK47D116D3
    Remote-Party-ID: "Sam" <sip:[email protected]>;party=calling;screen=no;privacy=off
    From: "Sam " <sip:[email protected]>;tag=CDCFB8AC-F98
    To: <sip:[email protected]>
    Date: Tue, 24 Jan 2012 09:27:11 GMT
    Call-ID: [email protected]
    Supported: 100rel,timer,resource-priority,replaces
    Min-SE:  1800
    Cisco-Guid: 1787264879-1168380385-2421457215-1958389771
    User-Agent: Cisco-SIPGateway/IOS-12.x
    Allow: INVITE, OPTIONS, BYE, CANCEL, ACK, PRACK, UPDATE, REFER, SUBSCRIBE, NOTIFY, INFO, REGISTER
    CSeq: 101 INVITE
    Max-Forwards: 70
    Timestamp: 1327397231
    Contact: <sip:[email protected]:5060>
    Expires: 180
    Allow-Events: telephone-event
    Content-Type: application/sdp
    Content-Disposition: session;handling=required
    Content-Length: 244
    v=0
    o=CiscoSystemsSIP-GW-UserAgent 3237 2021 IN IP4 192.168.22.1
    s=SIP Call
    c=IN IP4 192.168.22.1
    t=0 0
    m=audio 18258 RTP/AVP 8 101
    c=IN IP4 192.168.22.1
    a=rtpmap:8 PCMA/8000
    a=rtpmap:101 telephone-event/8000
    a=fmtp:101 0-16
    a=ptime:20
    094572: Jan 24 09:27:12.227: //-1/xxxxxxxxxxxx/SIP/Msg/ccsipDisplayMsg:
    Sent:
    INVITE sip:[email protected]:5060 SIP/2.0
    Via: SIP/2.0/UDP 192.168.22.1:5060;branch=z9hG4bK47D116D3
    Remote-Party-ID: "Sam " <sip:[email protected]>;party=calling;screen=no;privacy=off
    From: "Sam " <sip:[email protected]>;tag=CDCFB8AC-F98
    To: <sip:[email protected]>
    Date: Tue, 24 Jan 2012 09:27:12 GMT
    Call-ID: [email protected]
    Supported: 100rel,timer,resource-priority,replaces
    Min-SE:  1800
    Cisco-Guid: 1787264879-1168380385-2421457215-1958389771
    User-Agent: Cisco-SIPGateway/IOS-12.x
    Allow: INVITE, OPTIONS, BYE, CANCEL, ACK, PRACK, UPDATE, REFER, SUBSCRIBE, NOTIFY, INFO, REGISTER
    CSeq: 101 INVITE
    Max-Forwards: 70
    Timestamp: 1327397232
    Contact: <sip:[email protected]:5060>
    Expires: 180
    Allow-Events: telephone-event
    Content-Type: application/sdp
    Content-Disposition: session;handling=required
    Content-Length: 244
    v=0
    o=CiscoSystemsSIP-GW-UserAgent 3237 2021 IN IP4 192.168.22.1
    s=SIP Call
    c=IN IP4 192.168.22.1
    t=0 0
    m=audio 18258 RTP/AVP 8 101
    c=IN IP4 192.168.22.1
    a=rtpmap:8 PCMA/8000
    a=rtpmap:101 telephone-event/8000
    a=fmtp:101 0-16
    a=ptime:20
    094573: Jan 24 09:27:14.227: //-1/xxxxxxxxxxxx/SIP/Msg/ccsipDisplayMsg:
    Sent:
    INVITE sip:[email protected]:5060 SIP/2.0
    Via: SIP/2.0/UDP 192.168.22.1:5060;branch=z9hG4bK47D116D3
    Remote-Party-ID: "Sam" <sip:[email protected]>;party=calling;screen=no;privacy=off
    From: "Sam" <sip:[email protected]>;tag=CDCFB8AC-F98
    To: <sip:[email protected]>
    Date: Tue, 24 Jan 2012 09:27:14 GMT
    Call-ID: [email protected]
    Supported: 100rel,timer,resource-priority,replaces
    Min-SE:  1800
    Cisco-Guid: 1787264879-1168380385-2421457215-1958389771
    User-Agent: Cisco-SIPGateway/IOS-12.x
    Allow: INVITE, OPTIONS, BYE, CANCEL, ACK, PRACK, UPDATE, REFER, SUBSCRIBE, NOTIFY, INFO, REGISTER
    CSeq: 101 INVITE
    Max-Forwards: 70
    Timestamp: 1327397234
    Contact: <sip:[email protected]:5060>
    Expires: 180
    Allow-Events: telephone-event
    Content-Type: application/sdp
    Content-Disposition: session;handling=required
    Content-Length: 244
    v=0
    o=CiscoSystemsSIP-GW-UserAgent 3237 2021 IN IP4 192.168.22.1
    s=SIP Call
    c=IN IP4 192.168.22.1
    t=0 0
    m=audio 18258 RTP/AVP 8 101
    c=IN IP4 192.168.22.1
    a=rtpmap:8 PCMA/8000
    a=rtpmap:101 telephone-event/8000
    a=fmtp:101 0-16
    a=ptime:20
    I made some changes in the router configuration.
    I removed FA0/0.2 Voice interface from Voice service voip configuration (bind control source-interface FastEthernet0/0.2 and bind media source-interface FastEthernet0/0.2). And now it’s using ip address 10.1.1.101 (data ip).
    The debugging is changed now. I can send and receive a respond from SIP server. But  It shows an error: SIP/2.0 404 Not Found
    Then it moves to ISDN line, and use this line to make a call.
    102988: Jan 24 14:45:47.290: //-1/EDCA21089304/DPM/dpMatchPeersCore:
       Calling Number=, Called Number=90862157774T, Peer Info Type=DIALPEER_INFO_SPEECH
    102989: Jan 24 14:45:47.290: //-1/EDCA21089304/DPM/dpMatchPeersCore:
       Match Rule=DP_MATCH_DEST; Called Number=90862157774T
    102990: Jan 24 14:45:47.290: //-1/EDCA21089304/DPM/dpMatchPeersCore:
       Result=Success(0) after DP_MATCH_DEST
    102991: Jan 24 14:45:47.290: //-1/EDCA21089304/DPM/dpMatchPeersMoreArg:
       Result=SUCCESS(0)
       List of Matched Outgoing Dial-peer(s):
         1: Dial-peer Tag=9000
         2: Dial-peer Tag=2
         3: Dial-peer Tag=1
    102992: Jan 24 14:45:47.290: //-1/xxxxxxxxxxxx/DPM/dpMatchPeersCore:
       Calling Number=90862157774, Called Number=90862157774, Peer Info Type=DIALPEER_INFO_SPEECH
    102993: Jan 24 14:45:47.290: //-1/xxxxxxxxxxxx/DPM/dpMatchPeersCore:
       Match Rule=DP_MATCH_DEST; Called Number=90862157774
    102994: Jan 24 14:45:47.294: //-1/xxxxxxxxxxxx/DPM/dpMatchPeersCore:
       Result=Success(0) after DP_MATCH_DEST
    102995: Jan 24 14:45:47.294: //-1/xxxxxxxxxxxx/DPM/dpMatchPeersMoreArg:
       Result=SUCCESS(0)
       List of Matched Outgoing Dial-peer(s):
         1: Dial-peer Tag=9000
         2: Dial-peer Tag=2
         3: Dial-peer Tag=1
    102996: Jan 24 14:45:47.294: //-1/xxxxxxxxxxxx/DPM/dpAssociateIncomingPeerCore:
       Calling Number=90862157774, Called Number=, Voice-Interface=0x0,
       Timeout=TRUE, Peer Encap Type=ENCAP_VOIP, Peer Search Type=PEER_TYPE_VOICE,
       Peer Info Type=DIALPEER_INFO_SPEECH
    102997: Jan 24 14:45:47.294: //-1/xxxxxxxxxxxx/DPM/dpAssociateIncomingPeerCore:
       Result=Success(0) after DP_MATCH_ORIGINATE; Incoming Dial-peer=9000
    102998: Jan 24 14:45:47.294: //-1/EDCA21089304/DPM/dpMatchPeersCore:
       Calling Number=, Called Number=90862157774, Peer Info Type=DIALPEER_INFO_SPEECH
    102999: Jan 24 14:45:47.294: //-1/EDCA21089304/DPM/dpMatchPeersCore:
       Match Rule=DP_MATCH_DEST; Called Number=90862157774
    103000: Jan 24 14:45:47.294: //-1/EDCA21089304/DPM/dpMatchPeersCore:
       Result=Success(0) after DP_MATCH_DEST
    103001: Jan 24 14:45:47.294: //-1/EDCA21089304/DPM/dpMatchPeersMoreArg:
       Result=SUCCESS(0)
       List of Matched Outgoing Dial-peer(s):
         1: Dial-peer Tag=9000
         2: Dial-peer Tag=2
         3: Dial-peer Tag=1
    103002: Jan 24 14:45:47.298: fb_get_reject_cause_code: ERROR cause_code NULL
    103003: Jan 24 14:45:47.310: //-1/xxxxxxxxxxxx/SIP/Msg/ccsipDisplayMsg:
    Sent:
    INVITE sip:[email protected]:5060 SIP/2.0
    Via: SIP/2.0/UDP 10.1.1.101:5060;branch=z9hG4bK4875CB9
    Remote-Party-ID: "Sam" <sip:[email protected]>;party=calling;screen=no;privacy=off
    From: "Seam" <sip:[email protected]>;tag=CEF37490-172C
    To: <sip:[email protected]>
    Date: Tue, 24 Jan 2012 14:45:47 GMT
    Call-ID: [email protected]
    Supported: 100rel,timer,resource-priority,replaces
    Min-SE:  1800
    Cisco-Guid: 3989446920-1171263969-2466545983-1958389771
    User-Agent: Cisco-SIPGateway/IOS-12.x
    Allow: INVITE, OPTIONS, BYE, CANCEL, ACK, PRACK, UPDATE, REFER, SUBSCRIBE, NOTIFY, INFO, REGISTER
    CSeq: 101 INVITE
    Max-Forwards: 70
    Timestamp: 1327416347
    Contact: <sip:[email protected]:5060>
    Expires: 180
    Allow-Events: telephone-event
    Content-Type: application/sdp
    Content-Disposition: session;handling=required
    Content-Length: 247
    v=0
    o=CiscoSystemsSIP-GW-UserAgent 2438 9821 IN IP4 10.1.1.101
    s=SIP Call
    c=IN IP4 10.1.1.101
    t=0 0
    m=audio 19412 RTP/AVP 8 101
    c=IN IP4 10.1.1.101
    a=rtpmap:8 PCMA/8000
    a=rtpmap:101 telephone-event/8000
    a=fmtp:101 0-16
    a=ptime:20
    103004: Jan 24 14:45:47.354: //-1/xxxxxxxxxxxx/SIP/Msg/ccsipDisplayMsg:
    Received:
    SIP/2.0 404 Not Found
    From: "Sam "<sip:[email protected]>;tag=CEF37490-172C
    To: <sip:[email protected]>;tag=7fad61f03708-100007f-13c4-55013-a0142-10fd12c8-a0142
    Call-ID: [email protected]
    CSeq: 101 INVITE
    Via: SIP/2.0/UDP 10.1.1.101:5060;received=88.99.77.44;branch=z9hG4bK4875CB9
    Content-Length: 0
    103005: Jan 24 14:45:47.362: //-1/xxxxxxxxxxxx/SIP/Msg/ccsipDisplayMsg:
    Sent:
    ACK sip:[email protected]:5060 SIP/2.0
    Via: SIP/2.0/UDP 10.1.1.101:5060;branch=z9hG4bK4875CB9
    From: "Sam " <sip:[email protected]>;tag=CEF37490-172C
    To: <sip:[email protected]>;tag=7fad61f03708-100007f-13c4-55013-a0142-10fd12c8-a0142
    Date: Tue, 24 Jan 2012 14:45:47 GMT
    Call-ID: [email protected]
    Max-Forwards: 70
    CSeq: 101 ACK
    Allow-Events: telephone-event
    Content-Length: 0
    103006: Jan 24 14:45:47.374: %ISDN-6-LAYER2UP: Layer 2 for Interface BR0/0/1, TEI 96 changed to up
    103007: Jan 24 14:45:51.313: //-1/xxxxxxxxxxxx/DPM/dpMatchPeersCore:
       Calling Number=, Called Number=211, Peer Info Type=DIALPEER_INFO_SPEECH
    103008: Jan 24 14:45:51.313: //-1/xxxxxxxxxxxx/DPM/dpMatchPeersCore:
       Match Rule=DP_MATCH_DEST; Called Number=211
    103009: Jan 24 14:45:51.317: //-1/xxxxxxxxxxxx/DPM/dpMatchPeersCore:
       Result=Success(0) after DP_MATCH_DEST
    103010: Jan 24 14:45:51.317: //-1/xxxxxxxxxxxx/DPM/dpMatchPeers:
       Result=SUCCESS(0)
       List of Matched Outgoing Dial-peer(s):
         1: Dial-peer Tag=20018
    103011: Jan 24 14:45:51.317: //-1/xxxxxxxxxxxx/DPM/dpMatchPeersCore:
       Calling Number=, Called Number=0862157774, Peer Info Type=DIALPEER_INFO_SPEECH
    103012: Jan 24 14:45:51.317: //-1/xxxxxxxxxxxx/DPM/dpMatchPeersCore:
       Match Rule=DP_MATCH_DEST; Called Number=0862157774
    103013: Jan 24 14:45:51.317: //-1/xxxxxxxxxxxx/DPM/dpMatchPeersCore:
       No Outgoing Dial-peer Is Matched; Result=NO_MATCH(-1)
    103014: Jan 24 14:45:51.317: //-1/xxxxxxxxxxxx/DPM/dpMatchPeers:
       Result=NO_MATCH(-1)
    103015: Jan 24 14:46:08.815: %ISDN-6-LAYER2DOWN: Layer 2 for Interface BR0/0/1, TEI 96 changed to down
    2801(config-dial-peer)#
    Then I removed SIP-UA as I was told there is no registration necessary, only Dial-peer configuration.
    But it didn’t affect anything.
    Then I add translate-outgoing called 10 command to dial-peer 9000, nothing happened.
    Really stuck and don't know where to look at.
    Any help will be highly appreciated.
    Thanks.

    Hi Dan.
    Yes, I saw that RTP debugging, but what can I change there? Maybe I need to open more ports on ASA for RTP like 19412?
    I use Cisco ASDM for ASA to make changes.
    There are static NAT rules for: Server source IPs(10.1.1.100) to Outside(translated IPs, 88.99.77.44)  for a few ports.
    Also I added Security policy access rules for LAN: Any to SIP, and Outside: SIP to any.
    For NAT:
    I can't add this: for LAN: STATIC ROUTER IP 10.1.1.101 (AS SOURCE) UDP 5060 TO OUTSIDE IP 88.99.77.44
    (AS TRANSLATED) UDP 5060
    Because there is already translation for the Server.
    Debugging looks like that now. There is no Received: SIP/2.0, but I can make an outside call with no audio.
    116013: Jan 25 15:28:25.584: //-1/xxxxxxxxxxxx/DPM/dpAssociateIncomingPeerCore:
       Calling Number=90862157774, Called Number=, Voice-Interface=0x0,
       Timeout=TRUE, Peer Encap Type=ENCAP_VOIP, Peer Search Type=PEER_TYPE_VOICE,
       Peer Info Type=DIALPEER_INFO_SPEECH
    116014: Jan 25 15:28:25.584: //-1/xxxxxxxxxxxx/DPM/dpAssociateIncomingPeerCore:
       Result=Success(0) after DP_MATCH_ORIGINATE; Incoming Dial-peer=9000
    116015: Jan 25 15:28:25.584: //-1/0D0EB9CE9708/DPM/dpMatchPeersCore:
       Calling Number=, Called Number=90862157774, Peer Info Type=DIALPEER_INFO_SPEECH
    116016: Jan 25 15:28:25.584: //-1/0D0EB9CE9708/DPM/dpMatchPeersCore:
       Match Rule=DP_MATCH_DEST; Called Number=90862157774
    116017: Jan 25 15:28:25.584: //-1/0D0EB9CE9708/DPM/dpMatchPeersCore:
       Result=Success(0) after DP_MATCH_DEST
    116018: Jan 25 15:28:25.584: //-1/0D0EB9CE9708/DPM/dpMatchPeersMoreArg:
       Result=SUCCESS(0)
       List of Matched Outgoing Dial-peer(s):
         1: Dial-peer Tag=9000
         2: Dial-peer Tag=2
         3: Dial-peer Tag=1
    116019: Jan 25 15:28:25.588: fb_get_reject_cause_code: ERROR cause_code NULL
    116020: Jan 25 15:28:25.600: //-1/xxxxxxxxxxxx/SIP/Msg/ccsipDisplayMsg:
    Sent:
    INVITE sip:[email protected]:5060 SIP/2.0
    Via: SIP/2.0/UDP 10.1.1.101:5060;branch=z9hG4bK491484D
    Remote-Party-ID: "Sam " ;party=calling;screen=no;privacy=off
    From: "Sam " ;tag=D4410748-1C9D
    To:
    Date: Wed, 25 Jan 2012 15:28:25 GMT
    Call-ID: [email protected]
    Supported: 100rel,timer,resource-priority,replaces
    Min-SE:  1800
    Cisco-Guid: 219068878-1184895457-2533916991-1958389771
    User-Agent: Cisco-SIPGateway/IOS-12.x
    Allow: INVITE, OPTIONS, BYE, CANCEL, ACK, PRACK, UPDATE, REFER, SUBSCRIBE, NOTIFY, INFO, REGISTER
    CSeq: 101 INVITE
    Max-Forwards: 70
    Timestamp: 1327505305
    Contact:
    Expires: 180
    Allow-Events: telephone-event
    Content-Type: application/sdp
    Content-Disposition: session;handling=required
    Content-Length: 247
    v=0
    o=CiscoSystemsSIP-GW-UserAgent 1984 5803 IN IP4 10.1.1.101
    s=SIP Call
    c=IN IP4 10.1.1.101
    t=0 0
    m=audio 18782 RTP/AVP 8 101
    c=IN IP4 10.1.1.101
    a=rtpmap:8 PCMA/8000
    a=rtpmap:101 telephone-event/8000
    a=fmtp:101 0-16
    a=ptime:20
    116021: Jan 25 15:28:26.096: //-1/xxxxxxxxxxxx/SIP/Msg/ccsipDisplayMsg:
    Sent:
    INVITE sip:[email protected]:5060 SIP/2.0
    Via: SIP/2.0/UDP 10.1.1.101:5060;branch=z9hG4bK491484D
    Remote-Party-ID: "Sam " ;party=calling;screen=no;privacy=off
    From: "Sam " ;tag=D4410748-1C9D
    To:
    Date: Wed, 25 Jan 2012 15:28:26 GMT
    Call-ID: [email protected]
    Supported: 100rel,timer,resource-priority,replaces
    Min-SE:  1800
    Cisco-Guid: 219068878-1184895457-2533916991-1958389771
    User-Agent: Cisco-SIPGateway/IOS-12.x
    Allow: INVITE, OPTIONS, BYE, CANCEL, ACK, PRACK, UPDATE, REFER, SUBSCRIBE, NOTIFY, INFO, REGISTER
    CSeq: 101 INVITE
    Max-Forwards: 70
    Timestamp: 1327505306
    Contact:
    Expires: 180
    Allow-Events: telephone-event
    Content-Type: application/sdp
    Content-Disposition: session;handling=required
    Content-Length: 247
    v=0
    o=CiscoSystemsSIP-GW-UserAgent 1984 5803 IN IP4 10.1.1.101
    s=SIP Call
    c=IN IP4 10.1.1.101
    t=0 0
    m=audio 18782 RTP/AVP 8 101
    c=IN IP4 10.1.1.101
    a=rtpmap:8 PCMA/8000
    a=rtpmap:101 telephone-event/8000
    a=fmtp:101 0-16
    a=ptime:20
    116022: Jan 25 15:28:27.096: //-1/xxxxxxxxxxxx/SIP/Msg/ccsipDisplayMsg:
    Sent:
    INVITE sip:[email protected]:5060 SIP/2.0
    Via: SIP/2.0/UDP 10.1.1.101:5060;branch=z9hG4bK491484D
    Remote-Party-ID: "Sam " ;party=calling;screen=no;privacy=off
    From: "Sam " ;tag=D4410748-1C9D
    To:
    Date: Wed, 25 Jan 2012 15:28:27 GMT
    Call-ID: [email protected]
    Supported: 100rel,timer,resource-priority,replaces
    Min-SE:  1800
    Cisco-Guid: 219068878-1184895457-2533916991-1958389771
    User-Agent: Cisco-SIPGateway/IOS-12.x
    Allow: INVITE, OPTIONS, BYE, CANCEL, ACK, PRACK, UPDATE, REFER, SUBSCRIBE, NOTIFY, INFO, REGISTER
    CSeq: 101 INVITE
    Max-Forwards: 70
    Timestamp: 1327505307
    Contact:
    Expires: 180
    Allow-Events: telephone-event
    Content-Type: application/sdp
    Content-Disposition: session;handling=required
    Content-Length: 247
    v=0
    o=CiscoSystemsSIP-GW-UserAgent 1984 5803 IN IP4 10.1.1.101
    s=SIP Call
    c=IN IP4 10.1.1.101
    t=0 0
    m=audio 18782 RTP/AVP 8 101
    c=IN IP4 10.1.1.101
    a=rtpmap:8 PCMA/8000
    a=rtpmap:101 telephone-event/8000
    a=fmtp:101 0-16
    a=ptime:20
    116026: Jan 25 15:28:57.092: //-1/xxxxxxxxxxxx/SIP/Msg/ccsipDisplayMsg:
    Sent:
    INVITE sip:[email protected]:5060 SIP/2.0
    Via: SIP/2.0/UDP 10.1.1.101:5060;branch=z9hG4bK491484D
    Remote-Party-ID: "Sam" ;party=calling;screen=no;privacy=off
    From: "Sam " ;tag=D4410748-1C9D
    To:
    Date: Wed, 25 Jan 2012 15:28:57 GMT
    Call-ID: [email protected]
    Supported: 100rel,timer,resource-priority,replaces
    Min-SE:  1800
    Cisco-Guid: 219068878-1184895457-2533916991-1958389preference 1771
    User-Agent: Cisco-SIPGateway/IOS-12.x
    Allow: INVITE, OPTIONS, BYE, CANCEL, ACK, PRACK, UPDATE, REFER, SUBSCRIBE, NOTIFY, INFO, REGISTER
    CSeq: 101 INVITE
    Max-Forwards: 70
    Timestamp: 1327505337
    Contact:
    Expires: 180
    Allow-Events: telephone-event
    Content-Type: application/sdp
    Content-Disposition: session;handling=required
    Content-Length: 247
    v=0
    o=CiscoSystemsSIP-GW-UserAgent 1984 5803 IN IP4 10.1.1.101
    s=SIP Call
    c=IN IP4 10.1.1.101
    t=0 0
    m=audio 18782 RTP/AVP 8 101
    c=IN IP4 10.1.1.101
    a=rtpmap:8 PCMA/8000
    a=rtpmap:101 telephone-event/8000
    a=fmtp:101 0-16
    a=ptime:20
    I'll add Incoming dial-peer now.
    Not sure what kind of NAT rule should I put into ASA to allow in and out sip traffic.
    Appretiate your help.
    Thanks a mill.

  • Please help with my helper class

    Hi,
    plz I need some assistance with this:
    I have a big table which consist of 200 columns. This table gets fields from different tables. It has records of orders which may have several items and each item can have up to 8 taxes. So i have fields reaping for other order order records. I need to display an order then have a navigation to list items in details, with all its taxes, one by one.
    Here is how I have decided to do it in a nutshell. I have decided to get all taxes of a particular item and put in a map with tax_codes as values and tax details arraylist as values. I then add this to an item with its other details. then I add items to a particular order. I have separated orders,items and taxes in their separate beans. Im trying to first the implimentation for each order, item and taxes by displaying them on a JSP. However am currently getting the following error with taxdetails:
    java.lang.ClassCastException: OrderItems.ItemTax cannot be cast to java.lang.String
    at OrderItems.OrderDetails.getItemTaxDetails(OrderDetails.java:166)
    at OrderItems.Controller.processRequest(Controller.java:57)
    at OrderItems.Controller.doGet(Controller.java:72)
    I have a list of all itemTaxCodes am iterating and am casting to string...am not casting ItemTax object.Here is my code below:
    OrderDetails.java
    package orderitems;
    import java.sql.*;
    import java.util.*;
    public class OrderDetails {
        private LineOder lineOrder;
        private Map lineItems;
        //returns an item number, key_item, from its unique keys
        public int getItemNumber(int key_item, String key_year,
                String key_office,String key_client,String key_company){
            Connection conn = null;
            Statement stat = null;
            ResultSet rst = null;
            int itmNum = 0;
             * key_item a unique number for an item.
             * key_year,key_office,key_client,key_company unique keys
             * for each order where this key_item is taken
             * from.
            String select = "SELECT key_item FROM "+
                    Constants.WEB_TABLE +" WHERE key_item = " + key_item +
                    " AND key_year = '" + key_year + "'" +
                    " AND key_office = '" + key_office + "'" +
                    " AND key_client = '" + key_client + "'" +
                    " AND key_company = '" + key_company +"'";
            DbConnection dbConn = new DbConnection();
            try {
                conn = dbConn.getDbConnection(Constants.WEB_JNDI);
                stat = conn.createStatement();
                rst = stat.executeQuery(select);
                if(rst.next()){
                    itmNum = Integer.parseInt(rst.getString("key_item"));
            } catch (SQLException ex) {
                ex.printStackTrace();
            } finally{
                SQLHelper.cleanUp(rst, stat, conn);
            return itmNum;
        //get a list of item number(item codes)
        public List getAllItemNumbers(String key_year,
                String key_office,String key_client,String key_company){
            List itemNumbers = new ArrayList();
            LineItem itemNumber = null;
            Connection conn = null;
            Statement stat = null;
            ResultSet rst = null;
            String select = "SELECT key_item FROM "+ Constants.WEB_TABLE +
                    " WHERE key_year = '" + key_year + "'" +
                    " AND key_office = '" + key_office + "'" +
                    " AND key_client = '" + key_client + "'" +
                    " AND key_company = '" + key_company + "'";
            DbConnection dbConn = new DbConnection();
            try {
                conn = dbConn.getDbConnection(Constants.WEB_JNDI);
                stat = conn.createStatement();
                rst = stat.executeQuery(select);
                while(rst.next()){
                    itemNumber = new LineItem();
                    itemNumber.setKey_item(Integer.parseInt(rst.getString("key_item")));
                    itemNumbers.add(itemNumber);
            } catch (SQLException ex) {
                ex.printStackTrace();
            } finally{
                SQLHelper.cleanUp(rst, stat, conn);
            return itemNumbers;
        //get a list of tax codes
        public List getAllTaxCodes(int key_item, String key_year,
                String key_office,String key_client,String key_company){
            Connection conn = null;
            Statement stat = null;
            ResultSet rst = null;
            ItemTax taxCode;
            List taxCodes = new ArrayList();
            int itemNum = getItemNumber(key_item, key_year,
                    key_office,key_client,key_company);
            String select = "SELECT key_tax_code FROM "+
                    Constants.WEB_TABLE +" WHERE key_item = " + itemNum +
                    " AND key_year = '" + key_year + "'" +
                    " AND key_office = '" + key_office + "'" +
                    " AND key_client = '" + key_client + "'" +
                    " AND key_company = '" + key_company +"'";
            DbConnection dbConn = new DbConnection();
            try {
                conn = dbConn.getDbConnection(Constants.WEB_JNDI);
                stat = conn.createStatement();
                rst = stat.executeQuery(select);
                while(rst.next()){
                    taxCode = new ItemTax();
                    taxCode.setKey_tax_code(rst.getString("key_tax_code"));
                    taxCodes.add(taxCode);
            } catch (SQLException ex) {
                ex.printStackTrace();
            } finally{
                SQLHelper.cleanUp(rst, stat, conn);
            return taxCodes;
        //use tax code to get tax details
        public Map getItemTaxDetails(String key_year,String key_office,
                String key_client,String key_company,int key_item){
            ItemTax taxDetail = null;
            List taxDetails = new ArrayList();
            List itemTaxCodes = new ArrayList();
            Map itemTaxdetails = new HashMap();
            Connection conn = null;
            Statement stat = null;
            ResultSet rst = null;
            //get a list of all tax codes of an item with a
            //given item number
            itemTaxCodes = getAllTaxCodes(key_item,key_year,///a list of tax codes
                    key_office,key_client,key_company);
            DbConnection dbConn = new DbConnection();
            try {
                conn = dbConn.getDbConnection(Constants.WEB_JNDI);
                stat = conn.createStatement();
                for(Iterator taxCodeIter= itemTaxCodes.iterator(); taxCodeIter.hasNext();){
                    String taxCode = (String)taxCodeIter.next();/////casting taxtCode to string***exception occurs from here
                    String select = "SELECT tax_type,tax_value," +
                            "tax_limit_val FROM "+ Constants.WEB_TABLE +
                            " WHERE key_item = "+ key_item +
                            " AND key_year = '" + key_year + "'" +
                            " AND key_office = '" + key_office + "'" +
                            " AND key_client = '" + key_client + "'" +
                            " AND key_company = '" + key_company +"'" +
                            " AND key_tax_code = '" + taxCode + "'";///tax code string
                    rst = stat.executeQuery(select);
                    while(rst.next()){
                        taxDetail = new ItemTax();
                        //records to be displayed only
                        taxDetail.setKey_item(Integer.parseInt(rst.getString("key_item")));
                        taxDetail.setTax_value(rst.getString("tax_value"));
                        taxDetail.setTax_limit_val(Float.parseFloat(rst.getString("tax_limit_val")));
                        //////other details records ommited//////////////////////////
                        taxDetails.add(taxDetail);
                //a HashMap of all tax code as keys and list of details as values 4 each key
                for(int i = 0;i<itemTaxCodes.size(); i++){
                    itemTaxdetails.put(itemTaxCodes.get(i),taxDetails.get(i));
            } catch (SQLException ex) {
                ex.printStackTrace();
            } finally{
                SQLHelper.cleanUp(rst, stat, conn);
            return itemTaxdetails;
        //details of an item with all its taxes
        public List getAllItemDetails(String key_year,
                String key_office,String key_client,String key_company){
            List lineItems = new ArrayList();
            List itemNumbers = new ArrayList();
            Map taxDetails = new HashMap();
            LineItem item = null;
            Connection conn = null;
            Statement stat = null;
            ResultSet rst = null;
            //A list of all item numbers in the declaration
            itemNumbers = getAllItemNumbers(key_year,
                    key_office,key_client,key_company);
            DbConnection dbConn = new DbConnection();
            try {
                conn = dbConn.getDbConnection(Constants.WEB_JNDI);
                stat = conn.createStatement();
                for(Iterator itemIter= itemNumbers.iterator(); itemIter.hasNext();){
                    int itemNumber = ((Integer)itemIter.next()).intValue();
                    String select = "SELECT item_description,item_mass," +
                            "item_cost" +
                            " FROM " + Constants.WEB_TABLE +
                            " WHERE key_year = '"+key_year+"'" +
                            " AND key_office = '"+key_office+ "'"+
                            " AND key_client = '"+key_client+ "'"+
                            " AND key_company = '"+key_company+ "'"+
                            " AND key_item = " + itemNumber;
                    rst = stat.executeQuery(select);
                    while(rst.next()){
                        item = new LineItem();
                        item.setItem_description(rst.getString("item_description"));
                        item.setItem_mass(Float.parseFloat(rst.getString("item_mass")));
                        item.setKey_item(Integer.parseInt(rst.getString("item_cost")));
                        //////other details records ommited//////////////////////////
                        //A HashMap of all itemTaxeCodes as its keys and an ArrayList of itemTaxedetails as its values
                        taxDetails = getItemTaxDetails(item.getKey_year(),item.getKey_office(),
                                item.getKey_client(),item.getKey_company(),item.getKey_item());
                        //item tax details
                        item.setItmTaxes(taxDetails);
                        //list of items with tax details
                        lineItems.add(item);
            } catch (SQLException ex) {
                ex.printStackTrace();
            } finally{
                SQLHelper.cleanUp(rst, stat, conn);
            return lineItems;
        public Set getDeclarations(String key_year,String key_cuo,
                String key_dec,String key_nber){
            List lineItems = new ArrayList();
            Set lineOrders = new HashSet();
            Connection conn = null;
            Statement stat = null;
            ResultSet rst = null;
            LineOder lineOrder = null;
            String select = "SELECT * FROM " + Constants.WEB_TABLE +
                    " WHERE key_year = '" + key_year + "'" +
                    " AND key_cuo = '" + key_cuo + "'" +
                    " AND key_dec = '" + key_dec + "'" +
                    " AND key_nber = '" + key_nber + "'";
            DbConnection dbConn = new DbConnection();
            try {
                conn = dbConn.getDbConnection(Constants.WEB_JNDI);
                stat = conn.createStatement();
                rst = stat.executeQuery(select);
                while(rst.next()){
                    lineOrder = new LineOder();
                    lineOrder.setKey_year(rst.getString("key_year"));
                    lineOrder.setKey_office(rst.getString("key_cuo"));
                    lineOrder.setKey_client(rst.getString("key_dec"));
                    lineOrder.setKey_company(rst.getString("key_nber"));
                    ////list of items with all their details
                    lineItems = getAllItemDetails(lineOrder.getKey_year(),lineOrder.getKey_office(),
                            lineOrder.getKey_client(),lineOrder.getKey_company());
                    //setting item details
                    lineOrder.setItems(lineItems);
                    //a list of order with all details
                    lineOrders.add(lineOrder);
            } catch (SQLException ex) {
                ex.printStackTrace();
            } finally{
                SQLHelper.cleanUp(rst, stat, conn);
            return lineOrders;
    } and my testing servlet controller
    Controller.java
    package orderitems;
    import java.io.*;
    import java.util.*;
    import javax.servlet.*;
    import javax.servlet.http.*;
    public class Controller extends HttpServlet {
        private Map taxDetails = new HashMap();
        //private List itemDetails = new ArrayList();
        //private Set orderDetails = new HashSet();
        private OrderDetails orderDetails = null;
        protected void processRequest(HttpServletRequest request,
                HttpServletResponse response)throws
                ServletException, IOException {
            response.setContentType("text/html;charset=UTF-8");
            String key_year = "2007";
            String key_office = "VZX00";
            String key_company = "DG20";
            String key_client =  "ZI001";
            int key_item = 1;
            String nextView = "/taxdetails_list.jsp";
            //String nextView = "/order_list.jsp";
            //String nextView = "/items_list.jsp";
            orderDetails = new OrderDetails();
            taxDetails = orderDetails.getItemTaxDetails(key_year,key_office,
                    key_company,key_client,key_item);
            //Store the collection objects into HTTP Request
            request.setAttribute("taxDetails", taxDetails);
            RequestDispatcher reqstDisp =
                    getServletContext().getRequestDispatcher(nextView);
            reqstDisp.forward(request,response);
        protected void doGet(HttpServletRequest request,
                HttpServletResponse response)throws
                ServletException, IOException {
            processRequest(request, response);
        protected void doPost(HttpServletRequest request,
                HttpServletResponse response)throws
                ServletException, IOException {
            processRequest(request, response);
    }I have not included code for beans to reduce on bulk.please help and with suggestions...
    Thanx in advance.
    Edited by: aiEx on Oct 3, 2007 8:13 AM

    aiEx wrote:
    sometimes a tap on the head is needed to really learn and understand :-)You're casting them to the String type while they are of the ItemTax type and you've confirmed it yourself. Likely you misunderstood the concepts behind "casting" and you was expecting some magic that they are automatically converted somehow from the ItemTax type to the String type while the ItemTax class isn't a subclass of the String class :)

Maybe you are looking for