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

irroot reviewboard at asterisk.org
Wed Mar 9 09:41:47 CST 2011


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


Using a slightly hacked chan_local [removed queryoption] so disabling T.38 i called from a HP 4in1 via a linksys 2102 into recievefax [T.30]

the faxdetect application bellow is a simple faxdetect/T.38 negotiate app i knocked together to set chan variables and report T.38 switch over.
i have moved this functionality into chan_sip and will test it more extensively [T38switchover] option.

using FAXOPT i enabled T.38 gateway so ill be in the middle on answer when a T.38 request is sent and managed via the core asterisk bridge by
res_fax see the "Running Gateway" message bellow.

at this point 2 frame hooks are attached to the channels one each for read packets with the channel fax datastore as data and a T.30 generator is attached to the T.30 channel to keep timing and sync.

control is handled by the asterisk core bridge and frame hook API.

all packets from the channels are processed in the fax driver [res_fax_spandsp] ignoring any further T.38 negotiations and returning null packets

there is no longer a "T38Gateway" app and there is no longer any hi-jacking of the core bridge loop.

There should be no difference on who is the initiator or who is caller/callee all cases are handled the same.


    -- Executing [0803 at faxtest:1] FaxDetect("SIP/0819-00000002", "5") in new stack
    -- Executing [0803 at faxtest:2] Set("SIP/0819-00000002", "FAXOPT(t38gateway)=yes") in new stack
    -- Executing [0803 at faxtest:3] NoOp("SIP/0819-00000002", "FAXTONE NONE") in new stack
    -- Executing [0803 at faxtest:4] NoOp("SIP/0819-00000002", "T38STATUS 1") in new stack
    -- Executing [0803 at faxtest:5] Dial("SIP/0819-00000002", "Local/0803 at fax") in new stack
    -- Executing [0803 at fax:1] Answer("Local/0803 at fax-1bbb;2", "") in new stack
    -- Called 0803 at fax
    -- Local/0803 at fax-1bbb;1 answered SIP/0819-00000002
    -- Running Gateway activestate=4 (SIP/0819-00000002) and inactivestate=0 (Local/0803 at fax-1bbb;1)
    -- Executing [0803 at fax:2] StopPlayTones("Local/0803 at fax-1bbb;2", "") in new stack

.......
.......

    -- Executing [0803 at faxmail:1] Macro("Local/0803 at fax-1bbb;2", "faxreceive,0803") in new stack

.......
.......

    -- Executing [s at macro-faxreceive:13] ReceiveFAX("Local/0803 at fax-1bbb;2", "/var/spool/asterisk/fax/0803-1299683991.8.tif,debug") in new stack
    -- Channel 'Local/0803 at fax-1bbb;2' receiving FAX '/var/spool/asterisk/fax/0803-1299683991.8.tif'
    -- Connection Statistics
	Bit Rate :14400
	ECM : No
	Pages : 18

- irroot


On 2011-03-05 09:14:13, irroot wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviewboard.asterisk.org/r/1116/
> -----------------------------------------------------------
> 
> (Updated 2011-03-05 09:14:13)
> 
> 
> 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/channels/chan_sip.c 309340 
>   /trunk/channels/sip/include/sip.h 309340 
>   /trunk/configs/sip.conf.sample 309340 
>   /trunk/include/asterisk/channel.h 309340 
>   /trunk/include/asterisk/res_fax.h 309340 
>   /trunk/main/channel.c 309340 
>   /trunk/res/res_fax.c 309340 
>   /trunk/res/res_fax_spandsp.c 309340 
> 
> 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/20110309/e79f50d0/attachment.htm>


More information about the asterisk-dev mailing list