<div dir="ltr"><div><div><div><div><div><div><div><div><div><div><div>Hello all,<br><br></div>I've been hitting a wall in getting T.38 fallback to G.711 to work in a specific case, and I was wondering if I could use kamailio to the rescue, since all my other endeavours have failed miserably.<br><br></div>In short, this is this the scenario where I need to have this manipulation happen:<br></div>- During an established dialog between a SIP endpoint and asterisk (with kamailio in the middle acting as proxy), the latter (asterisk) sends a re-INVITE with a single offer for m=image with T.38 in the SDP.<br></div>- The other (eccentric) endpoint (yes, it's a Cisco) replies with 200 OK, but will reject the T.38 offer in the SDP body instead by including a port number of '0'<br></div>- Instead of falling back to G.711 as configured, asterisk in that case will do nothing, and the dialog will eventually end with a BYE (don't remember which of the two endpoints will send that, but it doesn't matter much)<br><br></div>The thing here is that asterisk *WILL* fallback to G711 with a second re-INVITE, if the other endpoint replies to the first T.38 re-INVITE with a negative response (488) instead of a positive one (200) declining the media in the SDP body. I've looked at using freeswitch for a fax gateway instead, but apparently FS
doesn't support fallback at all even in the 488 reply case, much less in
the inactive media stream in 200 OK corner case I'm investigating.<br><br>So, I thought I'd do that in kamailio and convert those 200 OKs to 488s with change_reply_status() from the textopsx module. Of course, the universe hates me, and this will fail spectacularly:<br><br>> ERROR: textopsx [textopsx.c:301]: ki_change_reply_status(): the class of provisional or positive final replies cannot be changed<br><br></div>So you can't change a reply's "class" with change_reply_status(), only the response code within that class can be manipulated.<br><br>I guess my question is now whether there is any way to do this sort of transformation with kamailio, perhaps with some other function or method?<br><br></div>If anyone else has had to deal with this problem and come up with a different solution I'd be glad to hear it, as neither my head nor the surrounding walls can take any more mutual banging at this point. Thanks!<br><br></div>BR,<br></div>George.<br><br></div>P.S. I hate fax<br></div>