Hello,
thank you for your help.

I will use the error_route for my purpose.

Thanks and regards,


On Mon, Oct 21, 2013 at 4:32 PM, Bogdan-Andrei Iancu <[email protected]>wrote:

> **
> Hello,
>
> Please keep the mailing list as CC'ed.
>
> there is no such function in 1.7, but try to use an error_route in your
> script to catch and remove bogus messages asap - see
>         http://www.opensips.org/Documentation/Script-Routes-1-7#toc5
>
> Regards,
>
> Bogdan-Andrei Iancu
> OpenSIPS Founder and Developerhttp://www.opensips-solutions.com
>
>
> On 10/21/2013 01:56 PM, Pratik Tank wrote:
>
>  Hello bogdan-andrei lancu,
>
> Thank you very much for your reply.
>  I am using version 1.7, is there support for function like
> sipmsg_validate?
>
> Or is there anyother way to do it for v1.7?
>
>
>  Thanks and regards,
>
>
> On Mon, Oct 21, 2013 at 3:59 PM, Bogdan-Andrei Iancu 
> <[email protected]>wrote:
>
>>  Hello Pratik,
>>
>> In the very beginning of the script route use the sipmsg_validate()
>> function (see
>> http://www.opensips.org/html/docs/modules/1.10.x/sipmsgops.html#id294004)
>> to check your message - you can do an exit there if the message is not
>> valid.
>>
>> Regards,
>>
>> Bogdan-Andrei Iancu
>> OpenSIPS Founder and Developerhttp://www.opensips-solutions.com
>>
>>
>> On 10/11/2013 12:27 PM, Pratik Tank wrote:
>>
>>  Hello all,
>>
>>
>> I want to drop the sip packets which have *to* and *contact* field empty.
>>
>> *INVITE sip:******************* SIP/2.0
>>
>> Record-Route:
>>
>> Via: SIP/2.0/UDP *********;branch=z9hG4bK0e44.f7bd2db2.0
>>
>> Via: SIP/2.0/UDP 
>> ************:5060;received=*********;branch=z9hG4bK78f0df76;rport=1122
>>
>> Max-Forwards: 69
>>
>> From: "1014" ;tag=as2fff3730
>>
>> To:
>>
>> Contact:
>>
>> Call-ID: **********@*********
>>
>> CSeq: 103 INVITE
>>
>> User-Agent: Asterisk PBX 1.6.2.9-2ubuntu2.1
>>
>> Date: Wed, 09 Oct 2013 15:16:20 GMT
>>
>> Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO
>>
>> Supported: replaces, timer
>>
>> Content-Type: application/sdp
>>
>> Content-Length: 311 *
>> ***How can I identify such packets and drop them?*
>>
>> *logs for opensips:*
>>
>> *Oct  9 17:16:00 voip /usr/local/sbin/opensips[32325]: 
>> ERROR:core:parse_first_line: bad request first line
>>
>> Oct  9 17:16:00 voip /usr/local/sbin/opensips[32325]: 
>> ERROR:core:parse_first_line: at line 0 char 42:
>>
>> Oct  9 17:16:00 voip /usr/local/sbin/opensips[32325]: 
>> ERROR:core:parse_first_line: parsed so far: INVITE 
>> sip:***********************:5060
>>
>> Oct  9 17:16:00 voip /usr/local/sbin/opensips[32325]: 
>> INFO:core:parse_first_line: bad message
>>
>>  > sendrecv 0-16lephone-event/8000 *************SUBSCRIBE, NOTIFY, INFOg: 
>> message=<INVITE sip:*************:5060 SIP/2.0
>>
>> Oct  9 17:16:00 voip /usr/local/sbin/opensips[32325]: 
>> ERROR:core:receive_msg: parse_msg failed
>>
>> Oct  9 17:16:04 voip /usr/local/sbin/opensips[32303]: 
>> ERROR:core:parse_first_line: bad request first line
>>
>> Oct  9 17:16:04 voip /usr/local/sbin/opensips[32303]: 
>> ERROR:core:parse_first_line: at line 0 char 42:
>>
>> Oct  9 17:16:04 voip /usr/local/sbin/opensips[32303]: 
>> ERROR:core:parse_first_line: parsed so far: INVITE sip:****************:5060
>>
>> Oct  9 17:16:04 voip /usr/local/sbin/opensips[32303]: 
>> INFO:core:parse_first_line: bad message
>>
>>  > sendrecv 0-16lephone-event/*******************SUBSCRIBE, NOTIFY, INFOg: 
>> message=<INVITE sip:*****************:5060 SIP/2.0
>>
>> Oct  9 17:16:04 voip /usr/local/sbin/opensips[32303]: 
>> ERROR:core:receive_msg: parse_msg failed*
>>
>>
>>
>> _______________________________________________
>> Devel mailing 
>> [email protected]http://lists.opensips.org/cgi-bin/mailman/listinfo/devel
>>
>>
>
>
> --
>  Pratik Tank
>  Jr. Software Developer
> Ecosmob Technologies Pvt. Ltd.
>
>


-- 
Pratik Tank
Jr. Software Developer
Ecosmob Technologies Pvt. Ltd.
_______________________________________________
Devel mailing list
[email protected]
http://lists.opensips.org/cgi-bin/mailman/listinfo/devel

Reply via email to