Author |
Message |
max_d29 Brekeke Member
Joined: 11 Oct 2010 Posts: 19
|
Posted: Tue Nov 09, 2010 7:43 am Post subject: force error return. |
|
|
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/networkpatterns.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 |
|
Back to top |
|
Harold Brekeke Master Guru
Joined: 21 Sep 2008 Posts: 289
Location: Japan
|
Posted: Tue Nov 09, 2010 12:18 pm Post subject: |
|
|
Why do you want to do so?
It can be done with a session plug-in. |
|
Back to top |
|
max_d29 Brekeke Member
Joined: 11 Oct 2010 Posts: 19
|
Posted: Wed Nov 17, 2010 2:34 am Post subject: |
|
|
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' |
|
Back to top |
|
Harold Brekeke Master Guru
Joined: 21 Sep 2008 Posts: 289
Location: Japan
|
Posted: Wed Nov 17, 2010 3:52 pm Post subject: |
|
|
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. |
|
Back to top |
|
max_d29 Brekeke Member
Joined: 11 Oct 2010 Posts: 19
|
Posted: Thu Nov 18, 2010 1:36 am Post subject: |
|
|
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 |
|
Back to top |
|
Harold Brekeke Master Guru
Joined: 21 Sep 2008 Posts: 289
Location: Japan
|
Posted: Fri Nov 19, 2010 12:11 pm Post subject: |
|
|
Refer the document below.
http://www.brekeke-sip.com/download/bss/v2_x/bss_accountplugin_en.txt
And try the method below.
Code: |
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. |
|
Back to top |
|
max_d29 Brekeke Member
Joined: 11 Oct 2010 Posts: 19
|
Posted: Mon Nov 22, 2010 3:22 am Post subject: |
|
|
big thank you...... try and make you know....
bye |
|
Back to top |
|
|