×

Discussion Board

Results 1 to 12 of 12
  1. #1
    Registered User
    Join Date
    Oct 2007
    Location
    Noida
    Posts
    152

    SIP Invite Not Received

    Hello everyone,

    I was trying to understand the different components of the SIP application and was following the SIPExample shipped with the S60 SDK for reference.

    I completed the Registration part and am able to register to the SIP server sucessfully. Atleast the Asterisk server sends me back a '200 ok' reply. Though i did not use or create an external SIP profile to register my application.

    I also completed the Invite part where i am sending a Invite to another Phone. Now since i can have only one Emulator per IDE. I used a XLITE SIP phone. i registerd the SIP phone with username say 3000 and my emulator with username 3001.. When i send an invite from my Emulator to the SIP phone it shows me that its ringing but when i try to send an Invite from the SIP phone to my emulator i do not receive any event.

    I have created a class which derives from MSIPObserver, MSIPConnectionObserver and overriden the methods that are required.

    please tell me what do i have to do if i have to receive an invite event from any other phone.
    Abhishek karmakar

    never- Never - NEVER -- !!! NEVER !!! GIVE UP

  2. #2
    Nokia Developer Moderator
    Join Date
    Feb 2006
    Location
    Oslo, Norway
    Posts
    28,751

    Re: SIP Invite Not Received

    That may also be a firewall problem.

  3. #3
    Registered User
    Join Date
    Oct 2007
    Location
    Noida
    Posts
    152

    Re: SIP Invite Not Received

    Hey Wizard,
    I already had my firewall off..

    any other Idea.

    thanks
    Abhishek karmakar

    never- Never - NEVER -- !!! NEVER !!! GIVE UP

  4. #4
    Nokia Developer Expert
    Join Date
    Jun 2008
    Posts
    333

    Re: SIP Invite Not Received

    it should not be a firewall problem otherwise all your sip communication will be blocked.
    maybe you can try this method.using a pc as wireless switcher for all your sip communication and install a sniffer on this pc.checking sniffer log to see what happens.

  5. #5
    Regular Contributor
    Join Date
    Dec 2006
    Posts
    59

    Re: SIP Invite Not Received

    I agree that sniffing your network traffic would be a good idea. If you then find that the INVITE actually arrives on the machine the emulator is installed on, you could check if there is something in the emulator log (epocwind.out).

  6. #6
    Registered User
    Join Date
    Oct 2007
    Location
    Noida
    Posts
    152

    Re: SIP Invite Not Received

    Iming/ Bifihi,

    Thank you so much for the replies. Ok i'll tell u what am i doing.

    I am using Asterisk server i.e Asterisk Win 32 PBX as my SIP server. I have enabled the debugging on my Asterisk server so i can see the invite request coming in.
    When i sent a Invite from the SIP phone it shows in the Server window that the Invite packets are sent. But i don't receive the request on my emulator. When i send the Invite from my Emulator i can see the Log coming in the server and i can also receive the request on the SIP phone.

    So i am pretty sure the Invite packet are being sent.
    What i am not sure of is that weather my application is using correct methods to trap the event of receiving the Invite request.

    This is the header file of the class that i am using to send the request. Will i also RECEIVE THE INVITE REQUEST by implementing these abstract classes or do i have so do something more.. or if i am missing a method that i need to override

    some help will be greatly appreciated.

    Code:
    
    /*
     ============================================================================
     Name		: SipRegisterAppView.h
     Author	  :Abhishek karmakar
     Copyright   : 
     Description : 
     ============================================================================
     */
    
    #ifndef __SIPREGISTERAPPVIEW_h__
    #define __SIPREGISTERAPPVIEW_h__
    
    // INCLUDES
    #include <coecntrl.h>
    #include <sip.h>
    #include <uri8.h>
    #include <sipobserver.h>
    #include <sipconnection.h>
    #include <sipconnectionobserver.h>
    #include <sipregistrationbinding.h>
    #include <sipclienttransaction.h>
    #include <sipinvitedialogassoc.h>
    
    #include "SipEngine.h"
    // CLASS DECLARATION
    
    class CSipEngine;
    
    class TIapData
    	{
    public:
    	TBuf<128> iName;
    	TUint32 iIap;
    
    	};
    
    class CSipRegisterAppView : public CCoeControl, MSIPObserver,
    		MSIPConnectionObserver
    	{
    public:
    	// New methods
    
    	/**
    	 * NewL.
    	 * Two-phased constructor.
    	 * Create a CSipRegisterAppView object, which will draw itself to aRect.
    	 * @param aRect The rectangle this view will be drawn to.
    	 * @return a pointer to the created instance of CSipRegisterAppView.
    	 */
    	static CSipRegisterAppView* NewL(const TRect& aRect);
    
    	/**
    	 * NewLC.
    	 * Two-phased constructor.
    	 * Create a CSipRegisterAppView object, which will draw itself
    	 * to aRect.
    	 * @param aRect Rectangle this view will be drawn to.
    	 * @return A pointer to the created instance of CSipRegisterAppView.
    	 */
    	static CSipRegisterAppView* NewLC(const TRect& aRect);
    
    	/**
    	 * ~CSipRegisterAppView
    	 * Virtual Destructor.
    	 */
    	virtual ~CSipRegisterAppView();
    
    public:
    	// Functions from base classes
    
    	/**
    	 * From CCoeControl, Draw
    	 * Draw this CSipRegisterAppView to the screen.
    	 * @param aRect the rectangle of this view that needs updating
    	 */
    	void Draw(const TRect& aRect) const;
    
    	/**
    	 * From CoeControl, SizeChanged.
    	 * Called by framework when the view size is changed.
    	 */
    	virtual void SizeChanged();
    	//from base class MSipconnectionobserver
    	void IncomingResponse(CSIPClientTransaction& aTransaction,
    			CSIPRegistrationBinding& aRegistration);
    	void IncomingRequest(TUint32 aIapId, CSIPServerTransaction* aTransaction);
    
    	void IncomingRequest(CSIPServerTransaction* aTransaction);
    
    	/**
    	 * IncomingRequest (from MSIPConnectionObserver)
    	 * A SIP request within a dialog has been received from the network.
    	 * The client must resolve the actual dialog association to which
    	 * this request belongs.
    	 *
    	 * @param aTransaction SIP server transaction. The ownership is
    	 *   transferred.
    	 * @param aDialog the dialog that this transaction belongs to.        
    	 */
    	void IncomingRequest(CSIPServerTransaction* aTransaction,
    			CSIPDialog& aDialog);
    
    	/**
    	 * IncomingResponse (from MSIPConnectionObserver)
    	 */
    	void IncomingResponse(CSIPClientTransaction& aTransaction);
    
    	/**
    	 * IncomingResponse (from MSIPConnectionObserver)
    	 * A SIP response that is within a dialog association or creates
    	 * a dialog association.
    	 *
    	 * @param aTransaction contains response elements.
    	 * @param aDialogAssoc a dialog association.        
    	 */
    	void IncomingResponse(CSIPClientTransaction& aTransaction,
    			CSIPDialogAssocBase& aDialogAssoc);
    
    	/**
    	 * IncomingResponse (from MSIPConnectionObserver)
    	 */
    	void IncomingResponse(CSIPClientTransaction& aTransaction,
    			CSIPInviteDialogAssoc* aDialogAssoc);
    
    	void ErrorOccured(TInt aError, CSIPTransactionBase& aTransaction);
    
    	void ErrorOccured(TInt aError, CSIPClientTransaction& aTransaction,
    			CSIPRegistrationBinding& aRegistration);
    
    	/**
    	 * An asynchronous error has occured related to a request within
    	 * an existing dialog.
    	 *
    	 * @param aError system wide or sip error code
    	 * @param aTransaction the failed transaction.
    	 * @param aDialogAssoc the failed dialog associoation.        
    	 */
    	void ErrorOccured(TInt aError, CSIPTransactionBase& aTransaction,
    			CSIPDialogAssocBase& aDialogAssoc);
    
    	/**
    	 * An asynchronous error has occured related to a refresh 
    	 *
    	 * @param aError system wide or sip error code
    	 * @param aSIPRefresh original refresh object.        
    	 */
    	void ErrorOccured(TInt aError, CSIPRefresh& aSIPRefresh);
    
    	/**
    	 * An asynchronous error has occured related to a periodical refresh
    	 * that relates to a registration.
    	 *
    	 * @param aError system wide or sip error code; 
    	 *		 KErrCouldNotConnect if the refresh has failed
    	 *		 due to the suspended connection.
    	 * @param aRegistration associated registration.
    	 */
    	void ErrorOccured(TInt aError, CSIPRegistrationBinding& aRegistration);
    
    	/**
    	 * An asynchronous error has occured related to a periodical refresh
    	 * that belongs to SIP dialog association.
    	 *
    	 * @param aError system wide or sip error code; 
    	 *        KErrCouldNotConnect if the refresh has failed
    	 *		 due to the suspended connection.
    	 * @param aDialogAssoc SIP dialog association.        
    	 */
    	void ErrorOccured(TInt aError, CSIPDialogAssocBase& aDialogAssoc);
    
    	void InviteCompleted(CSIPClientTransaction& aTransaction);
    
    	/**
    	 * Invite was canceled with the CANCEL
    	 * @param aTransaction a canceled INVITE UAS transaction
    	 */
    	void InviteCanceled(CSIPServerTransaction& aTransaction);
    
    	/**
    	 * Connection state has changed.
    	 * If connection state has changed to EInactive or EUnavailable,
    	 * SIP stack has removed all stand-alone SIP refreshes, registrations 
    	 * and dialog associations that client requested to refresh. Client may
    	 * re-issue refresh requests (stand-alone, registration or dialog 
    	 * association related) when connection becomes EActive again.
    	 * SIP stack also terminates all pending sip client transactions and no
    	 * errors are reported back to the client about the terminated
    	 * transactions nor about removed refreshes in order to avoid event
    	 * flood.
    	 * 
    	 * @param aState indicates the current connection state        
    	 */
    	void ConnectionStateChanged(CSIPConnection::TState aState);
    
    	/**
    	 * TimedOut (from MSIPObserver)
    	 */
    
    	void TimedOut(CSIPServerTransaction& aSIPServerTransaction);
    
    public:
    
    	TInt SelectIAPL();
    
    	void Register();
    
    	void SendInviteL();
    
    private:
    	// Constructors
    
    	/**
    	 * ConstructL
    	 * 2nd phase constructor.
    	 * Perform the second phase construction of a
    	 * CSipRegisterAppView object.
    	 * @param aRect The rectangle this view will be drawn to.
    	 */
    	void ConstructL(const TRect& aRect);
    
    	/**
    	 * CSipRegisterAppView.
    	 * C++ default constructor.
    	 */
    	CSipRegisterAppView();
    
    	CSIP* iSIP;
    	CSIPConnection* iConnection;
    	CSIPConnection::TState iConnState;
    	CSIPRegistrationBinding* iRegistration;
    	CSIPClientTransaction* iRegistrationTx;
    	TInt iSelectedIAP;
    
    	};
    
    #endif // __SIPREGISTERAPPVIEW_h__
    // End of File
    Thanks and Regards,
    Abhishek karmakar

    never- Never - NEVER -- !!! NEVER !!! GIVE UP

  7. #7
    Regular Contributor
    Join Date
    Dec 2006
    Posts
    59

    Re: SIP Invite Not Received

    Hi Abhishek karmakar,

    Once again I think you should proceed step by step:
    1. Make sure the request really arrives on the machine the emulator is running on (wireshark, etc.) and if it does
    2. Enable emulator logging and check if you can find some hints in "epocwind.out".

  8. #8
    Registered User
    Join Date
    Oct 2007
    Location
    Noida
    Posts
    152

    Re: SIP Invite Not Received

    Hello bifihi/All,
    Make sure the request really arrives on the machine the emulator is running on (wireshark, etc.)
    ->I am running the X-Lite SIP phone , The S60 Emulator and Asterisk(SIP server) in the same machine.

    -> I have also enabled debugging in the SIP server so i can see the request coming in form of SIP packets.From X-Lite and at the same time the Emulator is also registered with the Asterisk server.

    2. Enable emulator logging and check if you can find some hints in "epocwind.out".
    I have checked the "Enable EPOCWIND.OUT logging" checkbox in the preferences window, but can u please tell me where to find the file.


    and finally , Do i have to implement some other Interface or 'M' classes in my code to receive a SIP Invite.

    thanks in Advance
    Abhishek karmakar

    never- Never - NEVER -- !!! NEVER !!! GIVE UP

  9. #9
    Regular Contributor
    Join Date
    Dec 2006
    Posts
    59

    Re: SIP Invite Not Received

    Hi,

    Epocwind.out can by default be found under the users temporary directory, see
    http://wiki.forum.nokia.com/index.php/Epocwind.out for more infos.

    Your code looks okay to me so far. Have you also implemented a SIP Resolverplugin?
    This is to register your application at the client resolver framework on the device with it's capabilities in XML. It's also necessary for receiving incoming initial requests.
    See
    http://www.symbian.com/developer/tec...API/index.html
    You can find out how do this in the SIP example (chipflip) provided in the SDK.

  10. #10
    Registered User
    Join Date
    Oct 2007
    Location
    Noida
    Posts
    152

    Re: SIP Invite Not Received

    Hello bifihi/All,
    Have you also implemented a SIP Resolverplugin?
    No I have not done it. Infact i got to know about it only after reading from here.Is it absolutely Required to implement it to receive initial Invite Requests or is there another way out.

    And if this is the way can u put some light on how exactly this has to be done.

    how do i have to implement the SIP Resolverplugin ?
    Abhishek karmakar

    never- Never - NEVER -- !!! NEVER !!! GIVE UP

  11. #11
    Registered User
    Join Date
    Oct 2007
    Location
    Noida
    Posts
    152

    Re: SIP Invite Not Received

    Hello bifihi/All,
    Have you also implemented a SIP Resolverplugin?
    No I have not done it. Infact i got to know about it only after reading from here.Is it absolutely Required to implement it to receive initial Invite Requests or is there another way out.

    And if this is the way can u put some light on how exactly this has to be done.

    how do i have to implement the SIP Resolverplugin ?
    Abhishek karmakar

    never- Never - NEVER -- !!! NEVER !!! GIVE UP

  12. #12
    Regular Contributor
    Join Date
    Dec 2006
    Posts
    59

    Re: SIP Invite Not Received

    Hi Abhishek karmakar,

    Sorry for answering so late. You have to use the resolver plugin for the framework on the device to route the INVITE to your application.
    The best way to start with this is the SIP resolver plugin in the SIPExample application from the SDK.
    There is also a lot of quite nice infos in the SDK documentation. Good luck!

Similar Threads

  1. SIP Invite Procedures
    By jgarinf in forum Symbian Tools & SDKs
    Replies: 3
    Last Post: 2008-11-05, 14:41
  2. SIP invite method any idea?
    By shamun.toha in forum Mobile Java Networking & Messaging & Security
    Replies: 1
    Last Post: 2008-07-06, 19:05
  3. Incomplete INVITE header shows up in SIP Emulator when sending INVITE
    By razas in forum Symbian Networking & Messaging (Closed)
    Replies: 1
    Last Post: 2007-06-21, 05:58
  4. SIP INVITE Message. Content type not set
    By chengiz in forum Symbian Networking & Messaging (Closed)
    Replies: 0
    Last Post: 2005-05-25, 12:15
  5. SIP plugin TX an 400 after RX an INVITE
    By Zaibach in forum Symbian Networking & Messaging (Closed)
    Replies: 0
    Last Post: 2004-08-06, 11:29

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
×