Connecting Leased VOIP line to asterisk

Im trying to add my leased VOIP into asterisk and then to get it to call my ext.
i am using freepbx

my lease line provider gives me these detail but ive tried and failed too many times




; Register line should be somewhere inside your general section

register =>


context=default ; or your own selected context if desired
;allow=g729 ; only if you have licenses to use it
insecure=very ; use insecure=invite,port in later versions of Asterisk such as v1.4


;receive incoming calls to a connected phone

exten => s,1,Dial(SIP/yournumber)

; outbound calls (outside of your own PBX)

exten => _X.*,1,Dial(SIP/${EXTEN}@kiwivoip)

You should probably be on The dialplan fragments are things that are replaced by hundreds of lines of code in FreePBX, and should be ignored.

This example is typical of service provider provided configurations in that it uses a channel driver that is being phased out, obsolete parameter names, bad practice settings, and almost certainly unnecessary settings, but fails to consider that you might be behind NAT.

The incoming dialplan is actually invalid, given the register string advised. s should be yournumber.

Is there any reason for not using chan_pjsip? Note providers often wrongly say it can’t be used, so I’m asking in terms of your system.

Compensating for the generally bad advice, this is a very standard provider type configuration, and I’d expect the standard specimen PJSIP provider configuration to work well.

I haven’t addressed NAT as I don’t know your situation.

Please note that none of the following should stop things working, they are just have no effect, are obsolete forms, or reduce security.

type=friend should be type=peer.
canreinvite should be directmedia.
insecure=very should be insecure=invite, unless you you specifically know they originate calls from random port numbers, in which case you will need both port and invite. However using remotesecret, rather than secret, is an even better solution, with regard to the invite part of it, and is how you’d have to translate it to PJSIP.
username= should be defaultuser=, but is irrelevant in an outgoing registration context, so shouldn’t be there,
nat= should never be needed for any competent service provider

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.