Switching the outgoing CID from the same phone?

Hi!

If I have one phone and two companies with different telephonenumbers on the same asteriskserver, is it possible to change the outgoing CID from the phone?

I would like to program different buttons on the phone to identify from which company I’m calling from.

Is it possible to use one extension, or do I need one for each company.

Reg Thanks ards

  • Martin O.

If you have a two-line phone, you can register Line 1 to Company A and Line 2 to Company B in sip.conf. You can set the callerid for each line in sip.conf with:

[line1]
…normal stuff…
callerid=Company A <1800xxxxxxx>

then,

[incoming calls context]
exten => ,1,dial(sip/line1)
exten => ,1,dial(sip/line2)

Or, you can always use a dial mask (dial 9 first) for one of the companies

exten => _91NXXNXXXXXX,1,goto(CompanyB,${EXTEN:1},1)
exten => _1NXXNXXXXXX,1,goto(CompanyA,${EXTEN},1)

[CompanyA]
exten => _X.,1,Set(CALLERID(all)=“CompanyA” <1800xxxxxxx>)
exten => _X.,n,dial(sip/sip-gateway/${EXTEN})
exten => _X.,n,Congestion

[CompanyB]
exten => _X.,1,Set(CALLERID(all)=“CompanyB” <1800xxxxxxx>)
exten => _X.,n,dial(sip/sip-gateway/${EXTEN})
exten => _X.,n,Congestion