found out
This commit is contained in:
parent
792abdf7e5
commit
9f972dbc83
2 changed files with 12 additions and 3 deletions
|
@ -294,7 +294,7 @@ int main(int argc, char *argv[]) {
|
||||||
|
|
||||||
pjsua_transport_config_default(&cfg);
|
pjsua_transport_config_default(&cfg);
|
||||||
if (mode)
|
if (mode)
|
||||||
cfg.port = 5060;
|
cfg.port = 5160;
|
||||||
if (getenv("PJSIP_IPV6"))
|
if (getenv("PJSIP_IPV6"))
|
||||||
status = pjsua_transport_create(PJSIP_TRANSPORT_UDP6, &cfg, &transport_id);
|
status = pjsua_transport_create(PJSIP_TRANSPORT_UDP6, &cfg, &transport_id);
|
||||||
else
|
else
|
||||||
|
@ -382,6 +382,10 @@ int main(int argc, char *argv[]) {
|
||||||
char cid[11];
|
char cid[11];
|
||||||
snprintf(cid, 10, "%d", incoming);
|
snprintf(cid, 10, "%d", incoming);
|
||||||
write(atoi(argv[2]), cid, strlen(cid));
|
write(atoi(argv[2]), cid, strlen(cid));
|
||||||
|
// status = pjsua_call_answer(incoming, 200, NULL, NULL);
|
||||||
|
// if (status != PJ_SUCCESS) error_exit("Error answering call", status);
|
||||||
|
// ringing = 0;
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
nanosleep(&ts,NULL);
|
nanosleep(&ts,NULL);
|
||||||
|
|
|
@ -637,10 +637,15 @@ static int socket_start (struct modem *m)
|
||||||
char str[16];
|
char str[16];
|
||||||
snprintf(str,sizeof(str),"%d",sockets[0]);
|
snprintf(str,sizeof(str),"%d",sockets[0]);
|
||||||
close(sockets[1]);
|
close(sockets[1]);
|
||||||
if(m->hook == MODEM_HOOK_SNOOPING)
|
DBG("MODEM_HOOK at %d, MODEM_HOOK_SNOOPING=%d\n", m->hook, MODEM_HOOK_SNOOPING);
|
||||||
|
if(m->hook == MODEM_HOOK_SNOOPING) {
|
||||||
|
DBG("MODEM_HOOK_SNOOPING execl arg: %s, %s, %s\n",modem_exec,"rr",str);
|
||||||
ret = execl(modem_exec,modem_exec,"rr",str,NULL);
|
ret = execl(modem_exec,modem_exec,"rr",str,NULL);
|
||||||
else
|
}
|
||||||
|
else {
|
||||||
|
DBG("MODEM_DIAL execl arg: %s, %s, %s\n",modem_exec,m->dial_string,str);
|
||||||
ret = execl(modem_exec,modem_exec,m->dial_string,str,NULL);
|
ret = execl(modem_exec,modem_exec,m->dial_string,str,NULL);
|
||||||
|
}
|
||||||
if (ret == -1) {
|
if (ret == -1) {
|
||||||
ERR("prog: %s\n", modem_exec);
|
ERR("prog: %s\n", modem_exec);
|
||||||
perror("execl");
|
perror("execl");
|
||||||
|
|
Loading…
Reference in a new issue