Custom dial string

Status
Not open for further replies.

dcitelecom

Member
Oct 20, 2021
138
3
18
61
Is there any way I can create a custom dial string in outbound routes, similar to what exists in Asterisk and FreePBX?

EXAMPLE:
My end user dials 15149999999 from his registered fusionpbx extension
and the custom outbound route makes a SIP call to 12121111111@mydomain.com and passes the dialled digits 15149999999 to the other system.
Please help.
 

Adrian Fretwell

Well-Known Member
Aug 13, 2017
1,498
413
83
I'm not sure that I understand your question.
You could append dialled digits to the number (internal profile used for convenience):

Code:
<extension name="bridge.15149999999" continue="false" uuid="34b6cbb9-36ec-42fb-95db-63fcc73c833f">
    <condition field="${user_exists}" expression="false"/>
    <condition field="destination_number" expression="^(15149999999)$">
        <action application="export" data="call_direction=local"/>
        <action application="unset" data="call_timeout"/>
        <action application="set" data="hangup_after_bridge=true"/>
        <action application="bridge" data="sofia/internal/12121111111$1@mydomain.com"/>
    </condition>
</extension>

or you could set a header with the dialled digits:

Code:
<extension name="bridge.15149999999" continue="false" uuid="34b6cbb9-36ec-42fb-95db-63fcc73c833f">
    <condition field="${user_exists}" expression="false"/>
    <condition field="destination_number" expression="^(15149999999)$">
        <action application="export" data="call_direction=local"/>
        <action application="unset" data="call_timeout"/>
        <action application="set" data="hangup_after_bridge=true"/>
        <action application="set" data="sip_h_X-mydigits=$1"/>
        <action application="bridge" data="sofia/internal/12121111111@mydomain.com"/>
    </condition>
</extension>
 
  • Like
Reactions: dcitelecom
Status
Not open for further replies.