Modify CID before every inbound route


i need to modify the CID before every inbound route for a certain trunk.

How is that possible?
Creating many Custom Contexts is NOT an option.

same => n,ExecIf($["${CALLERID(num):0:3}" = "+49"]?Set(CALLERID(num)=$[0${CALLERID(num):3}]))
same => n,ExecIf($["${CALLERID(num):0:1}" = "+"]?Set(CALLERID(num)=$[00${CALLERID(num):1}]))

Thank you

You can use the CID modifier.

How would the CID be able to either Change +49 to 0 and + to 00.

Still, would be handy sometimes if we would be able so set some custom code before the incoming routes.




You can put the trunk in a custom COS and run your own dialplan there.

Also, this would be another great example where Dynamic Destinations would be useful.

CID modifier not possible since we don’t know how the CID is. So it would need to check for both (+49 and 00). Sometimes number only has one 0.
That is why i asked how to run custom code before any inbound Route.

Can you tell me more? Tried that with Dial Restrictions but this is not working INBOUND.

Remember: goal is to it for the whole trunk. Not for every inbound route itself.

Sure, wishlist for dynamic destination sounds good. But again. This would be needed for every inbound-route then. I need it for the whole trunk.
You can still open that wish.

Thank you!

Put the trunk in a custom COS with a custom dialing restrictions. In that dialing restrictions add a custom context, then in the conf file, write a custom dialplan that does a DumpChan. Reload asterisk and see if it gets hit.

i tried that before. Its doing nothing on inbound routes. Its called dialing restrictions. Maybe that’s why its not working on inbound.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.