# Cannot connect to SIP trunk provider

**URL:** <https://community.asterisk.org/t/cannot-connect-to-sip-trunk-provider/30556>\
**Category:** Asterisk Support\
**Created:** [February 16, 2010, 9:34pm UTC](https://community.asterisk.org/t/cannot-connect-to-sip-trunk-provider/30556 "2010-02-16T21:34:49Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/asterisk/original/2X/4/475d0c889911cfb84ac4881ad6df8b523e3f9105.png) [@system](https://community.asterisk.org/u/system)\
**Post date:** [February 16, 2010, 9:34pm UTC](https://community.asterisk.org/t/cannot-connect-to-sip-trunk-provider/30556/1 "2010-02-16T21:34:49Z")

</div>

Hi guys,

I have some problems connecting my asterisk to the FPL SIP server. Perhaps my SIP trunk is not properly setup?

What I am trying to do is this: setup an asterisk server with a FPL number and then dial out a number. I set up a SIP trunk, an outbound route, dial plan, an extension to use all this, etc. However I am unable to place the call, and keep getting this voice message: “This account number is not valid”

The important part of the asterisk trace back is this :

– SIP/Freephoneline-085420b8 is making progress passing it to SIP/300-b750bb70  
– Got SIP response 603 “Declined” back from 208.65.240.142

SIP/300 is the extension from where I am trying to dial out. 208.65.240.142 is the proper address of the provider’s SIP server. But what is this 603 response, is it something that the SIP server returns back to me? Or does this mean that I have a problem with the firewall (i…e socket connection not established). And who issues the voice message “This account number is not valid” - is it the provider’s SIP server or is it my asterisk server?

My configuration is as follows:

PEER details:

[host=voip.freephoneline.ca](http://host=voip.freephoneline.ca)  
username=MY\_USER\_NAME  
secret=MY\_PASSWD  
type=friend  
disallow=all  
allow=gsm&ulaw  
[fromdomain=voip.freephoneline.ca](http://fromdomain=voip.freephoneline.ca)  
canreinvite=yes  
qualify=no  
insecure=very

USER Context: MY\_USER\_NAME

USER Details:

username=MY\_USER\_NAME  
secret=MY\_PASSWD  
type=friend  
disallow=all  
allow=gsm&ulaw  
[fromdomain=voip.freephoneline.ca](http://fromdomain=voip.freephoneline.ca)  
canreinvite=yes  
qualify=no  
insecure=very

Register String:  
[MY\_USER\_NAME:MY\_PASSWD@voip.freephoneline.ca](mailto:MY_USER_NAME:MY_PASSWD@voip.freephoneline.ca)/MY\_USER\_NAME

where MY\_PASSWD and MY\_USER\_NAME have to be replaced with the actual string.

The odd thing is this: if I try to connect directly using my SIP softphone (bypassing asterisk), then all is good, the softphone registers succesfully with the SIP provider and I am able to place calls. What exactly can be the difference between connecting directly from the X-Lite phone and through the asterisk server?

At this point I am unsure of what else to try. I am running asterisk 1.6

Any help would be deeply appreciated.

---

<div class="post-metadata">

**Author:** ![david55](https://avatars.discourse-cdn.com/v4/letter/d/e19adc/32.png) [@david55](https://community.asterisk.org/u/david55)\
**Post date:** [February 17, 2010, 12:23pm UTC](https://community.asterisk.org/t/cannot-connect-to-sip-trunk-provider/30556/2 "2010-02-17T12:23:49Z")

</div>

21.6.2 603 Decline

The callee’s machine was successfully contacted but the user  
explicitly does not wish to or cannot participate. The response MAY  
indicate a better time to call in the Retry-After header field. This  
status response is returned only if the client knows that no other  
end point will answer the request.

Source [ietf.org/rfc/rfc3261.txt](http://www.ietf.org/rfc/rfc3261.txt)

It came from the remote end.

I suppose it might mean that there are no mutually acceptable codecs.

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/asterisk/original/2X/4/475d0c889911cfb84ac4881ad6df8b523e3f9105.png) [@system](https://community.asterisk.org/u/system)\
**Post date:** [February 17, 2010, 11:13pm UTC](https://community.asterisk.org/t/cannot-connect-to-sip-trunk-provider/30556/3 "2010-02-17T23:13:33Z")

</div>

Solved.

Changed the useragent field in the general sip settings and now I can make outbound calls just fine. Now I have problems with the incomming calls, but I guess I will open another topic for that …

Thx again.
