Digium's SIP-trunk and asterisk

Hi folks,

It’s been a while since I’ve setup a voip provider, so I’m sure I’m overlooking something obvious here. I have my provisioning information from digium for the sip-trunk. I can either get incoming working, or outgoing, but never both.

The problem lies with the ‘host’ config option in the sip stanza for the service. If I define a host, incoming won’t work but outgoing will ( kinda, the call connects successfully, but no audio is passed in either direction. ). If I leave the host option out ( or set it to dynamic ), incoming works but outgoing doesn’t ( presumably because asterisk doesn’t know where to send the call. Notably, however, audio works perfectly in both directions ). In both instances, I have a

[quote]register => :@sip.digiumcloud.net[/quote] statement.

Working incoming stanza[quote][digium-in]
username=
type=user
secret=[/quote]

Working outgoing stanza[quote]
[digium-out]
username=
type=peer
secret=
host=sip.digiumcloud.net[/quote]

If I pull out the digium-out stanza, incoming starts working. If I put it back in, outgoing works but incoming doesn’t.

Any input would be greatly appreciated.

As it always happens, I got it rolling almost immediately after posting my question. Here’s a working stanza:

[quote][digium-trunk]
username=
type=peer
secret=
host=sip.digiumcloud.net
insecure=invite
[color=red]canreinvite=no[/color][/quote]

Still not getting audio when I dial out, but am getting audio when dialing in.

UPDATE

Figured it out, was a reinvite issue. Set the last option, everything’s gravy now.

Update #2
For completeness, here’s the stanza, the registration string AND the context from extensions.conf

[code]
sip.conf
register => :@sip.digiumcloud.net

[digium-trunk]
type=peer
username=
secret=
host=sip.digiumcloud.net
context=digium-in
insecure=invite
nat=yes
qualify=yes
disallow=all
allow=g722
allow=ulaw
allow=gsm
canreinvite=no[/code]

extensions.conf
[digium-in]
exten => <number>,1,Answer()