X-Git-Url: http://git.eversberg.eu/gitweb.cgi?p=lcr.git;a=blobdiff_plain;f=sip.cpp;h=20e4ecebf523f2552fa3343f66d9144ebe3102b4;hp=48ce05d353941b212e78a8539b2eed554bf2f254;hb=1e778230b935453d1183d8a457438221030dd5ee;hpb=d928442c511fbe7a0d0d0f9e701412b9b494457c diff --git a/sip.cpp b/sip.cpp index 48ce05d..20e4ece 100644 --- a/sip.cpp +++ b/sip.cpp @@ -868,6 +868,7 @@ int Psip::message_setup(unsigned int epoint_id, int message_id, union parameter PDEBUG(DEBUG_SIP, "remote ip %08x port %d\n", p_s_rtp_ip_remote, p_s_rtp_port_remote); } else { PDEBUG(DEBUG_SIP, "RTP info not given by remote, so we do our own RTP\n"); + p_s_rtp_bridge = 0; p_s_rtp_payload_type = (options.law=='a') ? RTP_PT_ALAW : RTP_PT_ULAW; /* open local RTP peer (if not bridging) */ @@ -1160,6 +1161,13 @@ void Psip::i_invite(int status, char const *phrase, nua_t *nua, nua_magic_t *mag class Endpoint *epoint; struct lcr_msg *message; uint8_t payload_type; + struct interface *interface; + + interface = getinterfacebyname(inst->interface_name); + if (!interface) { + PERROR("Cannot find interface %s.\n", inst->interface_name); + return; + } if (sip->sip_from && sip->sip_from->a_url) from = sip->sip_from->a_url->url_user; @@ -1250,8 +1258,7 @@ void Psip::i_invite(int status, char const *phrase, nua_t *nua, nua_magic_t *mag FATAL("Incoming call but already got an endpoint.\n"); if (!(epoint = new Endpoint(p_serial, 0))) FATAL("No memory for Endpoint instance\n"); - if (!(epoint->ep_app = new DEFAULT_ENDPOINT_APP(epoint, 0))) //incoming - FATAL("No memory for Endpoint Application instance\n"); + epoint->ep_app = new_endpointapp(epoint, 0, interface->app); //incoming epointlist_new(epoint->ep_serial); /* send trying (proceeding) */