PSTN Call is not working over opensip instalaltion - sip

we have already installed opensip over asterisk but i want to move PSTN calls over asterisk .
Opensip working veru fine in extension to extension call . But i want The Public Switched Telephone Network (PSTN) over asterisk server.

Related

kamailio - modify URI of incoming INVITE

is it possible to redirect all incoming calls to one specific sip account? I already did this with Asterisk adding line
exten => _[1-9]XXX,1,DIAL(SIP/3000)
to extentions.conf and now I am looking for the way how to do the same in Kamailio. But I am not experienced in Kamailio and I am not sure how to accomplish this goal. Should I modify Routing Logic section in kamailio.cfg or should I use some module like dialplan.so, uac.so or some similar one?
I am using Kamailio 5.4.4 and MariaDB 10.3.
I would appreciate any help
Thank you
Update 1: I tried to use module uac.so and function uac_replace_to.
In Global parameter section, I loaded module using modparam ("rr", "append_fromtag", 1) and loadmodule "uac.so".
In Routing Logic, I modified
if (is_method("INVITE")) {
setflag(FLT_ACC);
}
to
if (is_method("INVITE")) {
uac_replace_to("","sip:3000#192.168.20.199");
setflag(FLT_ACC);
}
But it's not working.
Sure it is possible
see sample kamailio file
https://github.com/kamailio/kamailio/blob/master/etc/kamailio.cfg
in route PSTN near line 938
If you need forward to account registered on kamailio, see route LOCATION
Unfortanly kamailio is not asterisk and you need do handling for all other sip messages too.

Twilio Recording Ongoing call

I have to achieve below functionality using twilio recording and gathering API. I am struggling to achieve the exact goal can any one please help.
Steps :
1 - Agent will be on an existing call with customer.
2 - Agent dial twilio number for recording twilio should ask verification code.
3 - Agent will merge the existing call with twilio call.
4 - Agent will enter verification code.
5 - Twilio should accept call if verification code is valid and start recording existing merge call.
6 - Agent will stop call as soon as agent stops/disconnects call recording will be received by callback from twilio.
I am trying to initiate call using twilio call forward with security code when there is ongoing call between two cells.. e.g. I am dialing +91976693XXXX from my cell +91866835XXXX and we both on call.. Then we are dialing the twilio number "+1 813-501-XXXX " added webhook which returning the response Twiml :
<Response>
<Gather action='http://example.com/Modules/DisputeSuite/Customers/ValidatePin.aspx' numDigits='4'>
<Say>Please enter valid pin.</Say>
</Gather>
</Response> on Action page if pin is correct i am sending response Twiml to initiate call : <Response>
<Dial record='record-from-ringing-dual' recordingStatusCallback='http://example.com/Modules/DisputeSuite/Customers/ConferenceResponce.aspx'><Number>+91976693XXXX</Number></Dial>
</Response>
All is working fine if i enter pin and then merge the call. But if i merge call first and then trying to enter pin then is not forwarding pin to action page. Please help to resolve the issue. Thank you

get status of SIP invite of Freeswitch

I am new to Freeswitch.
I have successfully connected two FSs. First FS redirects to second FS.
Now I would like to get the information about the SIP invite; whether it is received at 2nd FS or not programmatically, when call is made to 1st FS. I am open to scripting option as well apart from configuring the xml files.
You can write script which will listen for channel states on ESL interface of second Freeswitch, when call will hit extension of it you should get CHANNEL_CREATE event:
https://wiki.freeswitch.org/wiki/Event_List#Channel_events
More about ESL:
https://freeswitch.org/confluence/display/FREESWITCH/mod_event_socket

Not receiving webhook callbacks from PayPal

I have a sinatra app which is set up like this:
class AppName < Sinatra::Base
#...
post '/paypalhook' do
puts "got info about something from paypal"
puts params.inspect
return params.to_s
end
#...
end
Now, when I create my own POSTs to this url, it works. However, when I go into webhooks simulator on PayPal, I never receive anything. What am I doing wrong? Why isn't this simple thing working?
Notes:
The webserver is hosted with custom .com domain. It is set up with SSL termination in nginx (aka. It uses https), and routed through cloudflare.
Just tried it, it's working for me. Can you try again and make sure you select an event type.

How can I connect with strophejs using an email address as a user name.

I am able to connect successfully to Open fire using strophe, unfortunately, when a users username is in the format of an email, the connection incorrectly uses everything that is after the first # symbol as the domain. Then the connection does not work.
Is this a bug or is this something that can be done differently (e.g by using some format to specify the domain some other way).
Thanks
Call Strophe.escapeNode(string to escape) before sending the username/jid to the server.
var jid = Strophe.escapeNode(foo#domain.com) + '#jabberserver.com';