switch(message_type) {
case MESSAGE_SETUP:
if (param->setup.dialinginfo.itype == INFO_ITYPE_ISDN_EXTENSION) {
- numbers = param->setup.dialinginfo.id;
- while((number = strsep(&numbers, ","))) {
- if (out_setup(epoint_id, message_type, param, number, NULL))
- return; // join destroyed
+ /* in case of keypad */
+ numbers = param->setup.dialinginfo.keypad;
+ if (numbers[0]) {
+ while((number = strsep(&numbers, ","))) {
+ if (out_setup(epoint_id, message_type, param, NULL, number))
+ return; // join destroyed
+ }
+ /* after keypad finish dialing */
+ break;
}
+ /* dialed number */
numbers = param->setup.dialinginfo.id;
while((number = strsep(&numbers, ","))) {
- if (out_setup(epoint_id, message_type, param, NULL, number))
+ if (out_setup(epoint_id, message_type, param, number, NULL))
return; // join destroyed
}
break;
memcpy(&message->param, param, sizeof(union parameter));
if (newnumber)
SCPY(message->param.setup.dialinginfo.id, newnumber);
+ else
+ message->param.setup.dialinginfo.id[0] = '\0';
if (newkeypad)
SCPY(message->param.setup.dialinginfo.keypad, newkeypad);
+ else
+ message->param.setup.dialinginfo.keypad[0] = '\0';
PDEBUG(DEBUG_JOIN, "setup message sent to ep %d with number='%s' keypad='%s'.\n", relation->epoint_id, message->param.setup.dialinginfo.id, message->param.setup.dialinginfo.keypad);
message_put(message);
return(0);