From 4cf48e4e29b618ac99de96cbc46b77946f4a39fd Mon Sep 17 00:00:00 2001 From: Ramon Kania Date: Mon, 31 Aug 2015 23:36:40 +0200 Subject: [PATCH] Added PBX Network did_full hack did_full is now set to P-Called-Party-ID (first two digits removed) --- opt/gemeinschaft/etc/asterisk/e-gategroups-in.ael.php | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) 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 +?>