Incoming FAX through sip provider


#1

Hi,
I am trying to setup one asterisk with voice over G729 and fax G711 using a local sip provider using direct rtp. My fax is connected in a ATA Linksys SPA 8000.
I have one issue regarding incoming fax calls, when my ATA is detecting the FAX tone:

SIP Provider invite(G729,G711)-> Asterisk invite (G729) ->ATA OK(G729) -> Asterisk
than the ATA detect the fax:
ATA Invite(G711) ->Asterisk ok(G711)->ATA

Asterisk is not sending the re-invite to G711 to the sip provider, and i do have now 2 leg one G729 and another one G711
ubuntu*CLI> sip show channels
Peer User/ANR Call ID Format Hold Last Message Expiry Peer
xx.xxx.xxx.xxx fax 565730a028feef8 0x8 (alaw) No Rx: ACK fax
x.xxx.xx.xx DDI 1896289320_1272 0x100 (g729) No Rx: ACK SIPProvider

And it look like asterisk is trying to trancoding between codec:
channel.c:5064 set_format: Unable to find a codec translation path from 0x8 (alaw) to 0x100 (g729)

My configurations are:
[SIPProvider]
canreinvite=yes
nat=no
type=peer
host=SIPProvider
dtmfmode=rfc2833
context=default
insecure=no
fromuser=DDI
allow=g729
allow=alaw

[fax]
nat=no
type=peer
username=fax
secret=6507
host=dynamic
canreinvite=yes

Can Asterisk send a re-invite to another codec the sip provider when receiving it from the ATA ? Alternatively, is it possible to have several incoming dialpeers in Asterisk from the same provider where I can set one for voice (allow=g729), and others for fax ddi’s (allow=alaw) ?

Thanks
Eduardo


#2

You may set SIP_CODEC=alaw prior to the dial-command. But this implies, that Asterisk detects the fax before dialing out to the ATA.
Several incoming dialpeers could be configured but will not be useful as asterisk chooses only the last declared in sip.conf when more than one peer comes in from the same IP-address.


#3

Hi,
Thanks for your reply. I will try this.
Eduardo