[asterisk-users] ReceiveFAX G.711 + Realtime

Cyprus VoIP voipcy at gmail.com
Tue Dec 29 08:32:47 CST 2009


> I have no idea where you got the idea that such a thing is possible...
> it's not. sip.conf settings for SIP endpoints are not channel variables,
> and cannot be modified from the dialplan unless the CHANNEL() dialplan
> function has been specifically extended to support them.
I was actually HOPING that it was possible, while guessing it probably 
isn't ;-), at least not like I did it.

> If you don't
> want T.38 support for a SIP endpoint, don't configure it that way in
> sip.conf or in your Realtime SIP peers table.
I want this "endpoint" to support T.38, but what I actually want is to 
check the initial INVITE's SDP and based on the IP address of the media, 
make a dialplan rule to decide whether to use G.711 or to switch to 
T.38. So, I found the CHANNEL() variables "rtpdest" and "t38passthrough".

This is the dialplan real-time script I ran:
"id","context","exten","priority","app","appdata"
80,"fax","aLaw",1,"NoOp","${CHANNEL(t38passthrough)}"
81,"fax","aLaw",2,"NoOp","${CHANNEL(rtpdest)}"
82,"fax","aLaw",3,"Set","CHANNEL(t38passthrough)=0"
83,"fax","aLaw",4,"GotoIf","$[${CHANNEL(rtpdest)}=xx.xxx.xxx.xxx]?5:T38,1"
76,"fax","aLaw",5,"Set","SIP_CODEC=aLaw"
77,"fax","aLaw",6,"Answer",""
78,"fax","aLaw",7,"ReceiveFAX","${fax_filepath}/${UNIQUEID}.tif"
79,"fax","aLaw",8,"Hangup",""

The result was:
     -- Executing NoOp("SIP/Proxy-00000005", "0")
     -- Executing NoOp("SIP/Proxy-00000005", "xx.xxx.xxx.xxx:60100")
     -- Executing Set("SIP/Proxy-00000005", "CHANNEL(t38passthrough)=0")
[2009-12-29 16:20:19.772] WARNING[5888]: func_channel.c:161 
func_channel_write: Unknown or unavailable item requested: 't38passthrough'
     -- Executing GotoIf("SIP/Proxy-00000005", "0?5:T38,1")
     -- Goto (fax,T38,1)

Now, referring to the error above, I see (in voip-info.org) that 
t38passthrough is an R/O variable and not an R/W, but in any case, I got 
0 as a result, so it should have been OK, and it's not, as ReceiveFAX 
still sends a T.38 reINVITE. If I can't modify it, what should I do?

Also, since the rtpdest includes also the port, how do I check in the 
GotoIf if the value "contains" that IP and not equal to it (which it 
can't be)? It seems that this will always return 0:
$[${CHANNEL(rtpdest)}=xx.xxx.xxx.xxx]

Thanks.



More information about the asterisk-users mailing list