diff --git a/opt/gemeinschaft/etc/asterisk/e-gategroups-in.ael.php b/opt/gemeinschaft/etc/asterisk/e-gategroups-in.ael.php index 0d3a48eed..0d41a5571 100755 --- a/opt/gemeinschaft/etc/asterisk/e-gategroups-in.ael.php +++ b/opt/gemeinschaft/etc/asterisk/e-gategroups-in.ael.php @@ -69,7 +69,12 @@ echo "\t\t\t\t", 'WaitExten(1);' ,"\n"; echo "\t\t\t", '}' ,"\n"; - echo "\t\t\t", 'Set(did_full=${EXTEN});' ,"\n"; + if (preg_match('/\bpbx\-network\b/i', $name)) { + // PBX Network hack + echo "\t\t\t", 'Set(did_full=${CUT(CUT(SIP_HEADER(P-Called-Party-ID),:,2),@,1)});', "\n"; + } else { + echo "\t\t\t", 'Set(did_full=${EXTEN});' ,"\n"; + } /* # hack for Sipgate.de { @@ -125,4 +130,4 @@ echo '// end of contexts for incoming calls from the gateway groups' ,"\n"; echo "\n"; -?> \ No newline at end of file +?>