Skip to main content

Multiple numbers inbound on 1 trunk

Posted by gerteizinga on Sun, 02/01/2009

Hello

I have 1 trunk with 1 username and 1 password for a bunch of inbound numbers from our sip gateway carrier.

I can register this trunk on the pbx and the outbound works fine.

For the outbound i created the did's and the routes like i would do if i had 1 number per trunk but then the call is rejected on the pbx

Call from '1234567890' to extension 'TRUNK' rejected because extension not found.

I would like to know how i can add the did to the extentions.

If i register 1 number per trunk and create a did and an inbound route, everything works fine

Regards

Gert


Submitted by eeman on Sun, 02/01/2009 Permalink

explain what pattern you inbound route is set to and post the trunk setting in /etc/asterisk/sip.cfg. There is nothing that should be different about using a single trunk versus multiple. In fact a single inbound trunk is more efficient in terms of configuration mess. Is this MTE or STE?

Submitted by gerteizinga on Mon, 02/02/2009 Permalink

Hi Eric

This is on a MTE, and the reason i would like multiple numbers on one trunk is indeed that it is much 'cleaner' config. not only in the MTE, but also in the gateway of the carrier.

the file sip.cfg is not in the dir /etc/asterisk there is a file called sip.conf which contains the following for registering the trunk

register => trunkname:trunkpw@xx.xx.xx.xx/trunkname; trunkname

[trunkname]

qualify=no

nat=no

secret=trunkpw

;=description=trunkname

host=xx.xx.xx.xx

username=trunkname

;callerid=xxxxxxx

dtmfmode=rfc2833

context=from-outside

type=peer

insecure=very

canreinvite=no

disallow=all

allow=ulaw

allow=alaw

11111111111 is routed from the gateway to the mte

in Inbound.include

exten => 11111111111,1,Set(DIALED_PUBLIC_NUMBER=${EXTEN})

exten => 11111111111,2,Set(DIALED_NUMBER=${EXTEN})

exten => 11111111111,3,Set(status=${DB(TL/TENANT/TENANT/status)})

exten => 11111111111,4,GotoIf($["${status}" != "0"]?7) exten => 11111111111,5,Playback(ss-noservice)

exten => 11111111111,6,Congestion

exten => 11111111111,7,GotoIf($["${TL_ENABLE_MAXCALLS_CHECK}" != "1"]?15) exten => 11111111111,8,Set(MAXCALLS=${DB(TL/TENANT/TENANT/maxcalls)})

exten => 11111111111,9,GotoIf($["${MAXCALLS}" = ""]?15) exten => 11111111111,10,Set(GROUP(callpaths)=TENANT)

exten => 11111111111,11,NoOp(GROUP_COUNT = ${GROUP_COUNT(TENANT@callpaths)}) exten => 11111111111,12,GotoIf($[${GROUP_COUNT(TENANT@callpaths)} > ${MAXCALLS}]?13:15) exten => 11111111111,13,Playback(ss-noservice)

exten => 11111111111,14,Hangup

exten => 11111111111,15,GotoIfTime(*,*,*,*?from-outside-11111111111-tl-allhours-TENANT,${EXTEN},1)

inbound_actions.include

[from-outside-11111111111-tl-allhours-TENANT]

exten => 11111111111,1,Set(__tenant=TENANT) exten => 11111111111,2,Set(CDR(userfield)=TENANT)

exten => 11111111111,3,Set(MOH=${DB(TL/MOH/default${TL_DASH}${tenant})})

exten => 11111111111,n,GotoIf($["${MOH}" = ""]?nomoh) exten => 11111111111,n,SetMusicOnHold(${MOH})

exten => 11111111111,n(nomoh),Macro(tl-goto-voicemail,30@default-TENANT,,)

the error i receive is

[Feb 2 10:44:46] NOTICE[23819]: chan_sip.c:14489 handle_request_invite: Call from '2222222222' to extension 'trunkname' rejected because extension not found.

2222222222 is a different number on the pbx (which is addressed by an other trunk and register)

Regards

Gert

Submitted by eeman on Mon, 02/02/2009 Permalink

is 'trunkname' a replacement or is it actually what it says? also your itsp shouldnt be sending calls to _extension_ trunkname they should be sending it to extension of some numerical value

Submitted by gerteizinga on Mon, 02/02/2009 Permalink

trunkname is indeed the name of the trunk., the name is alphanumeric

i can have the trunk name changed into numerical , but then i have the same response

outbound does work!

Submitted by eeman on Mon, 02/02/2009 Permalink

is your ITSP using asterisk to send you the calls? or something else? it is almost as if they were doing

Dial(SIP/trunkname/trunkname) instead of Dial(SIP/trunkname/1234567890)

Submitted by gerteizinga on Mon, 02/02/2009 Permalink

The gateway from the carrier is using a SVI gateway, which works with all kinds of pbx-es (Avaya, @sterisk mitel cisco etc)