[OpenSIPS-Users] How to send 200 OK for REGISTER without adding Tag in SIP-To-Header (To-Tag $tt)

Bogdan-Andrei Iancu bogdan at voice-system.ro
Wed Oct 8 21:11:01 CEST 2008


Hi Pai,


Pai Peng wrote:
> Hi Bogdan,
>
>
> the ";rport=5060" is already in the via header with or without 
> "force_rport();" in the route{}.
>
> And after inserting "force_rport();" into the route, i got the same 
> 200 OK SIP message as before (without "received=").
yes..if rport already exists, it will have no effect.....This was the 
only way you could force a received= in VIA (if not really necessary).
>
>
> btw, Can I change the transport=UDP to transport=udp in the Contact 
> header?
No, because the contact for the REGISTERs contain exactly the contacts 
that were upload by the client in the REGISTER request - check your 
REGISTER request and see what is the uploaded contact.

Regards,
Bogdan
>
>
> Thank you very much for your reply.
>
> Pai
>
>
>
> ____________________________________________________________________________
> here is the 200 OK from Opensips:
>
> SIP/2.0 200 OK.
> Via: SIP/2.0/UDP 
> IP_1:5060;branch=z9hG4bKm4d4i5292jgbch2qvql0jgj;rport=5060.
> From: <sip:sip02 at domain.com 
> <mailto:sip%3Asip02 at domain.com>>;tag=n3mvtamlb5hc79h206gu.
> To: <sip:sip02 at domain.com 
> <mailto:sip%3Asip02 at domain.com>>;tag=c97b4d1cb1f3d0da549e06a8d482ef63.beea.
> CSeq: 668 REGISTER.
> Call-ID: av7-GAN-oIeXJM6xXjUGmglDzKstoX.
> Allow: ACK, BYE, CANCEL, INVITE, REGISTER, OPTIONS, INFO, MESSAGE.
> Contact: <sip:sip02 at IP_1:5060;transport=UDP>;expires=3600.
> Server: OpenSIPS (1.4.2-notls (i386/linux)).
> Content-Length: 0.
> --------------------------------------------------------------------------------------------------------------------------------------
>
>
>
> and the following 200 OK from sip.voipstunt.com 
> <http://sip.voipstunt.com> works on the Nokia N95 SIP client:
>
> SIP/2.0 200 OK.
> Via: SIP/2.0/UDP IP_2:5060;branch=jgj;received=IP_2;rport=5060.
> From: <sip:sip02 at voipstunt.com 
> <mailto:sip%3Asip02 at voipstunt.com>>;tag=n3mvtamlb5hc79h206gu.
> To: <sip:sip02 at voipstunt.com <mailto:sip%3Asip02 at voipstunt.com>>
> Contact: <sip:sip02 at IP_2:5060;transport=udp>;expires=3600.
> Call-ID: sssssssssssss
> CSeq: 664 REGISTER.
> Server: (the voipstunt.com <http://voipstunt.com> sip server).
> Allow: ACKBYE, CANCEL, INVITE, REGISTER, OPTIONS, INFO, MESSAGE.
> Content-Length: 0.
> ____________________________________________________________
>
>
>
>
>
>
> On Wed, Oct 8, 2008 at 7:28 PM, Bogdan-Andrei Iancu 
> <bogdan at voice-system.ro <mailto:bogdan at voice-system.ro>> wrote:
>
>     Hi Pai,
>
>     use force_rport() - this will add rport and received params to the
>     via.
>
>
>     Regards,
>     Bogdan
>
>     Pai Peng wrote:
>
>         Hello Bogdan,
>
>
>         thanks a lot for your clear answer.
>
>         I am now comparing out the 2 different 200 OK responses: one
>         from other sip-server works fine on Nokia SIP client, the
>         other comes from Opensips not.
>
>         I can not manipulate the SIP client on Nokia device, because
>         it is integrated in OS and can already works with many other
>         SIP servers.
>
>
>         Because I can't find out the error code (-17701) description
>         in any documents, I don't know exactly what is the problem. I
>         heard from someone that it is may be in the contact-header...
>
>         There are two different points between these two 200 OKs:
>         in Via: the working 200 OK response has a received=ip added
>         into the Via-Header (it is the same as the src_ip in
>         via-header), but the 200 OK from Opensips has not.
>
>         in To-header: the working 200 OK response has not To-Tag
>         inserted, but the other from Opensips has.
>
>
>         I have just checked out in the early discussion about the
>         ";received=ip" in VIA. It is not a MUST. But in order to solve
>         my problem, I would like to add this in via-header by myself.
>
>         The question is, if it is possible to do it? When yes, how to
>         configuration?
>
>
>         Thanks again
>
>         Pai
>
>
>         On Wed, Oct 8, 2008 at 6:40 PM, Bogdan-Andrei Iancu
>         <bogdan at voice-system.ro <mailto:bogdan at voice-system.ro>
>         <mailto:bogdan at voice-system.ro
>         <mailto:bogdan at voice-system.ro>>> wrote:
>
>            Hi Pai,
>
>            It is a must (by RFC3261) to have a TO-tag in any final reply
>            (including 200 OK) . What are you asking is a violation of
>         the SIP
>            RFC.
>
>            I guess the problem is in the SIP client from the NOKIA device.
>            You should try to solve it there.
>
>
>            Anyhow, to answer to your question, no, there is no way to
>         send a
>            200 OK without To-tag :).
>
>            Regards,
>            Bogdan
>
>            Pai Peng wrote:
>
>                Hello,
>
>
>                I am using Opensips 1.4.2  as SIP-Server and a Nokia N95 as
>                SIP-Client.
>
>                But I got error -17701 on N95 by registering with 200 OK
>                response from the server.
>
>                I compared the 200 OK SIP-message with other worked
>         SIP-Server
>                und found out, that the problem maybe is on the To-Tag
>         in the
>                response.
>
>                Now I want the Opensips not adding to-tag into the 200 OK
>                response for register. Can anyone give me a help?
>
>
>                Thanks
>
>                Pai
>              
>          ------------------------------------------------------------------------
>
>                _______________________________________________
>                Users mailing list
>                Users at lists.opensips.org
>         <mailto:Users at lists.opensips.org>
>         <mailto:Users at lists.opensips.org
>         <mailto:Users at lists.opensips.org>>
>
>                http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>                
>
>
>
>
>         -- 
>         Pai Peng
>         Mierendorffstr. 21
>         10589 Berlin
>         Germany
>         Tel.: 0049-179-7716503
>         Symbian OS
>
>
>




More information about the Users mailing list