[asterisk-dev] [Code Review] Fax Gateway Implementation T30<->T38

irroot reviewboard at asterisk.org
Tue Mar 15 02:23:26 CDT 2011


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviewboard.asterisk.org/r/1116/#review3248
-----------------------------------------------------------



I was asked how to use this patch here is a DP example im using for testing ill be pushing some tweaks latter im happy with the way it is working now.the problems i was having turned out to be a format management issue in chan_local im now focusing on the switchover API hook
i dont want any code for switchover in channel.c it must be in the channel drivers i have put a patch for T38SWITCHOVER option in sip that needs some work.

There is now no dedicated app for T38Gateway and there is no hijacking of the core bridge loop.
the gateway hooks into the core loop and replaces T.38 negotiation only if set using FAXOPT this is done entirely inside res_fax.


[faxtest]
;This can be set as a default in res_fax.conf 
exten => _X.,1,SET(FAXOPT(t38gateway)=yes)
;Dial into local T.30 for testing i have removed T38 support from local for this [no queryoption] can use the F option in trunk
exten => _X.,n(out),Dial(Local/${EXTEN}@faxin)
exten => _X.,n,Hangup

[faxin]
exten => _X.,1,Answer()
exten => _X.,n,Wait(3)
exten => _X.,n,ReceiveFAX(/var/spool/asterisk/fax/${CDR(linkedid)}.tiff)

  == Using UDPTL CoS mark 5
  == Using SIP RTP CoS mark 5
    -- Executing [0803 at faxtest:1] Set("SIP/0819-0000000b", "FAXOPT(t38gateway)=yes") in new stack
    -- Executing [0803 at faxtest:2] Dial("SIP/0819-0000000b", "Local/0803 at faxin") in new stack
    -- Executing [0803 at faxin:1] Answer("Local/0803 at faxin-1d58;2", "") in new stack
    -- Called 0803 at faxin
    -- Local/0803 at faxin-1d58;1 answered SIP/0819-0000000b
    -- Executing [0803 at faxin:2] Wait("Local/0803 at faxin-1d58;2", "3") in new stack

*****
We have changed to ALAW from G.729 the patch in chan_local will wake up and fix this we cannot use narrowband here
*****
[Mar 15 09:09:44] NOTICE[27453]: channel.c:4071 __ast_read: Dropping incompatible voice frame on Local/0803 at faxin-1d58;2 of format g729 since our native format has changed to 0x8 (alaw)

    -- Running Gateway activestate=4 (SIP/0819-0000000b) and inactivestate=0 (Local/0803 at faxin-1d58;1)
[Mar 15 09:09:44] NOTICE[27452]: udptl.c:1076 ast_udptl_write: (SIP/0819): UDPTL Transmission error to 192.168.150.155:16428: Operation not permitted
    -- Executing [0803 at faxin:3] ReceiveFAX("Local/0803 at faxin-1d58;2", "/var/spool/asterisk/fax/1300172981.17.tiff") in new stack
    -- Channel 'Local/0803 at faxin-1d58;2' receiving FAX '/var/spool/asterisk/fax/1300172981.17.tiff'
  == Spawn extension (faxtest, 0803, 2) exited non-zero on 'SIP/0819-0000000b'
    -- Connection Statistics
	Bit Rate :14400
	ECM : No
	Pages : 1

- irroot


On 2011-03-09 10:26:09, irroot wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviewboard.asterisk.org/r/1116/
> -----------------------------------------------------------
> 
> (Updated 2011-03-09 10:26:09)
> 
> 
> Review request for Asterisk Developers, Russell Bryant, dimas, Leif Madsen, and dafe_von_cetin.
> 
> 
> Summary
> -------
> 
> Hi there the patch that was going around circa 2008 to implement this in 1.4/1.6 app_fax has been moved to trunk [1.10]
> ive made some cleanups and moved it into res_fax res_fax_spandsp this is the framework and not production code
> unfortunately i have no means of testing it at the moment and require help.
> 
> i have cleaned the code up substantially it is related to R459
> 
> hope this is found useful and aids in the goal to get it in 1.10.
> 
> Adds application FaxGateway / FaxDetect
> Adds alternate bridge to Dial with new option.
> 
> 
> This addresses bug 13405.
>     https://issues.asterisk.org/view.php?id=13405
> 
> 
> Diffs
> -----
> 
>   /trunk/apps/app_faxdetect.c PRE-CREATION 
>   /trunk/channels/chan_sip.c 310135 
>   /trunk/channels/sip/include/sip.h 310135 
>   /trunk/configs/res_fax.conf.sample 310135 
>   /trunk/configs/sip.conf.sample 310135 
>   /trunk/include/asterisk/channel.h 310135 
>   /trunk/include/asterisk/res_fax.h 310135 
>   /trunk/main/channel.c 310135 
>   /trunk/res/res_fax.c 310135 
>   /trunk/res/res_fax_spandsp.c 310135 
> 
> Diff: https://reviewboard.asterisk.org/r/1116/diff
> 
> 
> Testing
> -------
> 
> 
> Thanks,
> 
> irroot
> 
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-dev/attachments/20110315/2a8551ff/attachment-0001.htm>


More information about the asterisk-dev mailing list