02-16-2016 10:10 PM - edited 03-17-2019 05:55 AM
I need to add a 04 or a 09 depending on the calling number and called number.
This is because we a using a single SIP trunk for multiple area codes, so in the example of a phone that belongs in a state with a prefix of 4 and another phone in a state with a prefix of 9, when they call local numbers (ie without using area codes) i need to know when to add the 04 or 09 to the called-number. This is because the SIP provider expects area code for all called number.
Didt manuipualtion is easy, but im having difficulties on how to work out on matching against a calling number AND called number, so when to know to add the 04 or 09.
Dial-peer seems to only work on a single value - called number, answer-address or destination, not called number AND answer-address which is what i want..
Any help would be appreciated :-)
ivan.
Solved! Go to Solution.
02-17-2016 04:02 AM
Hi,
So I assume that you would like to add area code (04 or 09) depends on who is making an outbound call. Isn't it?
What you should do in that case is to first use answer-address command to match inbound dial peer, instead of using called-number. So you will be having multiple inbound dial peers with answer-address command configured as per your requirement. Once you identify the set of callers using inbound dial peer, apply translation-profile on inbound dial peer to add prefix of 04 or 09 depends on who the caller is. Once called number is manipulated, get that number matched with destination-pattern command under outbound dial peer.
Please let me know if it serves your requirement OR if you would like to get it clarified bit more.
- Vivek
02-17-2016 01:27 AM
Hi,
What is your environment, CME or CUCM?
- Vivek
02-17-2016 02:33 AM
CUCM
so I'm matching on the called number by ref 7 digits (no area code) and then I want to add 04 or 09 depending on the mask .
hope I make sense
02-17-2016 04:02 AM
Hi,
So I assume that you would like to add area code (04 or 09) depends on who is making an outbound call. Isn't it?
What you should do in that case is to first use answer-address command to match inbound dial peer, instead of using called-number. So you will be having multiple inbound dial peers with answer-address command configured as per your requirement. Once you identify the set of callers using inbound dial peer, apply translation-profile on inbound dial peer to add prefix of 04 or 09 depends on who the caller is. Once called number is manipulated, get that number matched with destination-pattern command under outbound dial peer.
Please let me know if it serves your requirement OR if you would like to get it clarified bit more.
- Vivek
02-21-2016 02:33 PM
That answers it Vivek, thanks for the response.
I did as you suggested and added either a 04 or 09 on every call, then stripped the 04 or 09 with the outdial if the user calling service numbers, international or national calls.
thanks,
Ivan.
02-21-2016 08:06 PM
Thanks Ivan for the updates.
- Vivek
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