[asterisk-users] Sangoma FXS dialmap

Doug Lytle support at drdos.info
Thu May 14 10:34:07 CDT 2009


cb wrote:
> On May 13, 2009, at 10:50 AM, Doug Lytle wrote:
>
>   
> I'm sorry to be really thick here, but where exactly would I place  
> these lines. This is probably due to my misunderstanding of the  
> sequence of things, so it may be obvious and I'm just not getting it.
>
>   

It would go in your extension.conf.  Within your dial macro/sub-routine.


> The above lines look like they belong in the extensions.conf, but I  
> thought that was only called once a phone sent the dial string to  
>   

SIP phones send a completed dial string, analog phones send 1 digit at a 
time.  With the timeout values, it no more digits are recieved by the 2 
second timeout, the dial plan continues.

> Where is the correct place to put those two commands so my analog  
> phones connected to the FXS ports will use them to decide when  
> dialing has completed.
>   
For example on my Fax2Email extension, if I get an invalid entry or a 
timeout, it will play congestion tones

[fax2email]

;**************
;* Set timeouts
;**************

exten => s,1,Set(TIMEOUT(response)=10)
exten => s,2,Set(TIMEOUT(digit)=5)

;*********************************************
;* Database look up against 4 digit extension **
;* assign email address from the match.  If   **
;* No match, produce busy signal             **
;**********************************************

exten => s,3,Answer()
exten => s,4,Wait(1)

exten => _[4-8]XXX,1,MYSQL(Connect connid someusr somepass '' fax2email)
exten => _[4-8]XXX,n,GosubIf($["${MYSQL_STATUS}" = "-1"]?mysql_failed,s,6)
exten => _[4-8]XXX,n,MYSQL(Query resultid ${connid} SELECT email FROM 
extension WHERE number = ${EXTEN})
exten => _[4-8]XXX,n,MYSQL(Fetch fetchid ${resultid} EMAILADDR)
exten => _[4-8]XXX,n,Set(CALLERID(name)=${EMAILADDR})
exten => _[4-8]XXX,n,MYSQL(Disconnect ${connid})
exten => _[4-8]XXX,n,MYSQL(Clear ${resultid})
exten => _[4-8]XXX,n,GotoIf($["${EMAILADDR}" = ""]?11:9)
exten => _[4-8]XXX,n,Macro(faxreceive,${EXTEN})
exten => _[4-8]XXX,n,Hangup()
exten => _[4-8]XXX,n,Congestion()
exten => _[4-8]XXX,n,Hangup()

exten => i,1,Congestion()
exten => t,1,Congestion()

Doug


-- 
 
Ben Franklin quote:

"Those who would give up Essential Liberty to purchase a little Temporary Safety, deserve neither Liberty nor Safety."




More information about the asterisk-users mailing list