[asterisk-users] Asterisk / FreePBX Anlaog Fax behind audiocodes MP112

2018-12-14 Thread basti
Hello,

At the moment we have a Swyx phone server.
We would like to switch to a free asterisk PBX.

All phone extensions work as expected except the fax.
This is a analog Fax behind a Audiocode MP-112 FXS.

I have create a extension for the MP112.
The MP112 can register to asterisk.
When I send a Fax to this number I hear a "Modem sound" but no fax is
printing.


/etc/asterisk/extensions_additional.conf

exten => 518454,1,Set(__DIRECTION=INBOUND)
exten => 518454,n,Gosub(sub-record-check,s,1(in,${EXTEN},dontcare))
exten => 518454,n,Set(CHANNEL(tonezone)=de)
exten => 518454,n,Set(__FROM_DID=${EXTEN})
exten => 518454,n(did),Set(CDR(did)=${FROM_DID})
exten => 518454,n(callerid),ExecIf($[ "${CALLERID(name)}" = "" ]
?Set(CALLERID(name)=${CALLERID(num)}))
exten => 518454,n,Set(__MOHCLASS=)
exten => 518454,n,Set(__REVERSAL_REJECT=FALSE)
exten =>
518454,n,GotoIf($["${REVERSAL_REJECT}"!="TRUE"]?post-reverse-charge)
exten =>
518454,n,GotoIf($["${CHANNEL(reversecharge)}"="1"]?macro-hangupcall)
exten => 518454,n(post-reverse-charge),Noop()
exten => 518454,n,Set(__CALLINGNAMEPRES_SV=${CALLERID(name-pres)})
exten => 518454,n,Set(__CALLINGNUMPRES_SV=${CALLERID(num-pres)})
exten => 518454,n,Set(CALLERID(name-pres)=allowed_not_screened)
exten => 518454,n,Set(CALLERID(num-pres)=allowed_not_screened)
exten => 518454,n(did-cid-hook),Noop(CallerID Entry Point)
exten => 518454,n(dest-ext),Goto(ext-fax,84,1)


/etc/asterisk/extensions_additional.conf

[ext-fax]
include => ext-fax-custom
exten => 84,1,Set(FAX_FOR=Fax_Analog (84))
exten => 84,n,Noop(Receiving Fax for: ${FAX_FOR}, From: ${CALLERID(all)})
exten => 84,n,Set(FAX_RX_USER=84)
exten => 84,n,Set(FAX_RX_EMAIL_LEN=30)
exten => 84,n(receivefax),Goto(s,receivefax)

exten => s,1,Macro(user-callerid,)
exten => s,n,Noop(Receiving Fax for: ${FAX_FOR} , From: ${CALLERID(all)})
exten => s,n(receivefax),StopPlaytones
exten => s,n,ReceiveFAX(${ASTSPOOLDIR}/fax/${UNIQUEID}.tif,f)
exten => s,n,ExecIf($["${FAXSTATUS:0:6}"="FAILED" &&
"${FAXERROR}"!="INIT_ERROR"]?Set(FAXSTATUS="FAILED: error: ${FAXERROR}
statusstr: ${FAXOPT(statusstr)}"))
exten => s,n,Hangup

exten => h,1,GotoIf($[${STAT(e,${ASTSPOOLDIR}/fax/${UNIQUEID}.tif)} =
0]?failed)
exten => h,n(delete_opt),Set(DELETE_AFTER_SEND=true)
exten => h,n(process),GotoIf($[ "${FAX_RX_EMAIL_LEN}" = "0" |
"${FAX_RX_EMAIL_LEN}" = "" ]?noemail)
exten => h,n(sendfax),System(${AMPBIN}/fax2mail.php --remotestationid
"${FAXOPT(remotestationid)}" --user "${FAX_RX_USER}" --dest
"${FROM_DID}" --callerid "${BASE64_ENCODE(${CALLERID(all)})}" --file
${ASTSPOOLDIR}/fax/${UNIQUEID}.tif --delete "${DELETE_AFTER_SEND}")
exten => h,n(end),Macro(hangupcall,)
exten => h,n(noemail),Noop(ERROR: No Email Address to send FAX: status:
[${FAXSTATUS}],  From: [${CALLERID(all)}], trying system fax destination)
exten => h,n,GotoIf($[ "${FAX_RX_EMAIL}" = "" ]?delfax)
exten => h,n,System(${AMPBIN}/fax2mail.php --remotestationid
"${FAXOPT(remotestationid)}" --sendto "${FAX_RX_EMAIL}" --dest
"${FROM_DID}" --callerid "${BASE64_ENCODE(${CALLERID(all)})}" --file
${ASTSPOOLDIR}/fax/${UNIQUEID}.tif --delete "${DELETE_AFTER_SEND}")
exten => h,n,Macro(hangupcall,)
exten => h,n(delfax),System(${AMPBIN}/fax2mail.php --file
${ASTSPOOLDIR}/fax/${UNIQUEID}.tif --delete "${DELETE_AFTER_SEND}")
exten => h,n,Macro(hangupcall,)
exten => h,process+101(failed),Noop(FAX ${FAXSTATUS} for: ${FAX_FOR} ,
From: ${CALLERID(all)})
exten => h,n,Macro(hangupcall,)

;--== end of [ext-fax] ==--;


Why it does fax to2mail?
has someone a fax behind a audiocodes mp and would like to share the config?

best regards

-- 
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

Check out the new Asterisk community forum at: https://community.asterisk.org/

New to Asterisk? Start here:
  https://wiki.asterisk.org/wiki/display/AST/Getting+Started

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users

Re: [asterisk-users] Outbound call: caller gets no ringback on session progress

2018-12-14 Thread Michael Maier
On 12.12.18 at 19:43 Joshua C. Colp wrote:
> On Wed, Dec 12, 2018, at 12:31 PM, Michael Maier wrote:
> 
> 
> 
>>
>> The problem: The extension doesn't create a ringback locally, because 
>> it most probably expects it to
>> be sent by the callee - but the callee doesn't send anything (not 
>> surprising, because there has been
>> no SDP).
>>
>> Or should Asterisk create the ringback (Asterisk doesn't send any RTP 
>> package)? Or should the phone
>> create the ringback itself because there is a 180 Ringing (even if it 
>> contains SDP)?
>>
>> I'm wondering: Why does Asterisk create a 183 to the extension 
>> containing SDP if the callee didn't
>> provide any SDP?
>>
>>
>> So many questions ... . Could somebody please shine some light on it? 
>> What's going wrong here?
> 
> The core doesn't communicate whether progress includes media or not, so the 
> PJSIP channel driver (and even chan_sip) assumes media is there. What should 
> happen in chan_pjsip is that it would send inband ringing and not a 180 
> Ringing with SDP, but that is not currently implemented and I don't think 
> this particularly interaction has come up before to cause it to be 
> implemented. I'd therefore suggest raising an issue[1] with the SIP trace.

https://issues.asterisk.org/jira/browse/ASTERISK-28208


Thanks,
Michael

-- 
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

Check out the new Asterisk community forum at: https://community.asterisk.org/

New to Asterisk? Start here:
  https://wiki.asterisk.org/wiki/display/AST/Getting+Started

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users