[asterisk-users] How to use Sipura SPA3k POTS line to
dial Asterisk SIP phones?
Larry Alkoff
labradley at mindspring.com
Sat Nov 18 14:18:57 MST 2006
Thanks very much for your sipurafxs1.
The problem has been that incoming POTS calls are swallowed up after the
first ring or so if the pstn line is connected to Sipura.
I'll try this and let you know.
Larry
Doug Crompton wrote:
> This is my spa3k fxs port sip.conf params. This uses the default context
> in my extensions.conf
>
> What are you having trouble doing? Can you make calls out to PSTN? Is it
> just incoming call that are not ringing?
>
> Doug
>
>
> [sipurafxs1]
> type=friend
> regexten=405
> username=sipurafxs1
> secret=xxxxxxxx
> context=default
> context=from-pstn
> callerid="Doug Crompton" <405>
> host=dynamic
> nat=no
> port=5061
> canreinvite=no
> disallow=all
> allow=alaw
> allow=ulaw^M
> allow=gsm
> allow=g723.1^M
> mailbox=405 at default
> dtmfmode=rfc2833
>
>
>
>
>
>
>
> On Sat, 18 Nov 2006, Larry Alkoff wrote:
>
>> Doug Crompton wrote:
>>
>> Doug, please forgive me but I'm still having trouble understanding two
>> points from your last response.
>>
>> Can you please post your extension 405 (analog extension on spa3k) in
>> sip.conf
>> and your [sipurafxs1] ?
>>
>> I finally understand that INRINGSDEV is meant to specify which analog
>> and SIP phones to ring at extension INRINGSEXT = 405 and would like to
>> see just how you do it.
>>
>>
>> Larry
>>
>>
>>> On Wed, 15 Nov 2006, Larry Alkoff wrote:
>>>
>>>> Thank you very much Doug for your detailed response to my question.
>>>> I'm working on a new sip.conf and extensions.conf using your code as a
>>>> guide.
>>>>
>>>>
>>>> Questions:
>>>> In INRINGSDEV what does sipurafxs1 and grandstream406 refer to?
>>>> The comment says "ring analog phones on spa3k fxs but grandstream406
>>>> seems to refer a Grandstream sip phone, not an analog one.
>>>>
>>>> Does INRINGSDEV mean ring a specific sip phone and the analog ones?
>>> INRINGSDEV is a list of the devices you want to ring when you use this
>>> variable in the dial statement. sipurafxs1 is the fxs side of the spa3k
>>> and I have one grandstream 200, at extension 406, named grandstream406.
>>> The analog extension, fxs on the spa3k, is 405.
>>>
>>>> How would I ring all the _sip_ phones when a pstn call comes in?
>>>> My macro 'ring-all' ?
>>>>
>>> You just add them all together in the ring statement with the & as in my
>>> INRINGSDEV variable. Actually the use of the variable was taken from
>>> sample code given to me when I started out. It is probably a good idea
>>> though. you could just put them all in the dial statement but if you use
>>> it in more than one place it is handy to just change it in one place and
>>> use the variable.
>>>
>>> SIP/sipurafxs1&SIP/grandstream406&third&fourth&.....
>>>
>>>
>>>> Notes:
>>>> Your sipurafxo1 is my spa3k-pstn-in defined in both Sipura and sip.conf.
>>>> My extension to ring incoming calls is 120 vs your 405. All ok on these
>>>> two.
>>>>
>>>> I'm nearly there thanks to you.
>>>>
>>> OK glad it helped. If you have any other questions let me know. The spa3k
>>> has a million settings.
>>>
>>>> Larry
>>>>
>>>>
>>>>
>>>> Doug Crompton wrote:
>>>>> Below is my config for spa3k fxo. I do not show the settings in the spa3k
>>>>> which must reflect settings here, port, username, secret, etc. I have
>>>>> DTMF set to inband here and in spa3k to fix a problem with DTMF not
>>>>> working for menus from PSTN. This was discussed earlier and is a problem
>>>>> in asterisk that may (or may not) be solved in 1.4. I am using earlier
>>>>> version. Inband must also be specifed in spa3k pstn.
>>>>>
>>>>> [sipurafxo1]
>>>>> type=peer
>>>>> username=sipurafxo1
>>>>> secret=xxxxxxxxx
>>>>> canreinvite=no
>>>>> context=from-pstn
>>>>> host=dynamic
>>>>> nat=no
>>>>> port=5061
>>>>> disallow=all
>>>>> allow=alaw
>>>>> allow=ulaw
>>>>> allow=gsm
>>>>> allow=g723.1
>>>>> dtmfmode=inband
>>>>>
>>>>>
>>>>> In extensions.conf. This is a little fancy but the bottom line is that it
>>>>> ends up in either a day or night mode. Only day shown. The spa3k fxo in
>>>>> sip calls the from-pstn but the pstn-day-time (below) could be relabeled
>>>>> from-pstn to always go to phones. The night mode basically goes to VM.
>>>>>
>>>>> INRINGSEXT and INRINGSDEV are just variables defined to -
>>>>>
>>>>> INRINGSDEV=SIP/sipurafxs1&SIP/grandstream406 ; ring analog phones on spa3k
>>>>> fxs
>>>>>
>>>>> INRINGSEXT=405 ; the extension to ring for incomming calls
>>>>>
>>>>> The stdexten macro is just the standard one in sample extension file.
>>>>>
>>>>>
>>>>> [from-pstn]
>>>>> exten => s,1,GotoIf($[ ${day-night} = 0 ]?2:10
>>>>> exten => s,2,GotoIfTime(9:30-23:59,*,*,*?pstn-day-time,s,1
>>>>> exten => s,3,GotoIfTime(0:00-09:29,*,*,*?night-time,s,1
>>>>>
>>>>> exten => s,10,GotoIf($[ ${day-night} = 1 ]?pstn-day-time,s,1
>>>>> exten => s,11,GotoIf($[ ${day-night} = 2 ]?night-time,s,1
>>>>>
>>>>>
>>>>> [pstn-day-time]
>>>>> exten => s,1,SetGlobalVar(RingTimeout=35)
>>>>> exten => s,2,NoOp("${CALLERID}")
>>>>> exten => s,3,Macro(stdexten,${INRINGSEXT},${INRINGSDEV},"")
>>>>>
>>>>>
>>>>> On Tue, 14 Nov 2006, Larry Alkoff wrote:
>>>>>
>>>>>> My SIP phones can dial out through Sipura SPA3k to POTS for local and
>>>>>> 911 calls _but_ incoming POTS calls are being swallowup somehow.
>>>>>>
>>>>>> Am I on the right track with the code snippit below?
>>>>>>
>>>>>> sip.conf:
>>>>>> ---------
>>>>>> In sip.conf the following code is _supposed_ to ring the SIP phones when
>>>>>> a POTS line call comes in through Sipuara to Asterisk.
>>>>>>
>>>>>> [spa3k-pstn-in] ; Pots-line-in from Sipura
>>>>>> ; If you're using Asterisk, this goes into the Incoming settings
>>>>>> ; For your Trunk
>>>>>> host=dynamic
>>>>>>
>>>>>> type=friend ; should be peer if incoming only ??
>>>>>>
>>>>>> context=[macro-ringall] ;ring all the sip phones
>>>>>>
>>>>>> secret=xxxxx
>>>>>> dtmfmode=rfc2833
>>>>>> disallow=all
>>>>>> allow=ulaw
>>>>>> insecure=very
>>>>>>
>>>>>>
>>>>>> extensions.conf
>>>>>> ----------------
>>>>>> context to ring all SIP phones when a POTS call comes into SPA3k:
>>>>>>
>>>>>> [macro-ringall] ; ring all SIP phones
>>>>>> exten => s,1,Dial(SIP/120&SIP/121&SIP/122&SIP/124&SIP/125&SIP/126&SIP/127)
>>>>>> exten => s,2,hangup
>>>>>>
>>>>>> --
>>>>>> Larry Alkoff N2LA - Austin TX
>>
>> --
>> Larry Alkoff N2LA - Austin TX
>> Using Thunderbird on Linux
>> _______________________________________________
>> --Bandwidth and Colocation provided by Easynews.com --
>>
>> asterisk-users mailing list
>> To UNSUBSCRIBE or update options visit:
>> http://lists.digium.com/mailman/listinfo/asterisk-users
>>
>
>
> "Those that sacrifice essential liberty to obtain a little temporary safety
> deserve neither liberty nor safety." -- Ben Franklin (1759)
>
> ****************************
> * Doug Crompton *
> * Richboro, PA 18954 *
> * 215-431-6307 *
> * *
> * doug at crompton.com *
> * http://www.crompton.com *
> ****************************
>
>
> _______________________________________________
> --Bandwidth and Colocation provided by Easynews.com --
>
> asterisk-users mailing list
> To UNSUBSCRIBE or update options visit:
> http://lists.digium.com/mailman/listinfo/asterisk-users
>
--
Larry Alkoff N2LA - Austin TX
Using Thunderbird on Linux
More information about the asterisk-users
mailing list