how to use rdnis ?

Status
Not open for further replies.

licho

New Member
Jan 25, 2017
5
0
1
50
Hi ,
how to use rdnis with dialplan?
New variable with FreeSwicht $(rdnis) in dialplan manager? I need it for voicemail and trunk with Cisco CCM. FusionPbx is only voicemail box. So i have trunk to Cisco an Route pattern. Clients call voicemail and from trunk is only destination number collected but i need rdnis.

Thanks.
 

licho

New Member
Jan 25, 2017
5
0
1
50
Hi again,
$(rdnis) just not work. I get partialy succes with $(sip_h_Diversion)
So i make inbound route with export :
action bridge_export ${sip_h_Diversion}
but exported string is sip:xxx@xxxxx:reason no answer. from there i need to export only called string sip:(%d+)@and set it as voicemail_id.
I set new varable ${rdn} in inbound route
action set ${rdn}=${sip_h_Diversion}
and try to strip only called string.
action set ${rdn}=string.find ( ${rdn}, "sip:(%d+)@" )
but no succes :(
Someone with idea?
 

DigitalDaz

Administrator
Staff member
Sep 29, 2016
3,044
565
113
If you are just using it for voicemail, why not grab the voicemail id and transfer to *99voicemail_id xml domain
 

licho

New Member
Jan 25, 2017
5
0
1
50
Well i have VoipGW->CUCM->FusionPBX.
Have a trunk CUCM->FusionPBX
VoicemailProfil with number e.g 1100.
Route Pattern 1100 -->FusionPBx Trunk.
Intern Clients with XXX numbering plan.
FusionPBX with same XXX numbering plan
So Inbound call from outside 0012345 destined to insid 00123XXX
XXX is intern. CUCM routet to XXX. XXX didnt answer. VoicemailProfil call 1100.Route Pattern send call to FusionPBX trunk.

FusionPBX see inbound call from CUCM trunk to profile external exten 1100.
I cant export RDNIS to route to XXX Voicemailbox.
I see in SIP Trace DIversion Header:
Contact: <sip:0012345@10.40.252.201:5062>
Diversion: <sip:XXX@10.40.252.201>;reason=no-answer

I cant export RDNIS - may be b. profile ist external.
After transfer from internal i see RDNIS but with 1100:

So i need to export and manipulate Diversion: sip:XXX
${sip_h_Diversion} and transfer it to Dialplan.
With FusionPBX Dialplan Manager :) O)

"f you are just using it for voicemail, why not grab the voicemail id and transfer to *99voicemail_id xml domain"

Well i think this will work too but FusionPBX must see CUCM calls als intern.
I need to disable auth. and firewall. What ab. security then.
 

DigitalDaz

Administrator
Staff member
Sep 29, 2016
3,044
565
113
I think if you are just using it purely for voicemail, you may well be just better using a raw freeswitch, you would probably find it much easier to customise.
 

licho

New Member
Jan 25, 2017
5
0
1
50
Hi all,
short how to use Diversion Header variable (sip_h_Diversion)or RDNIS inbound with FusionPBX as Voicemail Box only (web interface configuration(dialplan manager).
First my Voip network..

CiscoXXX---> Cisco Call manager--->Fusionpbx Voicemail.
Configuration SIP trunk Cisco Call Manager --->FusionPBX.
Cisco Call manager configuration Voicemail profil exten 1110 Cisco Call manager.
Configuration Route pattern 1110 to --->FusionPBX trunk
Fusion PBX standart instalation, standart setings.
Email configuration extensions,users, etc.
Create two inbound routes in web interface.
First route with number 1 - incoming calls from Sofia extern destinet to exsisting users .

1. condition network_addr (Ip address from Cisco Call Manager)
2. condition ${sip_h_Diversion} ^(?:<sip:)?(\d+)(?:mad:.+)?$"
3. action export ${DP_MATCH[1]}
4. action multiset sip_to_user=${DP_MATCH[1]} sip_req_user=${DP_MATCH[1]} destination_number=${DP_MATCH[1]} sip_req_uri=${DP_MATCH[1]}@XXX (XXX what for domain is)
5. action info (no need for routing but for debug)
7. action transfer $1 XML XXXX (XXXX what for domain is)

Second route - calls from users intern Voicemailbox check.

1. condition destination_number ^(1110)$

2. action transfer *98 XML XXX (XXX what for domain is)

That is.
Bye
 

licho

New Member
Jan 25, 2017
5
0
1
50
Code:
Route1 Order 1 continue= false




1.condition  network_addr     xxx.xxx.xxx.xxx

2.condition ${sip_h_Diversion}   ^(?:<sip:)?(\d+)(?:@.+)?$"

3.action     export     ${DP_MATCH[1]}

4.action multiset sip_to_user=${DP_MATCH[1]} sip_req_user=${DP_MATCH[1]} destination_number=${DP_MATCH[1]} sip_req_uri=${DP_MATCH[1]}@domain name

5.action     info         

6. action     transfer     $1 XML domain name




Route 2 Order 2 continue= false


1. condition     destination_number     ^(1110)$         

2. action     transfer     *98 XML domain name
 
Status
Not open for further replies.