# Problem with trunk SIP configuration

**URL:** <https://community.asterisk.org/t/problem-with-trunk-sip-configuration/35343>\
**Category:** Asterisk Support\
**Created:** [May 23, 2011, 6:46am UTC](https://community.asterisk.org/t/problem-with-trunk-sip-configuration/35343 "2011-05-23T06:46:08Z")\
**Posts on this page:** 5\
**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:** [May 23, 2011, 6:46am UTC](https://community.asterisk.org/t/problem-with-trunk-sip-configuration/35343/1 "2011-05-23T06:46:08Z")

</div>

Hello,  
I have an old astersik server (1.4) and i migrate us in 1.8.I have quantum SIP gateway  
Installation of asterisk 1.8+freepbx is ok but my old trunk configuration is not ok.  
My configuration is :

Trunk Name: 4pvs\_lines\_out  
Outbound Caller ID: my tel number  
CID Options:   
Maximum Channels: 8

Outgoing Settings  
Trunk Name: 4pvs\_line\_out  
PEER Details:  
type=peer  
host=10.0.1.184  
fromuser=9999  
secret=9999  
context=pvs-ipphone  
disallow=all  
insecure=port,invite

Incoming Settings  
USER Context: 9999  
USER Details:  
type=friend  
host=10.0.1.184&dynamic  
context=from-pays-external  
disallow=all canreinvite=yes  
call-limit=50 allow=alaw  
insecure=port,invite

Outgoing call is ok but incomming call is not ok  
My log is :  
WARNING[1131]: chan\_sip.c:13450 check\_auth: username mismatch, have \<interne\_externe\>, digest has \<9999\>  
[May 18 08:37:18] NOTICE[1131]: chan\_sip.c:21256 handle\_request\_invite: Failed to authenticate device sip:xxxxxxxxx@10.0.1.152;tag=a0001b8-874

what’s the problem?help me please  
Thanks

---

<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:** [May 23, 2011, 7:00am UTC](https://community.asterisk.org/t/problem-with-trunk-sip-configuration/35343/2 "2011-05-23T07:00:00Z")

</div>

1. You probably have a user or friend, when you should have a peer.

2. the section name doesn’t match the name by which it is known to the service provider.

---

<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:** [May 23, 2011, 7:14am UTC](https://community.asterisk.org/t/problem-with-trunk-sip-configuration/35343/3 "2011-05-23T07:14:16Z")

</div>

in my old asterisk(1.4) i have this configuration and is ok but if i use this config in asterisk 1.8 is not ok.  
Effectively my peer is in type friend/friend but in 1.8 is not ok.  
What changes should I do?  
Sorry for my english

General Settings  
Trunk Description: 4pvs\_lines\_out  
Outbound Caller ID: my tel number  
Maximum Channels: 8

Trunk Name: 4pvs\_line\_out  
PEER Details:  
username=9999  
type=friend  
secret=9999  
host=10.0.1.184  
disallow=all context=pvs-ipphone  
canreinvite=yes c  
all-limit=50 allow=alaw

Incoming Settings  
USER Context: 9999  
USER Details:  
username=9998  
type=friend  
secret=9999  
host=10.0.1.184&dynamic  
disallow=all  
context=from-pays-external  
canreinvite=yes  
call-limit=50  
allow=alaw

help me please

---

<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:** [May 31, 2011, 7:29am UTC](https://community.asterisk.org/t/problem-with-trunk-sip-configuration/35343/4 "2011-05-31T07:29:05Z")

</div>

This is what you get for using FreePBX trunk configurator (not sure why this thread is in asterisk general section)  
FreePBX lulls you into thinking you have incoming and outgoing “trunks” ,  
while in reality only one of them is needed.

You also should not be using type=friend, but this was already mentioned.

---

<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:** [May 31, 2011, 10:06am UTC](https://community.asterisk.org/t/problem-with-trunk-sip-configuration/35343/5 "2011-05-31T10:06:48Z")

</div>

> [@thor](#):
>
> not sure why this thread is in asterisk general section

The only FreePBX section seems to pre-suppose AsteriskNow and even then:

- a lot of people fail to find the AsteriskNow forum;
- AsteriskNow users tend to operate in ask-only mode (very few technical questions seem to get answered)!
