Re: Via Header not Required in Register request!
"M. Rangnathan" <[email protected]>
| Newsgroups | gmane.comp.voip.nist-sip |
|---|---|
| Message-ID | <[email protected]> |
Jagadeesh Kannan Jayapal wrote: >Hi, > >Thank you very much for your help. I successfully created to and from >header with parameters. > >Just a short intro, I am master thesis student trying to implement SIP >based >P2P application for mobile devices. As I am the beginner for both SIP >and P2P it would be of great help if this group could clarify my doubts >in future as well. > >I'm trying to construct a register request without a via header. I >think, there is no need for a via header in a register request. > > Jagadessh, Via header is mandatory for all requests. If you dont add one and you use a transaction to send a request, the stack will add a default via header using a listening point of the provider to populate it. Via is used to respond to requests and therefore it is required for all requests (register included). If you really really want to send a request without a Via, you can send it statelessly but I dont know why you would want to deliberately send out an invalid request unless you are building a tester. Please do take a look at RFC 3261 (required reading for JAIN-SIP). JAIN-SIP is simply a low level API for RFC 3261 and related RFCs. Good luck on your thesis. Its a good topic. Ranga >My problem is, that all of the four createRequest() methods need a Via >(List) parameter. So I created any empty ArrayList and passed to >The request. The request is successfully created without the param > >But, > >Shootist listener = this; >listener.inviteTid = sipProvider.getNewClientTransaction(request); > >adding the Via Header to the request. I don't need the Via header in P2P >as there >exists no special proxy or servers. > >Please clarify my doubt. > >Thank you in advance > > >-----Original Message----- >From: SiM [mailto:[email protected]] >Sent: Samstag, 8. Juli 2006 10:32 >To: Jagadeesh Kannan Jayapal >Cc: [email protected] >Subject: Re: Adding param to header > >Hi Jagadeesh, > Use the setParameter API , on your From or To >Header, you will get what you want, if you use it on the SIP URI, you >will get the name = value; parameter as a part of the SIP URI itself , >i believe u need it on the From or To header, so use the setParameter >API wherever you want. > >All the best, and one more thing , there is documentation for all the >API's , if you look up that, you can learn a lot of things you do not >know :-) . > >Cheers. >Simith > > > > >On 7/7/06, Jagadeesh Kannan Jayapal <[email protected]> wrote: > > >>HI all, >> >> >> >>I need to create a header that looks like this; >> >> >> >>From: sip:[email protected];user=node;alg=rsa-shal1;overlay=chat >> >> >> >> >> >>I used the following code to create the header; but not sure how to >> >> >add > > >>parameters to the created header?? >> >>Does Jain-Sip support doing so? >> >> >> >>SipURI fromAddress = addressFactory.createSipURI("7", "10.0.0.7"); >> >>Address fromNameAddress = addressFactory.createAddress(fromAddress); >> >> >> > >_______________________________________________ >nist-sip mailing list >[email protected] >http://www-x.antd.nist.gov/mailman/listinfo/nist-sip > > > -- M. Ranganathan Advanced Networking Technologies Division, National Institute of Standards and Technology (NIST), 100 Bureau Drive, Stop 8920, Gaithersburg, MD 20899. tel:301 975 3664 , fax:301 590 0932 http://w3.antd.nist.gov/ Advanced Networking Technologies For the People!