[help] understanding contexts and extensions

In my sip.conf file i have a register declaration under [general] that seems to work fine.

Next, I have [provider-out] with the appropriate credentials and an assignment to the [pstn-out] context.

Next, I have my single softphone SIP definition [2002] under context [default].

Now in extensions.conf, I have under [default]
exten => mynumber,1,Dial(SIP/2002,25,Ttr)

that works for incoming calls.

Next I have [pstn-out] which says:
exten => _1NXXNXXXXXX,1,Dial(SIP/${EXTEN}@provider-out,25,rt)

Something is completely wrong here, and I’m racking my brain trying to figure it out. I can receive calls just fine, but I cannot call out. The really strange thing to me is, if I comment out the context=default line under [provider-out] in sip.conf, I’m not able to receive calls anymore. I must be mixed up! Can anyone help?

if You want [2002] sip phone work in context [default] then
You have to add
[2002]

context=default
if context is not specified in user/peer declaration, then
sip.conf [general] context= is used

if You want to makeoutgoing calls using [2002] then 2002 must have access
to context [pstn-out].

  1. use include => stn-out in context that 2002 have access to
  2. change context=pstn-out in sip.conf [2002]
    then add inbound routing in [pstn-out] or include => default or whatever You have there.

thanks for the help, I’ll post a link to my config files at some point, I have asterisk routing to and from a vonage ‘softphone’ account. None of the other config files posted on the net have worked for me.