Hi Ivan,
thank you for your response. I added the lines (the '}' included) into
the AmSession.cpp.
But unfortunately I get the same response.
In the syslog I see the following error:
ERROR: could not find any application matching configured criteria
In the sems.conf I set: application = $(apphdr)
If I unterstood correctly, your fix work for OPTIONS send whithin an
existing session, right?
I need to reply on OPTIONS without existing session.
I found in the syslog the following line:
Sep 11 11:49:13 core1 sems[15191]: [#7f270df65700] [handleSipMsg,
AmSipDispatcher.cpp:88] DEBUG: method: `OPTIONS' [7].
So I gave a look to the AmSipDispatcher.cpp and I added the following lines:
else if(req.method == "CANCEL"){
if(ev_disp->postSipRequest(callid, remote_tag, req)){
return;
}
// CANCEL of a (here) non-existing dialog
AmSipDialog::reply_error(req,481,SIP_REPLY_NOT_EXIST);
return;
}
/* addon for OPTIONS */
else if(req.method == "OPTIONS"){
AmSipDialog::reply_error(req,200,"OK");
return;
}
/* end */
else if(req.method == "BYE"){
This works for me, but I thought that reply_error shouldn't send a 200 OK
I did a grep and find in the AmApi.cpp:
AmSipDialog::reply_error(req, 200, "OK");
So for me its ok to use reply_error to send a 200 OK.
Regards,
Julian
Am 11.09.2013 10:57, schrieb Ivan Milivojevic:
> I forgot '}', this is the correct
>
>
>
> else if( req.method == "BYE" ){
>
> dlg.reply(req,200,"OK");
> onBye(req);
> }
>
> /* addon for OPTIONS */
> else if( req.method == "OPTIONS" ){
>
> dlg.reply(req,200,"OK");
> /* end */
> }
> else if( req.method == "CANCEL" ){
>
> dlg.reply(req,200,"OK");
> onCancel();
>
> } else if( req.method == "INFO" ){
>
> Regards,
> Ivan
>
>
>
> On Wed, Sep 11, 2013 at 10:43 AM, Ivan Milivojevic
> <[email protected]
> <mailto:[email protected]>> wrote:
>
> Hi Julian,
>
> I fixed this by adding next few lines in sems/core/AmSession.cpp
>
> else if( req.method == "BYE" ){
>
> dlg.reply(req,200,"OK");
> onBye(req);
> }
>
> /* addon for OPTIONS */
>
> } else if( req.method == "OPTIONS" ){
>
>
> dlg.reply(req,200,"OK");
>
> /* end */
>
> else if( req.method == "CANCEL" ){
>
> dlg.reply(req,200,"OK");
> onCancel();
>
> and recompiling.
>
>
>
> Regards,
> Ivan
>
>
> On Wed, Sep 11, 2013 at 10:15 AM, Julian Santer
> <[email protected]
> <mailto:[email protected]>>
wrote:
>
> Hi,
>
> I have two Sems 1.4.3 (announcing, redirects, CDR) behind two
> OpenSIPS.
> I use the DR module in OpenSIPS, which sends every 30 seconds an
> OPTIONS to the specified hosts. If the host respond with "200
> OK", the host is reachable in the routing of OpenSIPS.
> My problem now is, that Sems don't respond with "200 OK" but
> with "404 Not found".
>
> Here the trace:
>
> OpenSIPS Sems
> 1.2.3.4:5060 <http://1.2.3.4:5060> 1.2.3.5:5060
> <http://1.2.3.5:5060>
> | |
> <Call><PFrame><Time>
> | |
> | F1 OPTIONS |
> |>----------------------------__-------------------->| 1 PF:1
> 15:05:19.7884
> | |
> | Not found 404 F2 |
> |<----------------------------__--------------------<| 1 PF:2
> 15:05:19.7889
>
>
==============================__==============================__====================
>
> SIP MESSAGE 1 1.2.3.4:5060(OpenSIPS) ->
> 1.2.3.5:5060(Sems)
> UDP Frame 1 10/Sep/13 15:05:19.7884
> TimeFromPreviousSipFrame=0.__0000 TimeFromStart=0.0000
> OPTIONS sip:sems1.test.com <http://sems1.test.com> SIP/2.0
> Via: SIP/2.0/UDP 1.2.3.4:5060;branch=__z9hG4bKed0c.4bc9c54.0
> To: sip:sems1.test.com <http://sems1.test.com>
> From:
> <sip:[email protected]
>
<mailto:sip%[email protected]>>__;tag=__65e8ffb57d58208c14c17804698c44__b4-4913
> CSeq: 10 OPTIONS
> Call-ID: [email protected]
> <mailto:[email protected]>
> Max-Forwards: 70
> Content-Length: 0
> User-Agent: OpenSIPS
>
>
>
==============================__==============================__====================
>
> SIP MESSAGE 2 1.2.3.5:5060(Sems) ->
> 1.2.3.4:5060(OpenSIPS)
> UDP Frame 2 10/Sep/13 15:05:19.7889
> TimeFromPreviousSipFrame=0.__0005 TimeFromStart=0.0005
> SIP/2.0 404 Not found
> Via: SIP/2.0/UDP
> 1.2.3.4:5060;branch=__z9hG4bKed0c.4bc9c54.0;__received=1.2.3.4
> To: sip:sems1.test.com
>
<http://sems1.test.com>;tag=__580A8BF1-522F190F000C097D-__74709700
> From:
> <sip:[email protected]
>
<mailto:sip%[email protected]>>__;tag=__65e8ffb57d58208c14c17804698c44__b4-4913
> CSeq: 10 OPTIONS
> Call-ID: [email protected]
> <mailto:[email protected]>
> Server: Sip Express Media Server
> Content-Length: 0
>
>
>
==============================__==============================__====================
>
> In the syslog I see the following error:
> ERROR: could not find any application matching configured
criteria
>
> In the sems.conf I set: application = $(apphdr)
>
> I think, that I don't have any possibility to set a SIP header.
>
> Has someone an idea to solve this issue?
>
> Regards,
> Julian
>
> _________________________________________________
> Sems mailing list
> [email protected]
> <mailto:[email protected]>
> http://lists.iptel.org/__mailman/listinfo/sems
> <http://lists.iptel.org/mailman/listinfo/sems>
>
>
>
>
>
> _______________________________________________
> Sems mailing list
> [email protected]
> http://lists.iptel.org/mailman/listinfo/sems
>
_______________________________________________
Sems mailing list
[email protected]
http://lists.iptel.org/mailman/listinfo/sems