[Asterisk-Users] TDM-400 and dialplan -- how to ring a SIP extension *before* answering the PSTN line?

Rich Adamson radamson at routers.com
Mon Jun 12 11:44:18 MST 2006


Stephen Bosch wrote:
> Hi, folks:
> 
> Okay, so here's an idea.
> 
> I have a TDM-400 card with an FXO card in it connected to the PSTN and a
> Polycom IP 501 phone.
> 
> Observe the following simple dialplan for illustration:
> 
>> [incoming]
>> ; incoming calls from the FXO port are directed to this context from zapata.conf
>>
>> exten => s,1,Answer()
>> exten => s,2,Dial(SIP/polycom)
> 
> And zapata.conf:
> 
>> [trunkgroups]
>> ; define any trunk groups
>>
>> [channels]
>> ; hardware channels
>> ; default
>> usecallerid=yes
>> hidecallerid=no
>> callwaiting=no
>> threewaycalling=yes
>> transfer=yes
>> echocancel=yes
>> echotraining=yes
>> callprogress=yes
>>
>> ; define channels
>> context=incoming
>> signalling=fxs_ks
>> channel => 4
> 
> Pretty straightforward stuff -- a call comes in on the PSTN line, the
> Asterisk answers the call, then rings the extension. The caller hears a
> ring tone throughout the entire process.
> 
> The rub is that Asterisk has, in reality, taken the PSTN line off hook.
> Not great if the caller is at a payphone. What if nobody answers the
> extension? The caller is out his money (50 cents in most of the US, 35
> cents in Alberta and 25 cents in the rest of Canada ;) )
> 
> So I had the idea of doing things a bit differently, like so:
> 
>> [incoming]
>> ; incoming calls from the FXO port are directed to this context from zapata.conf
>>
>> exten => s,1,Dial(SIP/polycom)
>> exten => s,2,Answer()
> 
> This way, Asterisk dials the extension first, the idea being that when
> the SIP extension is answered, Asterisk answers the PSTN line and
> connects the channels.
> 
> This did not have the expected result -- when I tried this, my SIP
> extension rang, but answering the extension did not result in Asterisk
> picking up the PSTN line.
> 
> There is a way of doing this, isn't there? How can I make this work?

There is no need to include the "answer" in your dialplan. Without it, 
the call is processed by ringing the sip phone, and when that person 
answsers, an implied answer will occur back through the pstn.




More information about the asterisk-users mailing list