[Sofia-sip-devel] "Alert-Info: Auto Answer" is rejected with 400-Bad Alert-Info header
Hello all, Our SIP-client is connected to a certain PBX (Sphericall) and is being manipulated via 3PCC (via PBX). We've enabled to retrieve 'alert-info' at our application via sip_update_default_mclass(sip_extend_mclass(NULL)). Now next is happening: When a call is made from client 1 to client 2 (makeCall-command), client 1 receives an INVITE containing "Alert-Info: Auto Answer" field in order to answer this call. Sofia immediately rejects this INVITE with a "400-Bad Alert-info Header" response. At application level no callback is fired, so we're completely unaware of this call. On another PBX (which uses "talk" in the alert-info for auto-answer) our SIP-client works fine as expected. I've asked the PBX-guys if it is possible to change the "Auto Answer" string into something else, but I doubt this is possible. Therefore my question here: What do I have to adapt to make "Auto Answer" a valid value for Alert-Info? Seems that the parser rejects this because of the space in between. I've tried to follow it with a debugger, but at this level it is hard to follow. With regards, Eize -- Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day trial. Simplify your report design, integration and deployment - and focus on what you do best, core application coding. Discover what's new with Crystal Reports now. http://p.sf.net/sfu/bobj-july___ Sofia-sip-devel mailing list Sofia-sip-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/sofia-sip-devel
Re: [Sofia-sip-devel] "Alert-Info: Auto Answer" is rejected with 400-Bad Alert-Info header
The most common way we have seen this done in devices is: in invite request params: intercom=true in a Call-Info header for the form: ;answer-after=0 I know both of these work fine with sofia-sip. Can the client support either of these methods? Also, I have not seen this error before, can you check current darcs head to confirm if its still there? Mike On Aug 19, 2009, at 4:26 AM, EiSl 1972 wrote: > Hello all, > > Our SIP-client is connected to a certain PBX (Sphericall) and is > being manipulated via 3PCC (via PBX). > We've enabled to retrieve 'alert-info' at our application via > sip_update_default_mclass(sip_extend_mclass(NULL)). > > Now next is happening: > When a call is made from client 1 to client 2 (makeCall-command), > client 1 receives an INVITE containing "Alert-Info: Auto Answer" > field in order to answer this call. Sofia immediately rejects this > INVITE with a "400-Bad Alert-info Header" response. At application > level no callback is fired, so we're completely unaware of this call. > On another PBX (which uses "talk" in the alert-info for auto-answer) > our SIP-client works fine as expected. > > I've asked the PBX-guys if it is possible to change the "Auto > Answer" string into something else, but I doubt this is possible. > Therefore my question here: > > What do I have to adapt to make "Auto Answer" a valid value for > Alert-Info? Seems that the parser rejects this because of the space > in between. I've tried to follow it with a debugger, but at this > level it is hard to follow. > > > With regards, > > Eize > > -- > Let Crystal Reports handle the reporting - Free Crystal Reports 2008 > 30-Day > trial. Simplify your report design, integration and deployment - and > focus on > what you do best, core application coding. Discover what's new with > Crystal Reports now. > http://p.sf.net/sfu/bobj-july___ > Sofia-sip-devel mailing list > Sofia-sip-devel@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/sofia-sip-devel -- Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day trial. Simplify your report design, integration and deployment - and focus on what you do best, core application coding. Discover what's new with Crystal Reports now. http://p.sf.net/sfu/bobj-july ___ Sofia-sip-devel mailing list Sofia-sip-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/sofia-sip-devel
Re: [Sofia-sip-devel] "Alert-Info: Auto Answer" is rejected with 400-Bad Alert-Info header
Mike, We're not making outbound calls ourself. All calls are initiated via CTI by giving the PBX the makeCall(A,B) command. The PBX then fires INVITE for party A and on answer party B will be called on which at the end a reINVITE is done to connect A+B. (those parties are the clients on top of Sofia). I cannot make the PBX using "intercom"; the "answer-after" however is supported by PBX but not by the CTI-application (because it gets different CTI events then... sigh..). So I'm stuck (for now) by using "Alert-Info: Auto Answer". I will perform a check on HEAD-code, but this cannot be done on short term. We're currently ussing 0.12.10 version. However I maybe do thing why this bahavior occurs. The alert-Info is "Auto Answer", but without quotes. The SIP-message parser does see this as two different tokens. This is probably not allowed at that moment and it should be put between brackets. Since I've no time to figure out how the message parsing is build up and I don't want to break other things, I've added a ugly (personal) patch in the specific xx_alert_info_xx code (in sip_extra.c) doing a strcmp of "Auto Answer" before it enters the parser. If true it changes it to "Auto-Answer" (replace the space). Doing so the message is now successfully parsed and the application gets the invite and can extract this info. Everybody happy :) Thx for reply actually, Eize On Wed, Aug 19, 2009 at 7:16 PM, Michael Jerris wrote: > The most common way we have seen this done in devices is: > > in invite request params: intercom=true > > in a Call-Info header for the form: ;answer-after=0 > > I know both of these work fine with sofia-sip. Can the client support > either of these methods? > > Also, I have not seen this error before, can you check current darcs head > to confirm if its still there? > > Mike > > > On Aug 19, 2009, at 4:26 AM, EiSl 1972 wrote: > > Hello all, >> >> Our SIP-client is connected to a certain PBX (Sphericall) and is being >> manipulated via 3PCC (via PBX). >> We've enabled to retrieve 'alert-info' at our application via >> sip_update_default_mclass(sip_extend_mclass(NULL)). >> >> Now next is happening: >> When a call is made from client 1 to client 2 (makeCall-command), client 1 >> receives an INVITE containing "Alert-Info: Auto Answer" field in order to >> answer this call. Sofia immediately rejects this INVITE with a "400-Bad >> Alert-info Header" response. At application level no callback is fired, so >> we're completely unaware of this call. >> On another PBX (which uses "talk" in the alert-info for auto-answer) our >> SIP-client works fine as expected. >> >> I've asked the PBX-guys if it is possible to change the "Auto Answer" >> string into something else, but I doubt this is possible. Therefore my >> question here: >> >> What do I have to adapt to make "Auto Answer" a valid value for >> Alert-Info? Seems that the parser rejects this because of the space in >> between. I've tried to follow it with a debugger, but at this level it is >> hard to follow. >> >> >> With regards, >> >> Eize >> >> >> -- >> Let Crystal Reports handle the reporting - Free Crystal Reports 2008 >> 30-Day >> trial. Simplify your report design, integration and deployment - and focus >> on >> what you do best, core application coding. Discover what's new with >> Crystal Reports now. >> http://p.sf.net/sfu/bobj-july___ >> Sofia-sip-devel mailing list >> Sofia-sip-devel@lists.sourceforge.net >> https://lists.sourceforge.net/lists/listinfo/sofia-sip-devel >> > > -- Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day trial. Simplify your report design, integration and deployment - and focus on what you do best, core application coding. Discover what's new with Crystal Reports now. http://p.sf.net/sfu/bobj-july___ Sofia-sip-devel mailing list Sofia-sip-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/sofia-sip-devel