How to Configure Sip trunk with multiple lines

Hello, Am new to Asterisk and am trying to set up a sip trunk with multiple lines.
My sip provider offers multiple numbers which end with 0800…00 - 0800…99.
Am able to make calls using only the number ending with 00, unless i declare the sip-trunk to use any other number in the from-user section. if i don’t declare any number it produces an error Temporarily unavailable when making a campaign with multiple outgoing calls, some calls do not go through because the trunk is busy or in use
Below are my current configurations

exten => _0XXXXXXXX.,1,AGI(agi://127.0.0.1:4577/call_log);
exten => _0XXXXXXXX.,n,Dial(SIP/trunk1/${EXTEN},,tTo);
exten => _0XXXXXXXX.,n,Hangup();

I also tried the below dialplan but there was no difference

exten => _0XXXXXXXX.,1,AGI(agi://127.0.0.1:4577/call_log);
exten => _0XXXXXXXX.,n,Dial(SIP/trunk1/${EXTEN},,tTo);
same => n, Verbose(2, D0 DIALSTATUS => ${DIALSTATUS})
same => n, GotoIf($[ $['${DIALSTATUS}'='BUSY'] | $['${DIALSTATUS}'='NOANSWER']   ]?next_trunk)
same => n(next_trunk),Dial(SIP/trunk2/${EXTEN},,tTo);
same => n,Hangup();

Sip.conf

[trunk1]
disallow=all
allow=ulaw
allow=alaw
type=friend
host=IP
dtmfmode=RFC2833
qualify=yes
fromuser=0800544400
fromdomain=IP
context=from-pstn
insecure=port,invite

[trunk2]
disallow=all
allow=ulaw
allow=alaw
type=friend
host=IP
dtmfmode=RFC2833
qualify=yes
fromuser=0800544401
fromdomain=IP
context=from-pstn
insecure=port,invite

Oh, and am running asterisk 1.8

Asterisk 1.8 is 4 and a half years beyond end of life?

What is your question? You appear to have found a way of originating calls with different numbers, already.

If it is the large number, you can probably use Set(CALLERID(num)=…), to set the user field in the dialplan.

Normally, you could originate any number of calls from any number, If that is not true, it is a restriction being implemented by your ITSP.

Thank you for your reply.
My question is, when performing an outgoing survey call to 1000s of numbers, some numbers do not go through because the trunk is BUSY or CONGESTED. so what i needed is for a way to assign say the first 100 outgoing calls to all the numbers available with the trunk forexample trunk ending …00 takes one call, then …01 takes another simultaneously, such that they can all be called at once, then the next 100, then the next… and if congested or busy, it waits, instead of completly not calling or looks for a free trunk.

I doubt that the service provider cares about how the calls are spread across caller IDs.

If you are initiating 1000s of simultaneous calls, you probably need to negotiate a special contract with the provider

Alright, Thank you for your assistance

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.