Being spoiled by Freeswitch profiles and dialplans, the stock 1 piece Kamailio cfg file is cool @ first to get certain call flows knocked out but quite a maze when you get in deeper. 

Right now, using the 1 piece stock cfg file, I am faced with the fact that my carrier outbound calls started failing after I enabled VM. Basically WITH_VOICEMAIL in route LOCATION started sending the carrier calls to TOVOICEMAIL and it basically dies there. I can see the route(TOVOICEMAIL) line and can condition it out with an if but I really don't now how to differentiate between a ext to ext call or a outbound call in the cfg file. However given SQL I could. 

Is there a way for me to place custom pseudo variables in the call right @ the start and use them in the script as needed. For example I could mark the call as ext to ext or carrier bound right @ the start and dodge VM in the LOCATION route. 

KD