You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Can some, please, clarify/help with workflow on the following script:
Let's assume I have RTP stream on a local device, and what I'm trying to accomplish is to place a call from asterisk (I've got sip identity with credentials) using drachtio-srf and use that RTP stream as an audio for the initiated call.
I'm assuming I should you UAC from srf instance, and I'm building local SDP for it but the call seems to be dropping
my test code (which is not working) is
let uac = srf.createUAC(`sip:${requstedPhone}@${asteriskHost}`, {
noAck: true,
headers: {
From: `sip:${myAsteriskIdUser}@${asteriskHost}`,
"User-Agent": "drachtio-srf",
},
auth: {
username: myAsteriskIdUser,
password: myAsteriskIdPass,
},
}).then(async (obj) => {
console.log(`received sdp offer ${obj.sdp} from B party`);
// get local rtp stream meta
let ip, port, pType;
// SDP to send back to the peer
let sdp =
"v=0\r\n" +
"o=sip2ab " + new Date().getTime() + " 1 IN IP4 1.1.1.1\r\n" +
"s=-\r\n" +
"t=0 0\r\n" +
"m=audio " + port + " RTP/AVP " + pType + "\r\n" +
"c=IN IP4 " + ip + "\r\n" +
"a=rtpmap:" + pType + " opus/48000/2\r\n" +
"a=fmtp:" + pType + " maxplaybackrate=48000;stereo=1\r\n";
return obj.ack(sdp);
}).then((dialog) => {
dialog.on("destroy", async () => {
console.log("called party ended call");
});
});
thank you in advance!
The text was updated successfully, but these errors were encountered:
now I'm thinking I'm doing it wrong (obviously, as it's now working :-) )
as I wan't to be able to place a call to my phone number from asterisk using my sip id/credentials
so there in no such thing sip:${requstedPhone}@${asteriskHost}
Nope it's not working :(
I'll get you a sip trace for sure
meanwhile I've added some logging to my code, and getting that after I've got dialog in my hand and destroy handler is called
Hello guys!
Can some, please, clarify/help with workflow on the following script:
Let's assume I have RTP stream on a local device, and what I'm trying to accomplish is to place a call from asterisk (I've got sip identity with credentials) using drachtio-srf and use that RTP stream as an audio for the initiated call.
I'm assuming I should you UAC from srf instance, and I'm building local SDP for it but the call seems to be dropping
my test code (which is not working) is
thank you in advance!
The text was updated successfully, but these errors were encountered: