I have the following call flow:
INVITE -> sip:gonzalo@sip.parzee.io -- TLS/TCP/UDP -> *KAMAILIO* - DB Lookup -> INVITE sip:gonzalo58@test.external.com;transport=tls (Phone1)
If Phone1 is Busy or No answer, I want call to go to VM. Phone1, is not registered to Kamailio, nor I'm using Realtime Integration. This Phone1 is registered to an external PBX.
Currently in sample configuration script, seems to be that value: $avp(oexten) is used to redirect to VM, but in my case this value is null. I didnt find any documentation for this.
*Questions:* a) What is $avp(oexten) ? b) What is the best way to pass a Redirect number in SIP INVITE to VoiceMail system (Asterisk or Freeswitch) c) Is there a way to configure CFNA timer per alias/uri ?
*Example*:
route[TOVOICEMAIL] {
#!ifdef WITH_VOICEMAIL
if(!is_method("INVITE|SUBSCRIBE")) return;
# check if VoiceMail server IP is defined
if (strempty($sel(cfg_get.voicemail.srv_ip))) {
xlog("SCRIPT: VoiceMail routing enabled but IP not defined\n");
return;
}
if(is_method("INVITE")) {
xdbg("SIP Request: method [$rm] from [$fu] to [$tu]\n");
xlog("VoiceMail routing enabled $avp(oexten)\n");
if($avp(oexten)==$null) return;
$ru = "sip:" + $avp(oexten) + "@" + $sel(cfg_get.voicemail.srv_ip)
+ ":" + $sel(cfg_get.voicemail.srv_port);
xlog("SCRIPT: VoiceMail to $tu\n");
} else {
if($rU==$null) return;
$ru = "sip:" + $rU + "@" + $sel(cfg_get.voicemail.srv_ip)
+ ":" + $sel(cfg_get.voicemail.srv_port);
}
route(RELAY);
exit;
#!endif
return;
}
On Sun, Nov 06, 2016 at 02:22:06AM -0800, Gonzalo Gasca Meza wrote:
Currently in sample configuration script, seems to be that value: $avp(oexten) is used to redirect to VM, but in my case this value is null. I didnt find any documentation for this.
*Questions:* a) What is $avp(oexten) ?
Whatever you want it to be. A "default/example" config has $avp(oexten) = $rU; in the LOCATION route just before the lookup (which overwrites $rU on a match).
b) What is the best way to pass a Redirect number in SIP INVITE to VoiceMail system (Asterisk or Freeswitch)
In whatever way works for you. Add a diversion header or some custom header.
c) Is there a way to configure CFNA timer per alias/uri ?
Yes, t_set_fr() lets you do that per transaction. http://kamailio.org/docs/modules/stable/modules/tm.html#tm.f.t_set_fr Store the user timeout in for example urs_preferences and query it using sqlops/avpops
Thanks Daniel
On Thu, Nov 10, 2016 at 8:04 AM, Daniel Tryba d.tryba@pocos.nl wrote:
On Sun, Nov 06, 2016 at 02:22:06AM -0800, Gonzalo Gasca Meza wrote:
Currently in sample configuration script, seems to be that value:
$avp(oexten)
is used to redirect to VM, but in my case this value is null. I didnt find any documentation for this.
*Questions:* a) What is $avp(oexten) ?
Whatever you want it to be. A "default/example" config has $avp(oexten) = $rU; in the LOCATION route just before the lookup (which overwrites $rU on a match).
b) What is the best way to pass a Redirect number in SIP INVITE to VoiceMail system (Asterisk or Freeswitch)
In whatever way works for you. Add a diversion header or some custom header.
c) Is there a way to configure CFNA timer per alias/uri ?
Yes, t_set_fr() lets you do that per transaction. http://kamailio.org/docs/modules/stable/modules/tm.html#tm.f.t_set_fr Store the user timeout in for example urs_preferences and query it using sqlops/avpops
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list sr-users@lists.sip-router.org http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users