I need to make transfer from application in one asterisk to application on another asterisk and to pass some ID with it.
Can it be done ?
I am using asterisk 13
thanks in advance for any help
You have following options(i am assuming you are using sip)
1) Use SipAddHeader/SIP_HEADER function on other side.
http://www.voip-info.org/wiki/view/Asterisk+func+sip_header
2) Use callerid number prefix, callerid name or put it as part of DST number when calling.
3) Use jabber or SIPMessage
4) Use CURL function to fire http request/ARI or web server script on other side
Related
My system contain:
- Freeswitch server
- Sip Client: Web using sipjs , mobile react-native using https://github.com/datso/react-native-pjsip to receive call.
My problem is when call done i need to know the uuid of CDR recently add to Postgres DB of that call to attach some info to that call
I try many way but can not success ex: write http request to select into postgres DB, but can not find exactly which uuid because one extension can make many call one time.
Can anyone help me solve this case?
Mark each call with custom variable like callid
Send that to your app via any method, as sipheader, as sip message, using http post etc.
But you also can just search cdr by start date.
How do I get asterisk call Id (uniqueid in cdr table) (for instance, 1487150355.465) in sipml5 client.
As far as I looked, I see only
https://www.doubango.org/sipml5/docgen/symbols/SIPml.Session.html#getId
which has (afaic) no relation to asterisk id.
I know I can set additional headers in asterisk and set there call id, but it cannot be done for some organizational reasons.
Thanks.
Asterisk unique channel id(not call id) assigned to channel. By default asterisk not send that via sip or other protocol.
So no, you can't get it without do something on asterisk.
We have a many services in our company, each one must display a different number in his outgoing calls. We use a Asterisk SIP server.
Our SIP provider asks us to make our Asterisk server send a prefix before the outgoing number.
for exemple, for a normal call from the extension 1200, the SIP server send the number 0033123456789.
we want to make it adding a prefix for calls from each extension, for exemple :
add the prefix 400 before calls from the extension 1200 to send 40033123456789.
add the prefix 401 before calls from the extension 1201 to send 40133123456789.
... etc.
Can you help please ?
Many thanks.
Regards.
There might be several ways to achieve what you need, if calls from all extensions hit same context(context start with [some-context-name]), then you might achieve it in following way:
[some-context-name]
exten => _00X.,1,ExecIf($["${CALLERID(num)}" = "1200"]?Dial(SIP/mytrunk/400${EXTEN:2}))
exten => _00X.,1,ExecIf($["${CALLERID(num)}" = "1201"]?Dial(SIP/mytrunk/401${EXTEN:2}))
Additionally you might have separate context per extension or you might implement all of this inside AGI script.
How can I achieve the following with FreePBX 12 (and 6): I need our system to check on the fly the destination for that incoming phone call to be transferred too.
When a call comes in, the system needs to check a database table to see if there’s a record with that Caller ID, that record will also have the destination extension where that call needs to be routed too.
The database is a MySQL Table and it will consist of the following fields: id, callerid, destination_extension, created_at, updated_at
Call flow
1- answer incoming call
2- get call caller id: 876-718-7137
3- connect to mysql database
4- check if theres a record with that caller id and get the
destination extension where to route it (SELECT
destination_extension FROM callers_table WHERE caller_id =
876-718-7137) - (Returns: 1001)
5- transfer incoming from to extension 1001
Any suggestions on how to accomplish this? Thank you!
I use the Dynamic Route module to accomplish this. See:
http://www.voipsupport.it/pmwiki/pmwiki.php?n=Freepbx.DynamicRouting
There are no features like that in freepbx.
Only posibility - add all combination in inbound route in format DID/CID
You also can write custom dialplan using
http://www.voip-info.org/wiki/view/Asterisk+func+func_odbc
or
http://www.voip-info.org/wiki/view/Asterisk+RealTime
Is there a way to directly access the specific context name in asterisk dialplan while i
am using vim editor for asterisk dialplan, i could remember that some command with \ is
used but don't know what exactly that was. thanks for your help
It is forward slash to search through the file
/search-term