Setup of 2 numbers in extensions_custom.conf

exten => s,1,Set(Var_TO=${SIP_HEADER(TO)})
exten => s,2,GotoIf($["${Var_TO}" = “sip:[email protected]”]?extension2,s,1:3)
exten => s,3,GotoIf($["${Var_TO}" = “sip:[email protected]”]?extension1,s,1:4)
exten => s,4,GotoIf($["${Var_TO}" = “sip:[email protected]”]?ext-group,s,1:5)
exten => h,5,Macro(hangupcall)

exten => s,1,Dial(SIP/4511)

I have 2 lines currently coming into my Trixbox CE. One XXX-XXX-0458 which is a DID line going to extension 4511 and XXX-XXX-0425 which goes to call group 600.

when I call XXX-XXX-0458 it goes to the phone with ext 4511,(this is what I want) when I call XXX-XXX-0425 I get a callcentric error saying the person I am trying to call is not avail. ( This should go to the call Group). When I change the inbound back to my call group install of the coustom both numbers ring into the call group.

I am not sure why this is. Any help you may provide would be much appreciated.

why are you comparing Var_TO to the null string 3 times in a row? It isn’t going to change, is it? Anyway, I think the 3rd one needs to be:

extent => s,4,GotoIf($["${Var_TO}" = “”]?ext-group,600,1:5)

I just entered what I was to by callcentric support, and it still was not working, I will try what you suggested tonight after hours and let you know. Thanks

you seem to have cut&pasted wrong (or they badly screwed up). from their docs you do this:

exten => s,1,Set(Var_TO=${SIP_HEADER(TO)})
exten => s,2,GotoIf($["${Var_TO}" = "<sip:[email protected]>"]?extension2,s,1:3)
exten => s,3,GotoIf($["${Var_TO}" = "<sip:[email protected]>"]?extension1,s,1:4)
exten => h,4,Macro(hangupcall)

I noticed that if I just pasted in the docs from callcentric, the second part (with sip above) shows up as blank. I edited the post to put it in a code block. You may very well have posted the right info, but it didn’t show. To do a code block, do this:


(but the backslashes should not be there, i don’t know how to post what to enter without it being changed :()

have you taken a look at some of the other posts by callcentric users?

This one might be of some help:

It would be best to take what they send to you, Convert it to a internally understandable DID and then do all the routing properly. I’ve not used them but between that link above and the one it is refering to you should be set.