SIP Trunk

Hi,
I am trying to setup a SIP trunk with 888VoipStore, I am able to place outgoing calls, but nothing for incoming.

My current settings are:

Trunk Name:  cogentvoip.com

PEER Details:
allow=ulaw&alaw
disallow=all
dtmf=auto&rfc2833
dtmfmode=inband&rfc2833
fromuser= *My phonenumber*
host=cogentvoip.com
insecure=very
nat=yes
qualify=no
secret=*assigned password*
type=peer
username=*assigned username*


User Context:  *My phonenumber*

USER Details:
context=from-trunk
fromuser= *My phonenumber*
host= *My external IP *
insecure=very
nat=yes
qualify=no
secret=*assigned password *
type=user
username=*assigned username*

Register String:
username:[email protected]/username

Asterisk is showing that the SIP trunk is registered. My pix firewall has 5060, 5061 (TCP and UDP) and 10000-20000 UDP open.
Any help would be appreciated as 888voipstore’s help is lacking. I followed the instructions at: http://www.888voipstore.com/support/index.php?_m=knowledgebase&_a=viewarticle&kbarticleid=20 with no success.

Any help would be appreciated.

You might find this page enlightening:

How to get the DID of a SIP trunk when the provider doesn’t send it (and why some incoming SIP calls fail)

But to cut to the chase, your user context and user details probably should be left blank because there’s a good chance they’re being ignored (unless your provider really is treating you as a peer rather than an extension). But you still need a context statement to receive incoming calls, so try putting the context=from-trunk under the PEER details and see if that makes any difference. Also, be sure you’ve created an inbound route - the DID should exactly match the username (the part after the /) in your registration string.

Also, try setting insecure=port,invite (this replaces insecure=very starting in Asterisk 1.4) and you could also try setting the type to friend, though in this situation I’ve used both peer and friend and often it seems to make no difference.

Don’t forget to set “Allow Anonymous Inbound SIP Calls?” to yes
wbg Frank

What is security of setting the Allow Anonymous Inbound SIP Calls.
You get warned about enabling it.

BTW. It looks like after a bunch of badgering emails to 888voipstore, when I call the number, Asterisk isn’t reporting any sip transaction (failed or not). I had them do a test of the the line, to find out there is a problem at the telco end not forwarding the calls to 888voipstore (cogentvoip is the provider).
I am dissapointed with them and their communication. But hopefully it will be fixed soon.

It turns out to be an issue with the provider and the telco. They issued me a new phone number this morning and it is working with the following settings:

Trunk:
Trunk Name: phonenum-out

Peer Details:
username=**assigned username
type=peer
secret=**assigned password
qualify=no
nat=yes
insecure=port,invite
host=cogentvoip.com
fromuser=**phonenum
dtmfmode=inband&rfc2833
dtmf=auto&rfc2833
disallow=all
context=from-trunk
allow=ulaw&alaw

User Context:  phonenum-in

User Details:
disallow=all
allow=ulaw&alaw
canreinvite=no
context=from-trunk
fromuser=**phone number
host=** my external ip, could probably be set to dynamic
insecure=very
nat=yes
qualify=no
secret=**assigned password
type=user
username=**assigned username

Register String:
username:[email protected]/phonenum

Inbound route:
DID must be the username, not the phone number!!!!

I hope this helps others.