06-09-2009 12:25 AM - edited 08-29-2017 08:41 AM
This documents aims to provide detailed SIP CVP comprehensive Call Flow with the debugs captured from the CVP logs and IOS/VXML Gateways
The setup is very simple to demonstrate the SIP call flow.
Following script is being used (Notice that Microapps are being used and no Call Studio script is being used in this setup)
Call comes in and hit Start
In the following section the details will be discussed step by step
PSTNph---PSTN----Ingress-gw----->CUPS
Call matches an incoming pots dial-peer for the destination number. It is important to configure cvp-survivability service under the POTS dial-peer. If this service is not configured on the incoming pots dial-peer, the ingress gateway will not be able to communicate with the CVP Call Server and might receive “SIP/2.0 503 Service Unavailable” message from the CVP Call Server.
dial-peer voice 1 pots
service cvp-survivability
incominca-called-number 5417641400
direct-inward-dial
In the event of some critical CVP application failure, survivability.tcl script will attempt to recover and smoothly disconnect the caller after playing critical_error.wav file from Ingress-GW’s flash. It is very important to have this script because this script also plays pleasewait.wav and holdmusic.wav files from flash depending on situation.
dial-peer voice 1400 voip
translation-profile incoming block
preference 1
max-conn 2
destination-pattern 5417641400
session protocol sipv2
session target ipv4:10.4.33.97 ## CUPS SIP PROXY SERVER IP ADDRESS
dtmf-relay rtp-nte
codec g711ulaw
ip qos dscp cs3 signaling
no vad
Destination VP Server IP Address Priority Weight Protocol
5417641400 10.4.33.131 5060 1 1 UDP
5417641400 10.4.33.132 5060 1 1 UDP
5417641400 10.4.33.133 5060 1 1 UDP
Call lands to the CVP Call SERVER and in the CVP Call Server log you could see following
[CVP Server Logs]
3052: 10.4.33.131: Mar 13 2008 14:34:39.703 -0700: %CVP_7_0_ICM-7-CALL: {Thrd=Pool:ICM[1450]}
CALLGUID = 8B82AD85F07B11DC80250013192D1650, DLGID = 21 [SIP_LEG] - Publishing ,,
[ICM_NEW_CALL],dialogueId=21, sendSeqNo=1,trunkGroupId=100,trunkNumber=0,serviceId=1,
dialedNumber=5417641400,uui=,, LEGID = 8C1C7CEE-F07B11DC-8177F66C-9B680D18,DNIS = 5417641400,ANI = 4085274003
CVP Server sends the call to CUICM via VRU PG. Notice that we didn't configure the IP address of the CUICM or the VRU-PG in the CVP Call Server. CVP Call Server automatically sends the information to the CUICM's VRU-PG, because during the CUICM configuration, we had already specified the IP addresses of our CVP Call Servers. The VRU PG will connect to the ICM Service on the CVP Call Server. Once that TCP socket is established, the CVP acting as the routing client functionality becomes active in ICM and CVP will communicate with ICM/PG over that socket.
When call arrives at CUICM, it causes Unified ICM to run a routing script. In the routing script there is a node called SendToVRU node (Remember: VRU in our case is VXML-GW and SendToVRU node is added right after setting the basic variables). The SendToVRU is what triggers ICM to transfer the call to the VXML GW (which is the VRU). The routing script will typically initiate a transfer of the call to a VoiceXML Gateway port (due to SendToVRU node) via the SIP Service. You could see following in the router process windows on the CUICM Server
[CUICME Router Logs]
14:51:07 Trace: CT_SL_Timer(56)(Init): CT(5000,PreSales_CT), Threshold(20 + 2).
14:51:07 Trace: Correlation id for dialog (23 x 0 : 0 0) is (44).
14:51:07 Trace: Dialog (23 x 44 : 0 0) transfer label = 5417641401
As you can see from above that ICM returns a VRU label 5417641401+correlation-id (44) back to CVP Call Server (Remember CVP Server was the routing-client).You can see the same information on the CVP Call Server logs that a call goes to ICM and ICM returns a label back to the CVP Call Server (Which is the routing-client for ICM). This correlation-id (which is 44 in our case ) will be appended at the end of the label.
[CVP Call Server Logs]
3053: 10.4.33.131: Mar 13 2008 14:34:39.718 -0700: %CVP_7_0_ICM-7-CALL: {Thrd=Pool:ICM[1451]}
CALLGUID = 8B82AD85F07B11DC80250013192D1650, DLGID = 21 [SIP_LEG] - Processing ,,
[ICM_TEMPORARY_CONNECT], dialogueId=21,sendSeqNo=1, label=5417641401, correlationId=44,,
LEGID = 8C1C7CEE-F07B11DC-8177F66C-9B680D18, DNIS = 5417641400, ANI = 4085274003
Now CVP Call Server will send this VRU label (5417641401+44) to the VXML GW (It is more accurate to say that CVP transfers the call TO the VXML GW, with the label+correlation ID as the destination phone number). In our case, it is only coincidence that the VXML GW is the same as the ingress GW. The “transfer” that CVP does is not a typical one either, because CVP stays in the call path (whereas usually the transferor drops out of the call path).
In reality CVP is setting up a NEW call to the VXML GW and is shuffling the SDP from the ingress GW to the VXML GW in order to connect the media directly (similar to CUCM or CUBE in flow-around mode). CVP stays in the signaling path so that it can retain call control.
[VXML-GW Debugs]
debug voip application vxml
calling Number=sip:4085274003@10.4.33.131:5060,(Calling Name=)(TON=National, NPI=ISDN,
Screening=User, Passed, Presentation=Allowed),
Called Number=sip:541764140144@10.4.33.1:5060;transport=tcp(TON=Unknown, NPI=Unknown)
This label matches 1401 voip dial-peer in the VXML-GW and invokes bootstrap VXML application.
dial-peer voice 1401 voip
translation-profile incoming block
service bootstrap
session protocol sipv2
incoming called-number 5417641401T ## T is used to match the correlation-id
dtmf-relay rtp-nte
codec g711ulaw
ip qos dscp cs3 signaling
no vad
The bootstrap VXML application tells the CVP that it is a new call and CVP then sends the same label (5417641401+44) back to ICM. Once ICM sees its own generated label, this actually completes the loop and ICM at this point knows that there is a VXML Gateway ready to accept the instructions.
The steps below are the RunExternalScript nodes that tell CVP what VXML pages to send to the VXML gateway (play prompt, get digits, etc). CUICM execute the script instruction called “RunExternalScript”. This basically tells CVP that IVR related instructions are coming. CUICM then sends instructions like for example “Get4Digits”. CVP sends this instruction to VXML-GW to play the prompt to the caller. When caller enters the digit, ICM stores it in its variable [for example Call.CallerEnteredDigits variable].
[VXML-GW Debugs]
063686: Mar 13 18:25:14.383 PST: //404/vapp_digit_collection_done: digits [5432], status [0], pattern [v0]
063687: Mar 13 18:25:14.383 PST: //404/vxml_digit_collection_done:
vxmlp 6A6D1EA4 status 0 async_status 200000000
063688: Mar 13 18:25:14.383 PST: //404/vxml_digit_collection_done: digits (5432)
ICM Script then instructs CVP to play the prompts back to the user on the PSTN side. For simplicity we can say that in order to do that CVP makes an inbound call to the VXML gateway by dialing 987654 and plays the prompt. But in reality we wouldn’t say that CVP makes an inbound call to the VXML gateway (since that already happened above). The 987654 is actually a transfer instruction that was received via VXML from CVP, the only reason it exists is because it is a workaround for some problem with playing media files and retaining the vxml session.
[VXML-GW DEBUGS]
063767: Mar 13 18:25:14.407 PST: //404/vxml_item_attrs_proc:
name=mycall
URI(abs):phone://987654
scheme=phone
host=987654 bridge=1 connecttimeout=0 maxtime=0 desttype=-1 destplan=-1
anitype=-1 aniplan=-1 anipi=-1, anisi=-1 rdntype=-1 rdnplan=-1 rdnpi=-1, rdnsi=-1, redirectreason=-1
063779: Mar 13 18:25:14.407 PST: //404/vapp_media_play: prompt=http://10.4.33.130/en-us/sys/5.wav:
063780: Mar 13 18:25:14.407 PST: //404/vapp_media_play: prompt=http://10.4.33.130/en-us/sys/4.wav:
063781: Mar 13 18:25:14.407 PST: //404/vapp_media_play: prompt=http://10.4.33.130/en-us/sys/3.wav:
063782: Mar 13 18:25:14.407 PST: //404/vapp_media_play: prompt=http://10.4.33.130/en-us/sys/2.wav:
dial-peer voice 9191 voip
service ringtone
incoming called-number 91919191
dtmf-relay rtp-nte h245-signal h245-alphanumeric
codec g711ulaw
session protocol sipv2
no vad
!
dial-peer voice 9292 voip
service cvperror
incoming called-number 92929292
dtmf-relay rtp-nte h245-signal h245-alphanumeric
codec g711ulaw
session protocol sipv2
no vad
[Debugs VXM GW]
062151: Mar 13 18:14:12.483 PST: //383/tcl_MediaObjCmd: media play leg_incoming flash:ringback.wav
062152: Mar 13 18:14:12.483 PST: //383/tcl_MediaPlayObjCmd: play leg_incoming flash:ringback.wav
NOTE: Ignore the timestamp in the debug messages. These debugs were captured by making multiple calls over a period of time
The script extracts required parameters and then hands off the call to the boot strap VXML service named "new-call" which loads the bootstrap.vxml file. This VXML page then submits a new call HTTP request to the Customer Voice Portal (CVP) IVR Service which kicks off a sequence of VXML communications between the VXML Gateway and the CVP IVR Service, commonly called "MicroApps". For SIP calls, this script extracts Call GUID, Call Server URL, and DNIS. Call Server host is extracted from the App-Info header. For H.323 calls, Call GUID and DNIS are extracted. Call Server is also extracted from the call data. For both SIP and H.323 calls, the Call GUID is normalized in base16, 35 char length hex format as follows(not base10, 43 char length):
HHHHHHHH-HHHHHHHH-HHHHHHHH-HHHHHHHH
The VXML-GW sends a new call request to the Customer Voice Portal (CVP) IVR Service which kicks off a sequence of VXML communications between the VXML Gateway and the CVP IVR Service, commonly called “MicroApps”. Any HTTP errors, or fetch errors (7 second timeout), will handoff to recovery.vxml in flash and handoff.tcl in flash.
Handoff.tcl has the sole job of disconnecting a call with a code an ISDN Q.850 code of 38.
This service should be placed on the ingress-gw on the incoming pots dial-peer that is destined for CVP. In the event of critical CVP application errors or a WAN failure that would normally disconnect the caller, this script allows the gateway to attempt a transfer to some alternate location after the failure occurs instead of disconnecting the caller. In the event that the call cannot be transfered to an alternate agent, the script will play a "call-back-later" message and disconnect.
Greetings! This is a great document, it breaks up the call flow and explains well...
I found a typo in the first step, "Call Comes in from the PSTN".
incominca-called-number
I think it should be
incoming-called-number.
Kindly look into it. Thanks, G'day!
Excellent.
Fantastic explanation of the black magic performed by ICM. I have asked numerous ICM engineers to explain the call flow involved with an inbound ICM call and have yet to receive such a good explanation. Thank you very much for the time you have invested in this document as it is a great knowledge transfer tool.
On this Section "Call Comes in from the PSTN " you mentioned.
If this service is not configured on the incoming pots dial-peer, the ingress gateway will not be able to communicate with the CVP Call Server and might receive “SIP/2.0 503 Service Unavailable” message from the CVP Call Server.
My concern is as follows,
The rest of the call flow was awesome...
Keep posting more documents like this....
Outstanding document!
Could you let me know what is that debug commands to check?
Thanks,
Lajith
Hi
We are doing a PCCE impl. Should we add a dial peer from voice gateway[ingress+vxml] towards cucm. I did not understand if this was needed
Hi,
Should we add a dial peer matching all agent extensions towards cucm from ingress gateway
Try, debug vxml application and debug vxml trace.
Regards,
Rudra
Hi,
How ICM will know to run specific routing scripts? If there are many routing scripts on ICM.
Through DNIS, in above case its 5417641400. In ICM DNIS will be mapped to a call type and script will be scheduled for the call type.
DNIS-->Call Type--> Script.
Regards,
Sadashiv
He given great document and single typo is nothing ..you found typo and again you also wrote the wrong command
It should be incoming called-number .
Hi,
Is this CVP survivability script supports G711alaw codec or does it support G711ulaw codec only? What will be the solution if service provider supports G711alaw codec only on SIP Trunk?
Regards
Manish
Outstanding document!
Nice Docs
Its Great Notes and call flow is very easy understand and
can please send some troubleshooting documents for mohdsf159@gmail.com
so that i can read further
Find answers to your questions by entering keywords or phrases in the Search bar above. New here? Use these resources to familiarize yourself with the community: