Hi I have two outbound dial patterns given bellow. If any user dials 01234 the calls will be placed in the trunk directly but if any user forgot to add 0 before the number then asterisk will add zero before the number.
1st One
exten => _0XXXX,1,Dial(SIP/trunk_name/${EXTEN})
same => n,Hangup
2nd One
exten => _XXXX,1,Dial(SIP/trunk_name/0${EXTEN})
same => n,Hangup
I want to combine these two dial patterns into one. Is it possible to make the 1st digit optional??
Not directly. If you can explain why it is a real problem for you, we may be able to suggest solutions to your specific problem, e.g. rewriting with Goto, more complex text processing on the right hand side, or using multiple patterns on the same priority.