Config Trunk makes me MAD

Hi
Need some help with config a trunk.
I am getting the next info of the supplier:
Account: [email protected]
Password: verysecret
Number1: 0701234567
Number2: 0707654321

register => cust1:verysecret:[email protected]
auth=cust1:[email protected]
[sip_proxy-incoming]
type=peer
context=sip_proxy-incoming
host=proxy.winitu.com
disallow=all
allow=alaw
insecure=invite,port
[sip_proxy-out]
type=peer
context=sip_proxy-out
insecure=invite,port
disallow=all
allow=alaw

Extensions.conf main configuration lines
[sip_proxy-incoming]
exten => s,1,Set(Var_TO=${SIP_HEADER(TO)})
exten => s,2,Set(Var_TO=${CUT(Var_TO,:,2)}) ; strip alles voor de :
exten => s,3,Set(Var_TO=${CUT(Var_TO,@,1):-4}) ; strip alles achter de @ en
; pak laatste 4 digits
exten => s,4,GotoIf($["${Var_TO}" = “4567”]?extension1,s,1:5)
exten => s,5,GotoIf($["${Var_TO}" = “4321”]?extension2,s,1:6)
exten => s,6,Wait(30)
[sip_proxy-out]
exten => _X.,1,Set(CALLERID(all)=cust1)
exten => _X.,2,Dial(SIP/sip_proxy-out/${EXTEN})
exten => _X.,n,Hangup()
[extension1]
exten => s,1,SayDigits(0701234567)
exten => s,n,Hangup()
[extension2]
exten => s,1,SayDigits(0707654321)
exten => s,n,Hangup()
[phones]
;include => default
include => sip_proxy-out
include => sip_proxy-incoming

I am not able to get the trunk working right.
I am getting the trunk online but any inbound route with number 0701234567 or 0707654321 gets me “this number is not available” when deleting the DID in the inbound route it is working. So i am not able to get 2 different inbound routes for both number.
Some has a solution for me?

Are you using FreePBX or just plain Asterisk?

I am using Freepbx 2.10 on centos 6.3.

To get the trunk working in freepbx i have the next detail
peer details:
username=xxxxxx
type=peer
secret=xxxxx
insecure=invite,port
host=proxy.winitu.com
fromuser=xxxxxx
fromdomain=proxy.winitu.com
dtmfmode=inband
disallow=all
canreinvite=no
allow=alaw

user details:
type=friend
qualify=yes
insecure=very
host=proxy.winitu.com
dtmfmode=inband
disallow=all
canreinvite=no
allow=alaw

olny whgen i enter a did in the inbound it does not work without did cathc all it does work

If, in the CLI, you turn the verbosity up to at least 5 then you should be able to watch a test call come in and see what they are sending.

Also, the reg string looks funny: cust1:verysecret:[email protected] should not it be cust1:[email protected] ?

You have many issues, the user details are a duplicate of the peer details for the most part. You only use the user details if a different peer is used.

You have set insecure to port,invite (very is deperecated) yet you still define a username and secret. Why would you tell your password to Asterisk then tell it to ignore it?

lastly, you need an inbound context of from-pstn

Oké if you look to the info i got from My supplier what would be the basis setting of the trunk to get 2 did work. I find it hard to believe that i must enter config files in asterisk to get freepbx work.

At this moment with different reg string and different peer setting the trunk is working only a inbound route does work with a catch all (any did) when entering a specifid did the Nice wonen of asterisk tellse the nummer does not exist.

You don’t have to edit any config files.

Which steps i need to take to get the trunk work correctly?

evry change in peer details and user detail give the same result.
peer details
type=friend
srvlookup=yes
qualify=yes
nat=yes
insecure=very
host=proxy.winitu.com
dtmfmode=inband
context=from-pstn
allow=all

user detail: empty

reg string: username:[email protected]

if i place number1 behind the regstring.
The inbound route with number 1 works, but number 2 is pickt up as number 1 in the cli aswell.
So number 2 is catched in the inbound route of number 1

regstring: username:[email protected]/number1

Can you post the Asterisk log file for an inbound call so that we can see exactly what happens?

Which log file would you like to see=
Or would you like to see the cli?

The problem is the did in the reg string.
the reg string is the next one
regstring: username:[email protected]/number1
i can change number1 in number2 and it works when inbound route did is change.
But i cabn change number1 in 12345678910 set this number in my inbound route and the inbound route works

so i can place any nummber as did at my regstring and it goes right to my inbound route.

Is there a way to place 2 did at a regstring like
regstring: username:[email protected]/number1&number2

or must i fix the peer of user details?

Log file is /var/log/asterisk/full

here is the log file /var/log/asterisk/full.
file
it is 216mb

2013-2-4 and 2013-2-5

Just an extract of one call will do. I don’t fancy trawling though a 216MB file.

regstring :username:[email protected]/number1
inbound number: number1

calling to number2

– Executing [number2@from-trunk:1] Set(“SIP/Telfort-00000184”, “__FROM_DID=number2”) in new stack
– Executing [number2@from-trunk:2] Gosub(“SIP/Telfort-00000184”, “app-blacklist-check,s,1()”) in new stack
– Executing [s@app-blacklist-check:1] GotoIf(“SIP/Telfort-00000184”, “0?blacklisted”) in new stack
– Executing [s@app-blacklist-check:2] Set(“SIP/Telfort-00000184”, “CALLED_BLACKLIST=1”) in new stack
– Executing [s@app-blacklist-check:3] Return(“SIP/Telfort-00000184”, “”) in new stack
– Executing [number2@from-trunk:3] Set(“SIP/Telfort-00000184”, “CDR(did)=number2”) in new stack
– Executing [number2@from-trunk:4] ExecIf(“SIP/Telfort-00000184”, “1 ?Set(CALLERID(name)=number1)”) in new stack
– Executing [number1@from-trunk:1] Set(“SIP/Telfort-00000185”, “__FROM_DID=number1”) in new stack
– Executing [number2@from-trunk:5] Set(“SIP/Telfort-00000184”, “__CALLINGPRES_SV=allowed_not_screened”) in new stack
– Executing [number1@from-trunk:2] Gosub(“SIP/Telfort-00000185”, “app-blacklist-check,s,1()”) in new stack
– Executing [number2@from-trunk:6] Set(“SIP/Telfort-00000184”, “CALLERPRES()=allowed_not_screened”) in new stack
– Executing [number2@from-trunk:7] Goto(“SIP/Telfort-00000184”, “ext-local,vmb3499,1”) in new stack
– Executing [s@app-blacklist-check:1] GotoIf(“SIP/Telfort-00000185”, “0?blacklisted”) in new stack
– Goto (ext-local,vmb3499,1)
– Executing [vmb3499@ext-local:1] Macro(“SIP/Telfort-00000184”, “vm,3499,BUSY,”) in new stack
– Executing [s@app-blacklist-check:2] Set(“SIP/Telfort-00000185”, “CALLED_BLACKLIST=1”) in new stack
– Executing [s@app-blacklist-check:3] Return(“SIP/Telfort-00000185”, “”) in new stack
– Executing [number1@from-trunk:3] Set(“SIP/Telfort-00000185”, “CDR(did)=number1”) in new stack
– Executing [number1@from-trunk:4] ExecIf(“SIP/Telfort-00000185”, “1 ?Set(CALLERID(name)=number1)”) in new stack
– Executing [s@macro-vm:1] Macro(“SIP/Telfort-00000184”, “user-callerid,SKIPTTL”) in new stack
– Executing [number1@from-trunk:5] Set(“SIP/Telfort-00000185”, “__CALLINGPRES_SV=allowed_not_screened”) in new stack
– Executing [number1@from-trunk:6] Set(“SIP/Telfort-00000185”, “CALLERPRES()=allowed_not_screened”) in new stack
– Executing [number1@from-trunk:7] Goto(“SIP/Telfort-00000185”, “timeconditions,1,1”) in new stack
– Executing [s@macro-user-callerid:1] Set(“SIP/Telfort-00000184”, “AMPUSER=number1”) in new stack
– Goto (timeconditions,1,1)
– Executing [1@timeconditions:1] GotoIfTime(“SIP/Telfort-00000185”, “09:00-17:00,mon-fri,,?truestate”) in new stack
– Goto (timeconditions,1,7)
– Executing [s@macro-user-callerid:2] GotoIf(“SIP/Telfort-00000184”, “0?report”) in new stack
– Executing [1@timeconditions:7] GotoIf(“SIP/Telfort-00000185”, “0?falsegoto”) in new stack
– Executing [s@macro-user-callerid:3] ExecIf(“SIP/Telfort-00000184”, “1?Set(REALCALLERIDNUM=number1)”) in new stack
– Executing [1@timeconditions:8] ExecIf(“SIP/Telfort-00000185”, “0?Set(DB(TC/1)=)”) in new stack
– Executing [1@timeconditions:9] GotoIf(“SIP/Telfort-00000185”, “1?ivr-1,s,1”) in new stack
– Executing [s@macro-user-callerid:4] Set(“SIP/Telfort-00000184”, “AMPUSER=”) in new stack
– Goto (ivr-1,s,1)
– Executing [s@ivr-1:1] Set(“SIP/Telfort-00000185”, “TIMEOUT_LOOPCOUNT=0”) in new stack
– Executing [s@macro-user-callerid:5] Set(“SIP/Telfort-00000184”, “AMPUSERCIDNAME=”) in new stack
– Executing [s@ivr-1:2] Set(“SIP/Telfort-00000185”, “INVALID_LOOPCOUNT=0”) in new stack
– Executing [s@ivr-1:3] Set(“SIP/Telfort-00000185”, “_IVR_CONTEXT_ivr-1=”) in new stack
– Executing [s@macro-user-callerid:6] GotoIf(“SIP/Telfort-00000184”, “1?report”) in new stack
– Executing [s@ivr-1:4] Set(“SIP/Telfort-00000185”, “_IVR_CONTEXT=ivr-1”) in new stack
– Goto (macro-user-callerid,s,13)
– Executing [s@ivr-1:5] Set(“SIP/Telfort-00000185”, “__IVR_RETVM=”) in new stack
– Executing [s@macro-user-callerid:13] GotoIf(“SIP/Telfort-00000184”, “1?continue”) in new stack
– Goto (macro-user-callerid,s,26)
– Executing [s@ivr-1:6] GotoIf(“SIP/Telfort-00000185”, “0?skip”) in new stack
– Executing [s@macro-user-callerid:26] Set(“SIP/Telfort-00000184”, “CALLERID(number)=number1”) in new stack
– Executing [s@ivr-1:7] Answer(“SIP/Telfort-00000185”, “”) in new stack
– Executing [s@macro-user-callerid:27] Set(“SIP/Telfort-00000184”, “CALLERID(name)=number1”) in new stack
– Executing [s@macro-user-callerid:28] Set(“SIP/Telfort-00000184”, “CHANNEL(language)=nl”) in new stack
– Executing [s@macro-vm:2] Set(“SIP/Telfort-00000184”, “VMGAIN=”"") in new stack
– Executing [s@macro-vm:3] Macro(“SIP/Telfort-00000184”, “blkvm-check,”) in new stack
– Executing [s@macro-blkvm-check:1] Set(“SIP/Telfort-00000184”, “GOSUB_RETVAL=”) in new stack
– Executing [s@macro-blkvm-check:2] ExecIf(“SIP/Telfort-00000184”, “0?Set(GOSUB_RETVAL=TRUE)”) in new stack
– Executing [h@ext-local:1] Macro(“SIP/Telfort-00000184”, “hangupcall,”) in new stack
– Executing [s@macro-hangupcall:1] GotoIf(“SIP/Telfort-00000184”, “1?theend”) in new stack
– Goto (macro-hangupcall,s,3)
– Executing [s@macro-hangupcall:3] ExecIf(“SIP/Telfort-00000184”, “0?Set(CDR(recordingfile)=)”) in new stack
– Executing [s@macro-hangupcall:4] Hangup(“SIP/Telfort-00000184”, “”) in new stack
== Spawn extension (macro-hangupcall, s, 4) exited non-zero on ‘SIP/Telfort-00000184’ in macro ‘hangupcall’
== Spawn extension (ext-local, h, 1) exited non-zero on ‘SIP/Telfort-00000184’
– Executing [s@ivr-1:8] Wait(“SIP/Telfort-00000185”, “1”) in new stack
– Executing [s@ivr-1:9] Set(“SIP/Telfort-00000185”, “IVR_MSG=custom/WELKOM_MDtelecom”) in new stack
– Executing [s@ivr-1:10] Set(“SIP/Telfort-00000185”, “TIMEOUT(digit)=3”) in new stack
– Digit timeout set to 3.000
– Executing [s@ivr-1:11] ExecIf(“SIP/Telfort-00000185”, “1?Background(custom/WELKOM_MDtelecom)”) in new stack
– <SIP/Telfort-00000185> Playing ‘custom/WELKOM_MDtelecom.slin’ (language ‘nl’)
== Spawn extension (ivr-1, s, 11) exited non-zero on ‘SIP/Telfort-00000185’
– Executing [h@ivr-1:1] Hangup(“SIP/Telfort-00000185”, “”) in new stack
== Spawn extension (ivr-1, h, 1) exited non-zero on ‘SIP/Telfort-00000185’

regstring :username:[email protected]/number2
inbound number: number2

calling to number2

– Executing [number1@from-trunk:1] Set(“SIP/Telfort-0000018c”, “__FROM_DID=number1”) in new stack
– Executing [number2@from-trunk:1] Set(“SIP/Telfort-0000018d”, “__FROM_DID=number2”) in new stack
– Executing [number2@from-trunk:2] NoOp(“SIP/Telfort-0000018d”, “Received an unknown call with DID set to number2”) in new stack
– Executing [number1@from-trunk:2] Gosub(“SIP/Telfort-0000018c”, “app-blacklist-check,s,1()”) in new stack
– Executing [number2@from-trunk:3] Goto(“SIP/Telfort-0000018d”, “s,a2”) in new stack
– Executing [s@app-blacklist-check:1] GotoIf(“SIP/Telfort-0000018c”, “0?blacklisted”) in new stack
– Goto (from-trunk,s,2)
– Executing [s@from-trunk:2] Answer(“SIP/Telfort-0000018d”, “”) in new stack
– Executing [s@app-blacklist-check:2] Set(“SIP/Telfort-0000018c”, “CALLED_BLACKLIST=1”) in new stack
– Executing [s@app-blacklist-check:3] Return(“SIP/Telfort-0000018c”, “”) in new stack
– Executing [number1@from-trunk:3] Set(“SIP/Telfort-0000018c”, “CDR(did)=number1”) in new stack
– Executing [number1@from-trunk:4] ExecIf(“SIP/Telfort-0000018c”, “1 ?Set(CALLERID(name)=number1)”) in new stack
– Executing [number1@from-trunk:5] Set(“SIP/Telfort-0000018c”, “__CALLINGPRES_SV=allowed_not_screened”) in new stack
– Executing [number1@from-trunk:6] Set(“SIP/Telfort-0000018c”, “CALLERPRES()=allowed_not_screened”) in new stack
– Executing [number1@from-trunk:7] Goto(“SIP/Telfort-0000018c”, “timeconditions,1,1”) in new stack
– Goto (timeconditions,1,1)
– Executing [1@timeconditions:1] GotoIfTime(“SIP/Telfort-0000018c”, “09:00-17:00,mon-fri,,?truestate”) in new stack
– Goto (timeconditions,1,7)
– Executing [1@timeconditions:7] GotoIf(“SIP/Telfort-0000018c”, “0?falsegoto”) in new stack
– Executing [1@timeconditions:8] ExecIf(“SIP/Telfort-0000018c”, “0?Set(DB(TC/1)=)”) in new stack
– Executing [s@from-trunk:3] Wait(“SIP/Telfort-0000018d”, “2”) in new stack
– Executing [s@from-trunk:4] Playback(“SIP/Telfort-0000018d”, “ss-noservice”) in new stack
– <SIP/Telfort-0000018d> Playing ‘ss-noservice.gsm’ (language ‘nl’)
== Spawn extension (from-trunk, s, 4) exited non-zero on ‘SIP/Telfort-0000018d’
– Executing [h@from-trunk:1] Macro(“SIP/Telfort-0000018d”, “hangupcall,”) in new stack
– Executing [s@macro-hangupcall:1] GotoIf(“SIP/Telfort-0000018d”, “1?theend”) in new stack
– Goto (macro-hangupcall,s,3)
– Executing [s@macro-hangupcall:3] ExecIf(“SIP/Telfort-0000018d”, “0?Set(CDR(recordingfile)=)”) in new stack
– Executing [s@macro-hangupcall:4] Hangup(“SIP/Telfort-0000018d”, “”) in new stack
== Spawn extension (macro-hangupcall, s, 4) exited non-zero on ‘SIP/Telfort-0000018d’ in macro ‘hangupcall’
== Spawn extension (from-trunk, h, 1) exited non-zero on ‘SIP/Telfort-0000018d’

Can some1 help me?

I just noticed your post after started a new thread.
you have some useful info here once i can get passed
my firewall issue as mentioned
http://www.freepbx.org/forum/installation/configuring-trunks
sorry i cannot give you advice how to correct yours