Callweaver T.38 patch for patton interoperability

If you have problem making CallWeaver fax to works with T.38 using a Patton Gateway (the Pattaon hangup the call) then try to apply this patch.

Basically it handles a 488 SIP Message sending back an ACK to the Patton so it reinvites in audio avoiding hangup by the call.

 

Index: channels/chan_sip.c
===========================================
--- channels/chan_sip.c (revision 5389)
+++ channels/chan_sip.c (working copy)
@@ -13365,6 +13365,23 @@
update_call_counter(p, DEC_CALL_LIMIT);
//#endif
break;
+ case 488: /* Not acceptable here */
+ if (p->t38state == SIP_T38_OFFER_SENT_REINVITE)
+ {
+ cw_log(LOG_WARNING, "Received SIP 488 on t38 reInvite !n");
+ transmit_request(p, SIP_ACK, seqno, 0, 0);
+ /* deactive udptl */
+ cw_udptl_set_active(p->udptl, 0);
+ p->udptl_active = 0;
+ cw_udptl_destroy(p->udptl);
+ p->udptl = NULL;
+
+ cw_rtp_set_active(p->rtp, 1);
+ p->t38state = SIP_T38_OFFER_REJECTED;
+ cw_channel_set_t38_status(p->owner, T38_OFFER_REJECTED);
+ transmit_reinvite_with_sdp(p);
+ }
+ break;
case 491: /* Pending */
/* we have to wait a while, then retransmit */
/* Transmission is rescheduled, so everything should be taken care of.
@@ -13762,6 +13779,10 @@
if (sipmethod == SIP_INVITE)
handle_response_invite(p, resp, rest, req, ignore, seqno);
break;
+ case 488:
+ if (sipmethod == SIP_INVITE)
+ handle_response_invite(p, resp, rest, req, ignore, seqno);
+ break;
case 491: /* Pending */
if (sipmethod == SIP_INVITE)
handle_response_invite(p, resp, rest, req, ignore, seqno);

This patch has been already submitted to the Callweaver project.

Callweaver T.38 patch for patton interoperability, 4.0 out of 5 based on 2 ratings
GD Star Rating
loading...