Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Extend sip gw username #33

Open
wants to merge 5 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 7 additions & 2 deletions opt/gemeinschaft/etc/asterisk/e-gategroups-in.ael.php
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down Expand Up @@ -125,4 +130,4 @@
echo '// end of contexts for incoming calls from the gateway groups' ,"\n";
echo "\n";

?>
?>
3 changes: 2 additions & 1 deletion opt/gemeinschaft/etc/asterisk/e-internal.ael
Original file line number Diff line number Diff line change
Expand Up @@ -1021,7 +1021,8 @@ context to-internal-users-self {

//Set(CALLERID(name)=Queue ${EXTEN});
//Set(CALLERID(name)=Q${EXTEN} ${CALLERID(name)});
SetCallerPres(allowed_passed_screen);
Set(CALLERID(name-pres)=allowed_passed_screen);
Set(CALLERID(num-pres)=allowed_passed_screen);
Set(CALLERID(name)=[${queue_displayname}] ${CALLERID(name)});
if ("${CALLERID(num)}" = "")
Set(CALLERID(num)=${EXTEN});
Expand Down
2 changes: 1 addition & 1 deletion opt/gemeinschaft/htdocs/gui/mod/routing_gws-sip.php
Original file line number Diff line number Diff line change
Expand Up @@ -311,7 +311,7 @@ function confirm_delete() {
echo '<tr class="m">',"\n";
echo '<th>', __('Benutzername') ,' <sup>[2]</sup>:</th>',"\n";
echo '<td>',"\n";
echo '<input type="text" name="gw-user" value="', htmlEnt($gw['user']) ,'" size="25" maxlength="35" style="width:97%;" />',"\n";
echo '<input type="text" name="gw-user" value="', htmlEnt($gw['user']) ,'" size="25" maxlength="50" style="width:97%;" />',"\n";
echo '</td>',"\n";
echo '<td class="transp xs gray"><code>username / fromuser@fromdomain</code></td>',"\n";
echo '</tr>',"\n";
Expand Down