Asterisk trunk help

I have a straight asterisk 1.4 install, no trixbox, no asteriskNOW, no freePBX.

I have a Grandstream HT503 setup with ext 500 for the FXO and 501 for the FXS.

I am able to dial the PTSN number attached to the FXO port and it is sucessfully forwarded to the SIP extension. I can dial from the analog phone to other extentions or dial out on the registered SIP account I have through vitelity (who rock BTW). What I want to do is when I dial from the phone attached to the HT503 it dials out through the FXO port and not through vitelity.

I know *00 will dial through that PTSN but that defeats the setting of CID info and any asterisk features (MixMonitor, parking etc). How do I set up the HT503’s fxo port as an outgoigg trunk?

Dial(SIP/360${EXTEN}@vitel-outbound) work as expected but then I tried Dial(SIP/${EXTEN}@400). I think I need to set it up as maybe a ZAP trunk (Dial(ZAP/${EXTEN}) or similar) but I do not know how to do that or even if that is what I want to be doing. I have searched for two days now to no avail so an explanation of config files needed and code in them to make this work would be wonderful. I would also like to be able to dial from any extension and be able to dial out on that FXO port to save the .01 cents per min charge for local calls.

I hope that made sense and there is an answer.

I couldnt understand you correctly, but here’are some guys talking: forum.voxilla.com/asterisk-suppo … 19857.html

I hope this helps

Hi,

As setting are simple and can done very easily, can you please mail me required feature list i can give all the conf file which will certainly implement all things into it.

Thanks,
Vikas Kumar

Hi,

There are a few ways to do it and I do not have one to test but it should go something like this.

;In extension.conf merge this with your existing code
;If the call is from ext. 501 goto the outbound-pstn context ext. s priority 1.
; otherwise continue with the dialplan.

exten => 333,1,GotoIf($["${CALLERID(num)}" = “501”]?outbound-pstn,s,1)
exten => 333,2,Dial(SIP/360${EXTEN}@vitel-outbound)
exten => 333,3,Hangup()

[outbound-pstn]; new context in extensions.conf
exten => s,1,Dial(SIP/${EXTEN:0}@10.0.0.20,30);Change the IP Address to the same as the HT503
exten => s,2,Hangup()

Brett

Thanks all, I was able to figgure it out. Took what you said and searched some more, pasted some things together and now I can dial out wonderfully.

From extensions.conf
exten => _NXXNXXXXXX,1,Dial(SIP/@500,60,D(ww${EXTEN}))

the ATA or at least the PSTN line gives a dial tone and I needed to send the DTmF digits AFTER it passed a dial tone. the ww wait worked.

From sip.conf
[500]
;ATA
context=outbound
dtmfmode=rfc2833
host=192.168.10.102
secret=xxxx
type=friend
username=500

Hadent reigeistered the ATA as an outbound sip trunk before.

Again thank you for your help.

Change the dtmfmode=rfc2833 to dtmfmode=info, change NAT yes on fxo and fxs,

So I need help because when i make a call from other analog phone pstn to voip for example i dial my analog ext that is 103 and then dial a sip ext looks good but when i hangup the call from my analog phone the call is not terminated. But when i call from the analog phone conected to the grandstream all is good dmtf, hangup all.

I tried in the zapata.conf
answeronpolarityswitch=yes
hanguponpolarityswitch=yes
busydetect=yes
busycount=4

But this not seems to work!

Help me please
THX