[OpenSIPS-Users] T.38 detection/redirect in OpenSIPS

Matthew S. Crocker matthew at corp.crocker.com
Wed Mar 17 18:15:25 CET 2010


What if we don't worry about the 2nd INVITE (switch to T.38) coming from the gateway.  Pass the INVITE on to the UA phone and then catch the (415, 488 ??) error coming back.   We could handle Faxing like we handle Call Forward Busy (486 error handler). Then we could have user_preferences for CFBZ (486 Busy), CFNA (200 timeout), CFOOS (180 timeout), CFT38 (488 Not Acceptable Here) and re-write the URI to go to the Asterisk Fax gateway.


The SIP flow would be something like:

PSTN -> PROXY  INVITE  (SDP/G711)
PROXY -> PSTN  180 Trying
PROXY -> UA INVITE (SDP/G711)
UA -> PROXY 180 Trying
UA -> PROXY 183 Ringing
PROXY -> PSTN  183 Ringing
UA -> PROXY 200 Ok (SDP/G711)
PROXY -> PSTN  200 Ok (SDP/G711)
** RTP Established between UA & PSTN  (mediaproxy/rtpproxy ??) **
** Gateway detects fax tone and attempts to REINVITE to T.38 **
PSTN -> PROXY INVITE (SDP/T38)
PROXY -> PSTN  180 Trying
PROXY -> UA  INVITE (SDP/T38)
UA -> PROXY  488 Not Acceptable Here
** PROXY Error route rewrite URI **
PROXY -> ASTERISK   INVITE (SDP/T38)
ASTERISK -> PROXY   180 Trying
ASTERISK -> PROXY   200 Ok (SDP/T38)
PROXY -> PSTN 200 Ok (SDP/T38)
** RTP established between PSTN & ASTERISK **
PROXY -> UA   BYE/CANCEL

Question:  Can you change RTP source/dest ip/port during a REINVITE?

-Matt

----- Original Message -----

> From: "Bogdan-Andrei Iancu" <bogdan at voice-system.ro>
> To: "OpenSIPS users mailling list" <users at lists.opensips.org>
> Sent: Wednesday, March 17, 2010 12:39:56 PM
> Subject: Re: [OpenSIPS-Users] T.38 detection/redirect in OpenSIPS
> 
> Hi Matthew,
> 
> you do not need to look into the media part, as you can "spot" the FAX
> 
> presence via the re-INVITE with T38 codec in SDP (you can detect it
> from 
> opensips cfg).
> 
> So, maybe using the b2b module for something like:
>     - allow the voice call to be setup via the b2b in a transparent
> way
>     - if the re-INVITE wth T38 is received from GW, b2b will close the
> 
> leg to the users UA and create a new leg to something able to handle
> the 
> fax - of course, the b2b will bridge the existing leg (towards PSTN)
> and 
> the new leg.
> 
> Regards,
> Bogdan
> 
> 
> Matthew S. Crocker wrote:
> > Can OpenSIPS make routing decisions based on the SDP information in
> an INVITE?
> >
> > Lets say I have the following config
> >
> > PSTN -> t.38 Gateway -> OpenSIPS ->  UserAgent
> >
> > I have a TN from the PSTN routed to the UserAgent,  I'd like to
> provide a service so the user can use the TN for both voice & faxing.
> >
> > Voice call goes through normally (g.711 g.729 codec)
> >
> > Fax call starts off as a normal voice call (INVITE, 180, 183, 200). 
> Once the call is answered the originating end (PSTN) starts sending
> fax tones. The Gateway hears the fax tones and attempts to RE-INVITE
> with T.38 in the SDP.  I'd like OpenSIPS to see the T.38 capability in
> the SDP and redirect the call to a fax->e-mail gateway.  So,  the 2nd
> INVITE comes in, OpenSIPS sends the INVITE to the fax gateway and a
> BYE to the user.  The fax gateway does a 200 and negotiates T.38 with
> the PSTN gateway.
> >
> > I know I can route the call through Asterisk and have it do a quiet
> answer and listen for the modem sounds.  I'd like to avoid using
> Asterisk for all RTP traffic and only use it for the fax gateway
> traffic (i.e. once it has been determined to be a fax Asterisk steps
> in and handled the T38 -> E-mail)
> >
> > -Matt
> >
> >   
> 
> 
> -- 
> Bogdan-Andrei Iancu
> www.voice-system.ro
> 
> 
> _______________________________________________
> Users mailing list
> Users at lists.opensips.org
> http://lists.opensips.org/cgi-bin/mailman/listinfo/users

-- 
Matthew S. Crocker
President
Crocker Communications, Inc.
PO BOX 710
Greenfield, MA 01302-0710
http://www.crocker.com
P: 413-746-2760




More information about the Users mailing list