I think your best bet is to set those variables as AVPs, so that their
values can persist throughout the lifetime of the INVITE transaction.
That way you can also access them in onreply_route and failure_route,
which would not be the case with user variables ($var(...)).
request_route {
# Initialise AVPs to $null or presumed default value.
$avp(call_type) = $null;
...
# When determination is made as to the call type:
if($dbr(res=>[0,0]) eq 'vm')
$avp(call_type) = 'voicemail';
}
-- Alex
On Mon, May 14, 2018 at 01:56:53PM +0000, KamDev Essa wrote:
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
_______________________________________________
Kamailio (SER) - Users Mailing List
sr-users(a)lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
--
Alex Balashov | Principal | Evariste Systems LLC
Tel: +1-706-510-6800 / +1-800-250-5920 (toll-free)
Web:
http://www.evaristesys.com/,
http://www.csrpswitch.com/