2
0

0026_fax.xml 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255
  1. <!-- Refuse test cases requires FS-9855 to be resolved -->
  2. <!-- TEST01: Basic rx/tx fax test using T.30-->
  3. <!-- expand bgapi originate {absolute_codec_string=pcmu}sofia/external/9100@${local_ip_v4}:5080 9101 XML public -->
  4. <extension name="rxfax_txfax_test">
  5. <condition field="destination_number" expression="^9100$">
  6. <action application="set" data="fax_enable_image_resizing=true"/>
  7. <action application="set" data="fax_ident=rxfax_test_a"/>
  8. <action application="set" data="fax_header=rxfax_test_a_header"/>
  9. <action application="answer"/>
  10. <action application="rxfax" data="/tmp/${uuid}.tif"/>
  11. </condition>
  12. </extension>
  13. <extension name="txfax">
  14. <condition field="destination_number" expression="^9101$">
  15. <action application="set" data="fax_enable_image_resizing=true"/>
  16. <action application="set" data="fax_ident=txfax_test_b"/>
  17. <action application="set" data="fax_header=txfax_test_b_header"/>
  18. <action application="answer"/>
  19. <action application="txfax" data="/root/fax.tif"/>
  20. </condition>
  21. </extension>
  22. <!-- TEST02: Basic rx/tx fax test using t.38 -->
  23. <!-- expand bgapi originate {absolute_codec_string=pcmu}sofia/external/9102@${local_ip_v4}:5080 9103 XML public -->
  24. <extension name="rxfax_t38">
  25. <condition field="destination_number" expression="^9102$">
  26. <!-- Uncomment for glare testing -->
  27. <action application="set" data="fax_enable_t38_request=true"/>
  28. <action application="set" data="fax_enable_t38=true"/>
  29. <action application="answer"/>
  30. <action application="rxfax" data="/tmp/${uuid}.tif"/>
  31. </condition>
  32. </extension>
  33. <extension name="txfax_t38">
  34. <condition field="destination_number" expression="^9103$">
  35. <action application="set" data="fax_enable_image_resizing=true"/>
  36. <action application="set" data="fax_enable_t38=true"/>
  37. <action application="answer"/>
  38. <action application="txfax" data="/root/fax.tif"/>
  39. </condition>
  40. </extension>
  41. <!-- TEST03: rx/tx fax test using t.38 passthru (4-legs) -->
  42. <!-- expand bgapi originate {absolute_codec_string=PCMU}sofia/external/9104@${local_ip_v4}:5080 9105 XML public -->
  43. <extension name="rxfax_t38_a">
  44. <condition field="destination_number" expression="^9104$">
  45. <action application="set" data="fax_enable_image_resizing=true"/>
  46. <action application="set" data="fax_enable_t38_request=true"/>
  47. <action application="set" data="fax_enable_t38=true"/>
  48. <action application="answer"/>
  49. <action application="txfax" data="/root/fax.tif"/>
  50. </condition>
  51. </extension>
  52. <extension name="t38_passthru">
  53. <condition field="destination_number" expression="^9105$">
  54. <action application="export" data="t38_passthru=true"/>
  55. <action application="bridge" data="{absolute_codec_string=PCMU}sofia/external/sip:9106@${local_ip_v4}:5080"/>
  56. </condition>
  57. </extension>
  58. <extension name="txfax_t38_b">
  59. <condition field="destination_number" expression="^9106$">
  60. <action application="set" data="fax_enable_t38=true"/>
  61. <action application="answer"/>
  62. <action application="rxfax" data="/tmp/${uuid}.tif"/>
  63. </condition>
  64. </extension>
  65. <!-- TEST04: t.30 to t.38 transcoding using t38_gateway (4-legs) -->
  66. <!-- expand bgapi originate {absolute_codec_string=pcmu}sofia/external/9107@${local_ip_v4}:5080 9108 XML public -->
  67. <extension name="rxfax_t30_a">
  68. <condition field="destination_number" expression="^9107$">
  69. <action application="answer"/>
  70. <action application="rxfax" data="/tmp/${uuid}.tif"/>
  71. </condition>
  72. </extension>
  73. <extension name="t38_gateway">
  74. <condition field="destination_number" expression="^9108$">
  75. <action application="bridge" data="{sip_execute_on_image='t38_gateway self nocng',absolute_codec_string=PCMU}sofia/external/sip:9109@${local_ip_v4}:5080"/>
  76. </condition>
  77. </extension>
  78. <extension name="txfax_t38_b">
  79. <condition field="destination_number" expression="^9109$">
  80. <action application="set" data="fax_enable_t38_request=true"/>
  81. <action application="set" data="fax_enable_t38=true"/>
  82. <action application="answer"/>
  83. <action application="txfax" data="/root/fax.tif"/>
  84. </condition>
  85. </extension>
  86. <!-- TEST05: t.38 to t.30, t.30 middle bridge refuses the t.38 reinvite fax should be successful (4-legs) -->
  87. <!-- expand bgapi originate {absolute_codec_string=PCMU}sofia/external/9117@${local_ip_v4}:5080 9118 XML public -->
  88. <extension name="txfax_t38_a">
  89. <condition field="destination_number" expression="^9117$">
  90. <action application="set" data="fax_enable_image_resizing=true"/>
  91. <action application="set" data="fax_enable_t38_request=true"/>
  92. <action application="set" data="fax_enable_t38=true"/>
  93. <action application="set" data="fax_verbose=true"/>
  94. <action application="answer"/>
  95. <action application="txfax" data="/root/fax.tif"/>
  96. </condition>
  97. </extension>
  98. <extension name="t38_gateway">
  99. <condition field="destination_number" expression="^9118$">
  100. <action application="bridge" data="{fax_enable_t38=false,refuse_t38=true,absolute_codec_string=PCMU,execute_on_answer='t38_gateway peer'}sofia/external/sip:9119@${local_ip_v4}:5080"/>
  101. </condition>
  102. </extension>
  103. <extension name="rxfax_t30_b_refuse">
  104. <condition field="destination_number" expression="^9119$">
  105. <action application="set" data="fax_verbose=true"/>
  106. <action application="set" data="fax_enable_t38_request=true"/>
  107. <action application="set" data="fax_enable_t38=true"/>
  108. <action application="answer"/>
  109. <action application="rxfax" data="/tmp/${uuid}.tif"/>
  110. </condition>
  111. </extension>
  112. <!-- TEST06: Refuse t.38 in both directions and keep the call using t.30 (4-legs) -->
  113. <!-- expand bgapi originate {absolute_codec_string=PCMU}sofia/external/9127@${local_ip_v4}:5080 9128 XML public -->
  114. <extension name="txfax_t38_refuse_a">
  115. <condition field="destination_number" expression="^9127$">
  116. <action application="set" data="fax_enable_image_resizing=true"/>
  117. <action application="set" data="fax_enable_t38_request=true"/>
  118. <action application="set" data="fax_enable_t38=true"/>
  119. <action application="set" data="fax_verbose=true"/>
  120. <action application="answer"/>
  121. <action application="txfax" data="/root/fax.tif"/>
  122. </condition>
  123. </extension>
  124. <extension name="t38_gateway">
  125. <condition field="destination_number" expression="^9128$">
  126. <action application="set" data="refuse_t38=true"/>
  127. <action application="bridge" data="{fax_enable_t38=false,refuse_t38=true,absolute_codec_string=PCMU}sofia/external/sip:9129@${local_ip_v4}:5080"/>
  128. </condition>
  129. </extension>
  130. <extension name="rxfax_t30_b_refuse">
  131. <condition field="destination_number" expression="^9129$">
  132. <action application="set" data="fax_enable_t38_request=true"/>
  133. <action application="set" data="fax_enable_t38=true"/>
  134. <action application="set" data="fax_verbose=true"/>
  135. <action application="answer"/>
  136. <action application="rxfax" data="/tmp/${uuid}.tif"/>
  137. </condition>
  138. </extension>
  139. <!-- TEST07: t.38 refuse on a, t.30 refuse on b, call stays t.30 (4-legs) -->
  140. <!-- expand bgapi originate {absolute_codec_string=PCMU}sofia/external/9137@${local_ip_v4}:5080 9138 XML public -->
  141. <extension name="txfax_t38_refuse_a">
  142. <condition field="destination_number" expression="^9137$">
  143. <action application="set" data="fax_enable_image_resizing=true"/>
  144. <action application="set" data="refuse_t38=true"/>
  145. <action application="answer"/>
  146. <action application="txfax" data="/root/fax.tif"/>
  147. </condition>
  148. </extension>
  149. <extension name="t30_bridge">
  150. <condition field="destination_number" expression="^9138$">
  151. <action application="set_name" data="txfax_t38_refuse_b"/>
  152. <action application="set" data="fax_enable_t38_request=true"/>
  153. <action application="set" data="fax_enable_t38=true"/>
  154. <action application="set" data="fax_verbose=true"/>
  155. <action application="bridge" data="{fax_enable_t38_request=true,fax_enable_t38=true,absolute_codec_string=PCMU}sofia/external/sip:9139@${local_ip_v4}:5080"/>
  156. </condition>
  157. </extension>
  158. <extension name="rxfax_t30_b_refuse">
  159. <condition field="destination_number" expression="^9139$">
  160. <action application="set_name" data="txfax_t38_refuse_d"/>
  161. <action application="set" data="refuse_t38=true"/>
  162. <action application="answer"/>
  163. <action application="rxfax" data="/tmp/${uuid}.tif"/>
  164. </condition>
  165. </extension>
  166. <!-- TEST08: t.38 via passthru with refuse, call stays t.30 (4-legs) -->
  167. <!-- expand bgapi originate {absolute_codec_string=PCMU}sofia/external/9144@${local_ip_v4}:5080 9145 XML public -->
  168. <extension name="rxfax_t38_a">
  169. <condition field="destination_number" expression="^9144$">
  170. <action application="set" data="fax_enable_image_resizing=true"/>
  171. <action application="set" data="fax_enable_t38_request=true"/>
  172. <action application="set" data="fax_enable_t38=true"/>
  173. <action application="answer"/>
  174. <action application="txfax" data="/root/fax.tif"/>
  175. </condition>
  176. </extension>
  177. <extension name="t38_passthru">
  178. <condition field="destination_number" expression="^9145$">
  179. <action application="export" data="t38_passthru=true"/>
  180. <action application="bridge" data="{absolute_codec_string=PCMU}sofia/external/sip:9146@${local_ip_v4}:5080"/>
  181. </condition>
  182. </extension>
  183. <extension name="rxfax_t30_b_refuse">
  184. <condition field="destination_number" expression="^9146$">
  185. <action application="set" data="refuse_t38=true"/>
  186. <action application="answer"/>
  187. <action application="rxfax" data="/tmp/${uuid}.tif"/>
  188. </condition>
  189. </extension>
  190. <!-- TEST09: Colour faxing with t.38 passthru, t.38 end to end (4-legs) -->
  191. <!-- gs -q -sDEVICE=tiff24nc -r204x98 -dBATCH -dPDFFitPage -dNOPAUSE -sOutputFile=colour.tif colour.pdf -->
  192. <!-- expand bgapi originate {fax_enable_image_resizing=true,fax_enable_colour=true,absolute_codec_string=PCMU}sofia/external/9154@${local_ip_v4}:5080 9155 XML public -->
  193. <extension name="txfax_t38_a">
  194. <condition field="destination_number" expression="^9154$">
  195. <action application="set" data="fax_enable_image_resizing=true"/>
  196. <action application="set" data="fax_enable_colour=true"/>
  197. <action application="set" data="fax_enable_t38_request=true"/>
  198. <action application="set" data="fax_enable_t38=true"/>
  199. <action application="answer"/>
  200. <action application="txfax" data="/root/colour.tif"/>
  201. </condition>
  202. </extension>
  203. <extension name="t38_passthru">
  204. <condition field="destination_number" expression="^9155$">
  205. <action application="export" data="t38_passthru=true"/>
  206. <action application="bridge" data="{absolute_codec_string=PCMU}sofia/external/sip:9156@${local_ip_v4}:5080"/>
  207. </condition>
  208. </extension>
  209. <extension name="rxfax_t38_b">
  210. <condition field="destination_number" expression="^9156$">
  211. <action application="set" data="fax_enable_t38=true"/>
  212. <action application="set" data="fax_enable_colour=true"/>
  213. <action application="answer"/>
  214. <action application="rxfax" data="/tmp/colour-${uuid}.tif"/>
  215. </condition>
  216. </extension>
  217. <!-- TEST10: (FS-9943) Basic rx/tx fax test to validate the default handling without t38 enabled an falling back to t.30-->
  218. <!-- expand bgapi originate {absolute_codec_string=pcmu}sofia/external/9160@${local_ip_v4}:5080 9161 XML public -->
  219. <extension name="rxfax_txfax_test">
  220. <condition field="destination_number" expression="^9160$">
  221. <action application="answer"/>
  222. <action application="rxfax" data="/tmp/${uuid}.tif"/>
  223. </condition>
  224. </extension>
  225. <extension name="txfax">
  226. <condition field="destination_number" expression="^9161$">
  227. <action application="set" data="fax_enable_t38_request=true"/>
  228. <action application="set" data="fax_enable_t38=true"/>
  229. <action application="answer"/>
  230. <action application="txfax" data="/root/fax.tif"/>
  231. </condition>
  232. </extension>