Theo Band
2007-Apr-11 23:49 UTC
[asterisk-users] How to set fromuser in sip.conf so each user gets it's own callerid?
I'm a first time user of Asterisk and have a working setup which I find clumsy. How can I clean things up to make the dialplan easier to maintain? My problem =========I have 6 public numbers that can reach 6 individual users. I have 6 lines like this in sip.conf: [general] register => 31307115622:secret@belcentrale-incoming/622 .... register => 31307115627:secret@belcentrale-incoming/627 each user registers with something like this: [siemens1](xanadu-internal) type=friend callerid=Theo Band context=xanadu-thba [belcentrale-out-thba](belcentrale-outgoing) type=peer fromuser=31307115622 My extenson.conf looks like this: [xanadu-thba] exten => _+.,1,goto(00${EXTEN:1},1);00 is long distance calls => + exten => _0[1-9].,1,goto(0031${EXTEN:1},1);local calls =>0031 exten => _0031Z., 1,Macro(dialout,SIP/${EXTEN}@belcentrale-out-thba) ;NL exten => _+ZXX., 1,Macro(dialout,SIP/00${EXTEN:1}@belcentrale-out-thba);INT My dialplan contains a context like xanadu-<user> for every user, only to be able to set the fromuser correctly. This works but I prefer to have one dialplan and set some sort of variable containing the fromuser in sip.conf for every registered user. I read the entire march list (that's a lot!) and was also not able to find a proper search term that covers this question. Thanks, Theo