force error return.

Discuss any topic about Brekeke SIP Server.

Moderator: Brekeke Support Team

Post Reply
max_d29
Posts: 19
Joined: Mon Oct 11, 2010 3:51 am

force error return.

Post by max_d29 »

1. Brekeke Product Name and version: 2.4.73

2. Java version: 6/22

3. OS type and the version: windowx xp sp3

4. UA (phone), gateway or other hardware/software involved: Tenor Quitnum Gateway

5. Select your network pattern from http://www.brekeke-sip.com/bbs/network/ ... terns.html :

6. Your problem:
the sip server, when arrive a request, can responce with different error, for example if not have in a dialplan a number give the error 404, request termined error 487, address incomplete error 484....etc...
so, would i like to know, if i can give in foce mode , the same error 404( for example) every time who match the error 487 or 484.
in other word, i make a request a sip server, the sip server responde the 487 error, but i whant give a the client request, the error 404....
THX
Harold
Posts: 289
Joined: Sun Sep 21, 2008 10:31 pm
Location: Japan

Post by Harold »

Why do you want to do so?

It can be done with a session plug-in.
max_d29
Posts: 19
Joined: Mon Oct 11, 2010 3:51 am

Post by max_d29 »

Why? because i've a situation particular where i must to make this force responce.

So, only with a plugin mode? nothing mode to do via dialplan?

Thanks'
Harold
Posts: 289
Joined: Sun Sep 21, 2008 10:31 pm
Location: Japan

Post by Harold »

the DialPlan can not replace a response code after an INVITE request is forwarded.

therefore.. Session Plug-in is the only solution.

you can ask Brekeke's team to develop a plug-in.
max_d29
Posts: 19
Joined: Mon Oct 11, 2010 3:51 am

Post by max_d29 »

i'm a programator.
where can found a specific documentaction for make the correct creation of this plugin?
in the download area of brekeke the example not clear my idea.
thank's
Harold
Posts: 289
Joined: Sun Sep 21, 2008 10:31 pm
Location: Japan

Post by Harold »

Refer the document below.
http://www.brekeke-sip.com/download/bss ... gin_en.txt


And try the method below.

Code: Select all

  public void procINVITE( ClientStat cs, SIPpacket sippacket, boolean bRequest )
  {
    super.procINVITE( cs, sippacket, bRequest ) ;

    // response packet
    if ( bRequest == false ) {

      // 487 or 484
      if ( ( sippacket.responsecode == 487 ) 
       || ( sippacket.responsecode == 484) ) {

        sippacket.request = "SIP/2.0 404 Not Found" ;
      }
    }

  }
I've tested it without problem.
max_d29
Posts: 19
Joined: Mon Oct 11, 2010 3:51 am

Post by max_d29 »

big thank you...... try and make you know....
bye
Post Reply