cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
475
Views
5
Helpful
14
Replies

VGW Translations and Dial-Peer Selection

j.a.m.e.s
Level 3
Level 3

Can a translation-profile applied on an incoming DP influence the match of an outgoing DP?

My use case is a CUCM sending SIP INVITEs with 8 digits in the To field, but I would like to configure the outgoing POTS dial-peers using an E164 destination-pattern. The idea is to expand the incoming DNIS to E164 then use this to match the outgoing POTS dial-peer. 

Unfortunately this doesn't work and i think outgoing DP is getting matched before the incoming translation-profile is applied.

 

! Intended call flow: CUCM SIP -> DialPeer1 -> Translation TP-ToE164 -> DialPeer200
dial-peer voice 1 voip
 description IN/OUT: CUCM
 incoming uri via 1
 destination-pattern .T
 translation-profile incoming TP-ToE164
 session protocol sipv2
 session server-group 1
 voice-class codec 1
 voice-class sip options-keepalive profile 1
 voice-class sip bind control source-interface Loopback1
 voice-class sip bind media source-interface Loopback1
 dtmf-relay rtp-nte
 no vad
exit
!
dial-peer voice 200 pots
 description To Fax Machine
 destination-pattern +4412345678
 port 0/1/0
exit
!
voice translation-profile TP-ToE164
 translate calling 1
 translate called 1   <- Should translate DNIS up to E164
exit
voice translation-rule 1
 rule 1 /^\(123456..\)$/ /+44\1/
exit

 

14 Replies 14

b.winter
VIP
VIP

Incoming Translations are applied, before outgoing dial-peer matching is done. Otherwise, it wouldn't make sense at all.

Maybe your config is not correct.

Can you post the output of a test call with the following debugs enabled:
debug voice ccapi ind 1
debug voice ccapi ind 2
debug voice ccapi ind 74
debug voice translation
debug ccsip messages

Without the context of an actual call, the config is as good as bad ...

I had a config with a bunch of E164-formatted numbers that were matched after translation, and I couldn't get them to match until I put a $ at the end of the string. So try changing the dial-peer to "destination-pattern +4412345678$"

Let us know what happens.

Maren

-----------------

Just for reference, I am including one of my all time favorite graphics from a Cisco class with the order of operations on digit manipulation on a router. I have this posted in my office for reference and look at it anytime I'm thinking about the topic.

Digit Manipulation Order.jpg

Not very likely, but it could be because you use the same dial peer as inbound as you use for outbound. I would recommend you to split it into two dial peers with something like this.

 

dial-peer voice 1 voip
 description IN: CUCM
 incoming uri via 1
 no destination-pattern .T
 translation-profile incoming TP-ToE164
 session protocol sipv2
 no session server-group 1
 voice-class codec 1
 no voice-class sip options-keepalive profile 1
 voice-class sip bind control source-interface Loopback1
 voice-class sip bind media source-interface Loopback1
 dtmf-relay rtp-nte sip-kpml
 no vad
!
dial-peer voice 2 voip
 description OUT: CUCM
 destination-pattern +T
 session protocol sipv2
 session server-group 1
 voice-class codec 1
 voice-class sip options-keepalive profile 1
 voice-class sip bind control source-interface Loopback1
 voice-class sip bind media source-interface Loopback1
 dtmf-relay rtp-nte sip-kpml
 no vad 

 

In general it’s a bad idea to use .T as a match on a dial peer as that opens up for call loop situations and that should be avoided at all cost. Can you not be a little more specific in the destination pattern towards CM? For example use an e164 dial plan map instead of a destination pattern on the dial peer as that gives you a better option to be more specific and have multiple different destinations.



Response Signature


The specific dial-peer match he is looking for is the one to the Fax dial-peer 200. -- Maren

Saw that after my post. However I still recommend to not use the same DP for both directions, it's a messy thing to do IMHO.



Response Signature


I've tried splitting the VOIP DPs as you suggest, but didn't see any change.

j.a.m.e.s
Level 3
Level 3

I've tried updating the destination-pattern to end with a $, but still no luck. Here is a summary of the debug (had to edit to avoid disclosing real E164 etc). Strange that the translation gets applied, but still the GW responds "Not Found".


 

INVITE sip:12345678@10.27.84.4:5060 SIP/2.0
Via: SIP/2.0/TCP 10.27.138.2:5060;branch=z9hG4bK5b7e865fb2494
From: "Test Phone" <sip:0203123456@10.27.138.2>;tag=995539~393c6d97-c071-4eef-b26a-ce0c06bd0b48-49857296
To: <sip:12345678@10.27.84.4>
Date: Tue, 26 Mar 2024 17:42:29 GMT
Call-ID: 360eb600-60310905-578da-28a1b0a@10.27.138.2
Supported: 100rel,timer,resource-priority,replaces
Min-SE:  1800
User-Agent: Cisco-CUCM14
Allow: INVITE, OPTIONS, INFO, BYE, CANCEL, ACK, PRACK, UPDATE, REFER, SUBSCRIBE, NOTIFY
CSeq: 101 INVITE
Expires: 180
Allow-Events: presence
Supported: X-cisco-srtp-fallback,X-cisco-original-called
Call-Info: <urn:x-cisco-remotecc:callinfo>;x-cisco-video-traffic-class=DESKTOP;x-cisco-qos-tcl=true
Cisco-Guid: 0906933760-0000065536-0000003105-0042605322
Session-Expires:  1800
Geolocation: <cid:0203123456@10.27.138.2>;inserted-by="10.27.138.2"
P-Asserted-Identity: "Test Phone" <sip:0203123456@10.27.138.2>
Remote-Party-ID: "Test Phone" <sip:0203123456@10.27.138.2>;party=calling;screen=yes;privacy=off
Contact: <sip:0203123456@10.27.138.2:5060;transport=tcp>;video;audio;+u.sip!devicename.ccm.cisco.com="SEP247E12123456"
Max-Forwards: 69
Content-Type: multipart/mixed;boundary=uniqueBoundary
Mime-Version: 1.0
Content-Length: 2235
[...]
006711: Mar 26 17:42:30.171 GMT: //-1/360EB6000000/RXRULE/sed_subst: Successful substitution; pattern=12345678 matchPattern=^(123456..)$ replacePattern=+44\1 replaced pattern=+4412345678
[...]
006723: Mar 26 17:42:30.172 GMT: %VOICE_IEC-3-GW: C SCRIPTS: Internal Error (Incompatible protocols): IEC=1.1.47.11.23.0 on callID 3201 GUID=360EB6000001000000000C21028A1B0A
[...]
SIP/2.0 404 Not Found
Via: SIP/2.0/TCP 10.27.138.2:5060;branch=z9hG4bK5b7e865fb2494
From: "Test Phone" <sip:0203123456@10.27.138.2>;tag=995539~393c6d97-c071-4eef-b26a-ce0c06bd0b48-49857296
To: <sip:12345678@10.27.84.4>;tag=384C47E0-2642
Date: Tue, 26 Mar 2024 17:42:29 GMT
Call-ID: 360eb600-60310905-578da-28a1b0a@10.27.138.2
CSeq: 101 INVITE
Allow-Events: telephone-event
Server: Cisco-SIPGateway/IOS-17.6.6a
Reason: Q.850;cause=3
Session-ID: a3e6761fca68598a9341cab9dd1fbb11;remote=a083d85324585396be3d596e3daa461b
Content-Length: 0
[...]
9:       1w3d: //3201/360EB6000000/CUBE_VT/SIP/MISC/Matched Dialpeer: Dir:Inbound, Peer-Tag:  1
[...]
23:       1w3d: //3201/360EB6000000/CUBE_VT/SIP/FSM/Event-Action: Event = SIPSPI_EV_CC_CALL_PROCEEDING, Current State = STATE_RECD_INVITE
24:       1w3d: //3201/360EB6000000/CUBE_VT/SIP/MISC/Call Disconnect: Initiated at: 0x260070A, Originated at:0x260070B, Cause Code = 3
25:       1w3d: //3201/360EB6000000/CUBE_VT/SIP/API: cc_api_update_interface_cac_resource (0)
26:       1w3d: //3201/360EB6000000/CUBE_VT/SIP/FSM/Event-Action: Event = SIPSPI_EV_CC_CALL_DISCONNECT, Current State = STATE_RECD_INVITE
27:       1w3d: //3201/360EB6000000/CUBE_VT/SIP/FSM/SPI-State-Change: Current State = STATE_RECD_INVITE, Next State = STATE_DISCONNECTING, Current Sub-State = STATE_NONE, Next Sub-State = STATE_NONE
28:       1w3d: //3201/360EB6000000/CUBE_VT/SIP/FSM/SPI-State-Change: Current State = STATE_DISCONNECTING, Next State = STATE_DISCONNECTING, Current Sub-State = STATE_NONE, Next Sub-State = STATE_NONE
29:       1w3d: //3201/360EB6000000/CUBE_VT/SIP/Msg/ccsipDisplayMsg:
[...]

 

Also I can see the translated dial-peer and it should be a match:

vgw#sho dial-peer voice summary | in \+4412345678
200    pots  up   up             +4412345678$      0                      up   0/1/1                NA

To get a little bit more detailed information can you please enable these debugs.

  • debug ccsip message
  • debug voip ccapi inout 
  • debug voip translation 
  • debug isdn q931


Response Signature


Why don't you post the FULL output of ALL the debugs enabled, which people here tell you to enable?
You help nobody including yourself, if you just post chunks of information. We don't say just for fun to enable any random debugs.

And for the sake of this thread, it is not helpful / practical, if you post the logs directly here as a message.
Save it as a text file and upload the file.

j.a.m.e.s
Level 3
Level 3

This is a VG400-8FXS gateway running ios-xe v17.6, so there's no ISDN and that final debug command wouldn't run.

I can see a bit clearer now that the outgoing DP match is still based on the original DNIS even though the translation was successful. I suspect the Incompatible-Protocols error is just relating to attempting to hairpin the call back out to CUCM and I have sip-sip disabled.

012132: Mar 26 18:49:30.020 GMT: //-1/922A08000000/RXRULE/regxrule_profile_translate_internal: xlt_number=+4412345678xlt_type=unknown xlt_plan=unknown <-- Translation is OK
[...]
   Result=Success(0) after DP_MATCH_ORIGINATE; Incoming Dial-peer=1   <- Good. Incoming DP is correct.
012185: Mar 26 18:49:30.025 GMT: //-1/xxxxxxxxxxxx/DPM/dpMatchSafModulePlugin:
   dialstring=NULL, saf_enabled=0, saf_dndb_lookup=0, dp_result=0
012186: Mar 26 18:49:30.026 GMT: //-1/xxxxxxxxxxxx/DPM/dpAssociateIncomingPeer:exit@8014
012187: Mar 26 18:49:30.026 GMT: //-1/xxxxxxxxxxxx/DPM/dpMatchPeersCore:
   Calling Number=, Called Number=12345678, Peer Info Type=DIALPEER_INFO_SPEECH
012188: Mar 26 18:49:30.026 GMT: //-1/xxxxxxxxxxxx/DPM/dpMatchPeersCore:
   Match Rule=DP_MATCH_DEST; Called Number=12345678
012189: Mar 26 18:49:30.026 GMT: //-1/xxxxxxxxxxxx/DPM/dpMatchCore:
   Dial String=12345678, Expanded String=12345678, Calling Number=
   Timeout=TRUE, Is Incoming=FALSE, Peer Info Type=DIALPEER_INFO_SPEECH
012190: Mar 26 18:49:30.026 GMT: //-1/xxxxxxxxxxxx/DPM/MatchNextPeer:
   Result=Success(0); Outgoing Dial-peer=1 Is Matched (0 digits)
012191: Mar 26 18:49:30.026 GMT: //-1/xxxxxxxxxxxx/DPM/dpMatchPeersCore:
   Result=Success(0) after DP_MATCH_DEST
012192: Mar 26 18:49:30.026 GMT: //-1/xxxxxxxxxxxx/DPM/dpMatchSafModulePlugin:
   dialstring=23053802, saf_enabled=0, saf_dndb_lookup=1, dp_result=0
012193: Mar 26 18:49:30.026 GMT: //-1/xxxxxxxxxxxx/DPM/dpMatchPeersMoreArg:
   Result=SUCCESS(0)
   List of Matched Outgoing Dial-peer(s):
     1: Dial-peer Tag=1 <- Bad. Outgoing DP cannot be the same as the Incoming DP

 

j.a.m.e.s
Level 3
Level 3

My guess here is a bug involving the '+' symbol so I've raised a TAC case. Will report back.

Advice you to update to 17.9.5a as there are many major defects in 17.6.



Response Signature