FreePBX | Register | Issues | Wiki | Portal | Support

Call out with another number When *30* is Presse, possible?


(MK) #1

dear community,

i have a question.:
is it possible if i Call a number that When i add 30 before i give in the number, that i can dial out with another Phone number? have 2 numbers in my bpx. All users the dial a *30*NUMBER should Call out not with the regulary configured number only with the 2nd one.

Is this possible? thank you very much.


(Lorne Gaetz) #2

Paid commercial module “Caller ID Management” does this.


#3

Just set up a new outbound route with *30* in the prefix field. On the Route Settings page, put the CID you want in the Route CID field. You can assign the same trunk(s) as your primary outbound route.

Use the module lgaetz mentioned if you want to be able to set the CLID arbitrarily.


(MK) #4

Hello and Thank you for the answer.
is it possible Do to that with a free or open source Module? thank you. Many greets


(Marbled) #5

The only other way I can think of of doing something slightly similar is with DISA…

DISA gives you a second dial tone and let’s you change the caller id…

You would create a DISA entry which you would then map to a misc application you could then call.

Don’t make this accessible from the outside or if you do set up a PIN otherwise people could abuse your system.

Good luck and have a nice day!

Nick


(MK) #6

Hello billsimon,

thank you, but its not working.

can you help me?

here the log:
– Executing [s@macro-dialout-trunk:3] GotoIf(“SIP/10-0000000f”, “0?disabletrunk,1”) in new stack
– Executing [s@macro-dialout-trunk:4] Set(“SIP/10-0000000f”, “DIAL_NUMBER=300043*********”) in new stack
– Executing [s@macro-dialout-trunk:5] Set(“SIP/10-0000000f”, “DIAL_TRUNK_OPTIONS=Ttr”) in new stack
– Executing [s@macro-dialout-trunk:6] Set(“SIP/10-0000000f”, “OUTBOUND_GROUP=OUT_1”) in new stack
– Executing [s@macro-dialout-trunk:7] GotoIf(“SIP/10-0000000f”, “1?nomax”) in new stack
– Goto (macro-dialout-trunk,s,9)
– Executing [s@macro-dialout-trunk:9] GotoIf(“SIP/10-0000000f”, “0?skipoutcid”) in new stack
– Executing [s@macro-dialout-trunk:10] Set(“SIP/10-0000000f”, “DIAL_TRUNK_OPTIONS=T”) in new stack
– Executing [s@macro-dialout-trunk:11] Macro(“SIP/10-0000000f”, “outbound-callerid,1”) in new stack
– Executing [s@macro-outbound-callerid:1] ExecIf(“SIP/10-0000000f”, “0?Set(CALLERPRES(name-pres)=)”) in new stack
– Executing [s@macro-outbound-callerid:2] ExecIf(“SIP/10-0000000f”, “0?Set(CALLERPRES(num-pres)=)”) in new stack
– Executing [s@macro-outbound-callerid:3] ExecIf(“SIP/10-0000000f”, “0?Set(REALCALLERIDNUM=10)”) in new stack
– Executing [s@macro-outbound-callerid:4] GotoIf(“SIP/10-0000000f”, “1?normcid”) in new stack
– Goto (macro-outbound-callerid,s,7)
– Executing [s@macro-outbound-callerid:7] Set(“SIP/10-0000000f”, “USEROUTCID=+4310") in new stack
– Executing [s@macro-outbound-callerid:8] Set(“SIP/10-0000000f”, “EMERGENCYCID=”) in new stack
– Executing [s@macro-outbound-callerid:9] Set(“SIP/10-0000000f”, “TRUNKOUTCID=”) in new stack
– Executing [s@macro-outbound-callerid:10] GotoIf(“SIP/10-0000000f”, “1?trunkcid”) in new stack
– Goto (macro-outbound-callerid,s,15)
– Executing [s@macro-outbound-callerid:15] ExecIf(“SIP/10-0000000f”, “0?Set(CALLERID(all)=)”) in new stack
– Executing [s@macro-outbound-callerid:16] ExecIf(“SIP/10-0000000f”, "1?Set(CALLERID(all)=+43
10)”) in new stack
– Executing [s@macro-outbound-callerid:17] ExecIf(“SIP/10-0000000f”, “0?Set(CALLERID(all)=)”) in new stack
– Executing [s@macro-outbound-callerid:18] ExecIf(“SIP/10-0000000f”, “0?Set(CALLERPRES(name-pres)=prohib_passed_screen)”) in new stack
– Executing [s@macro-outbound-callerid:19] ExecIf(“SIP/10-0000000f”, “0?Set(CALLERPRES(num-pres)=prohib_passed_screen)”) in new stack
– Executing [s@macro-outbound-callerid:20] Set(“SIP/10-0000000f”, “CDR(outbound_cnum)=+4310") in new stack
– Executing [s@macro-outbound-callerid:21] Set(“SIP/10-0000000f”, “CDR(outbound_cnam)=”) in new stack
– Executing [s@macro-dialout-trunk:12] GosubIf(“SIP/10-0000000f”, “0?sub-flp-1,s,1()”) in new stack
– Executing [s@macro-dialout-trunk:13] Set(“SIP/10-0000000f”, "OUTNUM=300043
") in new stack
– Executing [s@macro-dialout-trunk:14] Set(“SIP/10-0000000f”, “custom=SIP/Out”) in new stack
– Executing [s@macro-dialout-trunk:15] ExecIf(“SIP/10-0000000f”, “0?Set(DIAL_TRUNK_OPTIONS=M(setmusic^default)T)”) in new stack
– Executing [s@macro-dialout-trunk:16] ExecIf(“SIP/10-0000000f”, “0?Set(DIAL_TRUNK_OPTIONS=TM(confirm))”) in new stack
– Executing [s@macro-dialout-trunk:17] Macro(“SIP/10-0000000f”, “dialout-trunk-predial-hook,”) in new stack
– Executing [s@macro-dialout-trunk-predial-hook:1] SIPAddHeader(“SIP/10-0000000f”, "cid:+43
10") in new stack
– Executing [s@macro-dialout-trunk:18] GotoIf(“SIP/10-0000000f”, “0?bypass,1”) in new stack
– Executing [s@macro-dialout-trunk:19] ExecIf(“SIP/10-0000000f”, "1?Set(CONNECTEDLINE(num,i)=300043
)”) in new stack
– Executing [s@macro-dialout-trunk:20] ExecIf(“SIP/10-0000000f”, “1?Set(CONNECTEDLINE(name,i)=CID:+4310)") in new stack
– Executing [s@macro-dialout-trunk:21] ExecIf(“SIP/10-0000000f”, "0?Set(CONNECTEDLINE(name,i)=CID:(Hidden)+43
10)”) in new stack
– Executing [s@macro-dialout-trunk:22] GotoIf(“SIP/10-0000000f”, “0?customtrunk”) in new stack
– Executing [s@macro-dialout-trunk:23] Dial(“SIP/10-0000000f”, “SIP/Out/300043*********,300,T”) in new stack
== Using SIP RTP TOS bits 184
== Using SIP RTP CoS mark 5
> [INSERT INTO cel (eventtype,eventtime,cid_name,cid_num,cid_ani,cid_rdnis,cid_dnid,exten,context,channame,appname,appdata,amaflags,accountcode,uniqueid,linkedid,peer,userdeftype,extra) VALUES (‘CHAN_START’,{ts ‘2017-12-03 18:05:27.856117’},’’,’’,’’,’’,’’,‘s’,‘from-trunk’,‘SIP/Out-00000010’,’’,’’,3,’’,‘1512320727.16’,‘1512320727.15’,’’,’’,’’)]
– Called SIP/Out/300043*********
> [INSERT INTO cel (eventtype,eventtime,cid_name,cid_num,cid_ani,cid_rdnis,cid_dnid,exten,context,channame,appname,appdata,amaflags,accountcode,uniqueid,linkedid,peer,userdeftype,extra) VALUES (‘HANGUP’,{ts ‘2017-12-03 18:05:27.859947’},‘CID:+4310’,'300043’,’’,’’,’’,'300043*******’,‘from-trunk’,‘SIP/Out-00000010’,‘AppDial’,’(Outgoing Line)’,3,’’,‘1512320727.16’,‘1512320727.15’,’’,’’,‘1,SIP/Out-00000010,’)]
== Everyone is busy/congested at this time (1:0/0/1)
– Executing [s@macro-dialout-trunk:24] NoOp(“SIP/10-0000000f”, “Dial failed for some reason with DIALSTATUS = CHANUNAVAIL and HANGUPCAUSE = 1”) in new stack
– Executing [s@macro-dialout-trunk:25] GotoIf(“SIP/10-0000000f”, “0?continue,1:s-CHANUNAVAIL,1”) in new stack
– Goto (macro-dialout-trunk,s-CHANUNAVAIL,1)
> [INSERT INTO cel (eventtype,eventtime,cid_name,cid_num,cid_ani,cid_rdnis,cid_dnid,exten,context,channame,appname,appdata,amaflags,accountcode,uniqueid,linkedid,peer,userdeftype,extra) VALUES (‘CHAN_END’,{ts ‘2017-12-03 18:05:27.860197’},‘CID:+4310’,'300043’,’’,’’,’’,'300043*******’,‘from-trunk’,‘SIP/Out-00000010’,‘AppDial’,’(Outgoing Line)’,3,’’,‘1512320727.16’,‘1512320727.15’,’’,’’,’’)]
– Executing [s-CHANUNAVAIL@macro-dialout-trunk:1] Set(“SIP/10-0000000f”, “RC=1”) in new stack
– Executing [s-CHANUNAVAIL@macro-dialout-trunk:2] Goto(“SIP/10-0000000f”, “1,1”) in new stack
– Goto (macro-dialout-trunk,1,1)
– Executing [1@macro-dialout-trunk:1] Goto(“SIP/10-0000000f”, “s-INVALIDNMBR,1”) in new stack
– Goto (macro-dialout-trunk,s-INVALIDNMBR,1)
– Executing [s-INVALIDNMBR@macro-dialout-trunk:1] NoOp(“SIP/10-0000000f”, “Dial failed due to trunk reporting Address Incomplete - giving up”) in new stack
– Executing [s-INVALIDNMBR@macro-dialout-trunk:2] Progress(“SIP/10-0000000f”, “”) in new stack
– Executing [s-INVALIDNMBR@macro-dialout-trunk:3] Playback(“SIP/10-0000000f”, “ss-noservice,noanswer”) in new stack
– <SIP/10-0000000f> Playing ‘ss-noservice.gsm’ (language ‘en’)
> 0x7f72e00187a0 – Probation passed - setting RTP source address to 192.168.10.18:61564
SRV-PBX-CSIP-0000*CLI>
indent preformatted text by 4 spaces

the route settings:

main route:


new route with 30 prefix:


what im doing wrong?

thank you


#7

You didn’t put anything in the match pattern.


(MK) #8

hello billsimon,

i have tried only with one route an the match pattern with 30 or #31#, nothing seems to work.
it is possible that i cant use a * or # in the match pattern?

if i only use digits, then i have a conflict with my first outbound route with (match pattern) .

can you help me?

thank you


#9

The *30* goes into the prefix field and the rest of the match pattern goes into the match pattern field. You could put just a single . into the match pattern field if you want to match anything and send it to your trunk.

# is usually used by phones at the end of a dial string to say “dial now” so you probably would not be able to use it in this way.


(MK) #10

hello bill simon,

i have tried this, but no chance. i get always “no connection under this number”.

here are my settings:

main outbound:

2nd outbound (for my 2nd number):

what im doing wrong?

thank you!


(Itzik) #11

Here’s mine. Works perfectly for me.

Main Route

2nd Route

I didn’t read in detail your posts above, but i have a friend who also made a secondary route, but he forgot to connect it to a trunk… sometimes we forget to do the simplest things.


(MK) #12

Hello pitz key,

thank you!

but i cant see a * NR *. maybe its not working with a star before and after the number? what i see here, you have in front of the number a nine? is this correct? is this your indicator for the 2nd route?

is it possible do to this with a STAR Number STAR, or only with digits?

thank you very much!

many greets ice


(Itzik) #13

Test it! I Assume it’s not working with a * (STAR) as a Prefix.

Yes, correct. when using number 9 it will use the secondary route.


(MK) #14

hello!

so i have tried the following:

mainroute:

subroute:

so for now, i must enter a first 0 before i can dial out.
and if a add a 9, then it goes over my sencond route.

now my question:
is it possible to change the dial pattern, that i dont need to must enter the first 0 before i do the call?

i mean ONLY if i call 9NUMBER, with 2nd route and NUMBER with the 1st route.

if i remove the first 0 in my 1st dial pattern, the whole traffic goes over my 1 route, and skipps so the 2nd one.

any ideas?

thank you!


(Itzik) #15

That’s because you didn’t specify any pattern there… You basically allowing everything.

I suggest you reading this wiki to understand how Dial Patterns/Outbound Routes work.

https://wiki.freepbx.org/plugins/servlet/mobile?contentId=28770431#content/view/28770431


(MK) #16

Thank you for your help. I has solved it.

Here my Routes (Outbound):