04-18-2018 10:31 PM - edited 03-17-2019 12:39 PM
I have interesting scenario, on Incoming SIP call
If call from field has 2222 @10.X.X.X then i need to send invite to 919191@10.X.X.X
Let me know if possible
04-19-2018 02:28 AM - edited 04-19-2018 03:20 AM
Original post has been deleted
04-19-2018 02:53 AM
Will it be applicable if i want to modify TO in Invite as per Remote-Party-ID:
04-19-2018 03:20 AM
Apologies,
Using the IF logic feature of SIP profile will not work for your scenario. This can only be used to add a SIP header it cant be used to modify a header. In your Scenario you are looking for a way to modify the RURI based on a specific calling number.
04-19-2018 03:34 AM
URI dialing does not allow you to match dialpeer as per Remote iD
Do you have reference config
04-19-2018 04:22 AM
Dheeraj,
Thats your answer right there. You can use uri dialing to match an inbound dial-peer if the calling number is a certain number and you can then apply voice translation rule to change the called number.
Example below:
### Configure voice class uri to match the from field ++
voice class uri 500 sip
pattern 2222@10.x.x.x
##configure translation rule to change the called number to what you want
voice translation-rule 500
rule 1 /^\(.*\)/ /919191/
## configure dial-peer to match the calling number 2222, apply the sip uri and translation profile##
dial-peer voice xxx voip
translation-profile incoming test
session protocol sipv2
incoming uri from 500
04-19-2018 05:09 AM
In calling number Remote ID field will remain same
04-19-2018 05:13 AM
So my Remote id is 22222 and username field also remain same
Now any call coming from remote id or username should change TO field whch mean where i want to send call out.
Remote-Party-ID: <sip:22222@10.X.X.21>;party=calling;screen=no;privacy=off
--uniqueBoundary
Content-Type: application/sdp
Content-Disposition: session;handling=required
v=0
o=CiscoSystemsSIP-GW-UserAgent 2884 2524 IN IP4 172.X.X.X
s=SIP Call
c=IN IP4 0.0.0.0
t=0 0
m=audio 19994 RTP/AVP 0
a=inactive
--uniqueBoundary
Content-Type: application/x-cisco-cpa
Content-Disposition: signal;handling=optional
Events=FT,Asm,AsmT,Sit,Piano
CPAMinSilencePeriod=608
CPAAnalysisPeriod=2500
CPAMaxTimeAnalysis=3000
CPAMaxTermToneAnalysis=30000
CPAMinValidSpeechTime=112
--uniqueBoundary--
Apr 19 09:54:31.764 UTC: //-1/7DF42398B563/CCAPI/cc_api_display_ie_subfields:
cc_api_call_setup_ind_common:
cisco-username=22222
----- ccCallInfo IE subfields -----
cisco-ani=sip:7006013@10.X.X.X
cisco-anitype=0
cisco-aniplan=0
cisco-anipi=0
cisco-anisi=0
dest=sip:81040011XXX@10.X.X.X
04-19-2018 05:27 AM
04-19-2018 05:30 AM
Is your Remote-Party-Id different from your From header?
Please post your full SIP INVITE so we see what your headers look like. You cant match uri based on RAI, but ideally your From and RAI should be the same..
04-19-2018 06:54 AM
Apr 19 09:54:31.760 UTC: //-1/xxxxxxxxxxxx/SIP/Msg/ccsipDisplayMsg:
Received:
INVITE sip:81040011919XXXXXXX@10.X.X.X SIP/2.0
Via: SIP/2.0/UDP 10.X.X.X:58800;branch=z9hG4bK-d8754z-880d6463691bfe11-1---d8754z-;rport
Max-Forwards: 70
Require: 100rel
Contact: <sip:7006013@10.X.X.X:58800>
To: <sip:81040011919XXXX@10.X.X.X>
From: <sip:7006013@10.X.X.X>;tag=dc20f56d
Call-ID: f93b6c36-59036901-94543f2c-b56a0e13
CSeq: 1 INVITE
Session-Expires: 1800
Min-SE: 90
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, UPDATE, NOTIFY, PRACK, REFER, NOTIFY, OPTIONS
Content-Type: Multipart/mixed;boundary=uniqueBoundary
Supported: timer, resource-priority, replaces
User-Agent: Cisco-SIPDialer/UCCE8.0
--More--
Content-Length: 530
Remote-Party-ID: <sip:33333@10.X.X.X>;party=calling;screen=no;privacy=off
04-20-2018 02:39 AM - edited 04-20-2018 02:46 AM
Hi,
Here is what you need to do. I just tested this and it worked.
Here is the summary of what we need to do to get this to work.
++ 1. perform sip profile inbound globally to copy RPID to From header++
++2. match inbound dial-peer based on From header +++
++3. Apply translation rule to modify the called number once our inbound dial-peer is matched ++
<< Step 1 >>
++ Configure sip profile and apply it globally ++
voice class sip-profiles 10
rule 1 request INVITE sip-header Remote-Party-ID copy "sip:(.*)@.*" u01
rule 2 request INVITE sip-header From modify "sip:.*@(.*)" "sip:\u01@\1"
or ( in case your IOS does not support the above )
voice class sip-profiles 10
request INVITE sip-header Remote-Party-ID copy "sip:(.*)@.*" u01
request INVITE sip-header From modify "sip:.*@(.*)" "sip:\u01@\1"
voice service voip
sip
sip-profiles inbound
sip-profiles 10 inbound
<< Step 2 >>
++Configure voice class uri to match the from field ++
voice class uri 500 sip
pattern 33333@10.X.X.X
++ configure translation rule to change the called number to what you want ++
voice translation-rule 500
rule 1 /^\(.*\)/ /9191919/
voice translation-profile test
translate called 500
++ configure inbound dial-peer to match the calling number 3333, apply the sip uri and translation profile ++
dial-peer voice XXX voip
translation-profile incoming test
session protocol sipv2
incoming uri from 500
++ If this doesnt work please send the following debugs ++
debug voip ccapi inout
debug ccsip mess
debug ccsip info
debug ccsip feature sip-profile
debug voice translation
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide