[asterisk-users] Phpagi action based on outbound call user response
Hello List, In PHPAGI, I'm using the Astrisk Manager function send_request() to originate an outbound call. I want to execute the remaining PHP code after the call gets executed (depending on user input). But presently the call originates in a different context and asterisk executes the remaining code in parallel. Is there a way in which I can pause the code execution until the call is completed. Note: I wish to return to the context from which the call was originated and continue execution. Any help is greatly appreciated. -- Thanks & Regards Rahul http://about.me/rahulr92 +919567607741 -- _ -- Bandwidth and Colocation Provided by http://www.api-digital.com -- New to Asterisk? Join us for a live introductory webinar every Thurs: http://www.asterisk.org/hello asterisk-users mailing list To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-users
Re: [asterisk-users] On SIP INVITE answering to IP:port found in Contact: header.
Matthew J. Roth wrote: Joshua Colp wrote: If you set nat=no for that specific peer it should work as you need. 'rport' is forced on these days which works for most situations, except with some platforms and Cisco phones.>_> Joshua, That sounds much easier than what I came up with, so I'd recommend to Markus that he try your suggestion first. If you have a moment, please take a look at my response and let me know if my understanding of the Contact and Via headers was correct. If it was, is the 'nat=no' solution just a way to workaround the provider's RFC-noncompliant platform? Most of your response is correct except it doesn't take into account the rport RFC. Lack of implementation of an RFC doesn't make it non-compliant, so their stuff really is fine for this scenario. It all comes down to us forcing rport to be on by default. This is now the second known platform on my list that uses a random source port for the IP header instead of the actual one. The other being, like I mentioned, older Cisco phones. Cheers, -- Joshua Colp Digium, Inc. | Senior Software Developer 445 Jan Davis Drive NW - Huntsville, AL 35806 - USA Check us out at: www.digium.com & www.asterisk.org -- _ -- Bandwidth and Colocation Provided by http://www.api-digital.com -- New to Asterisk? Join us for a live introductory webinar every Thurs: http://www.asterisk.org/hello asterisk-users mailing list To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-users
[asterisk-users] failed to extend from 512 to 676 on cli
Hello, We are using around 100 real time sip peers with phpagi. On asterisk cli, getting frequent message 'failed to extend from 512 to 676'. Once we execute 'sip reload', this message disappear for some time and then comes back. Please let us know the solution for this. asterisk version 1.6.2.9mysql 5.0server: Intel(R) Core(TM) i5-2500 CPU @ 3.30GHzRAM: 4 GB Thanks,Kamlesh -- _ -- Bandwidth and Colocation Provided by http://www.api-digital.com -- New to Asterisk? Join us for a live introductory webinar every Thurs: http://www.asterisk.org/hello asterisk-users mailing list To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-users
[asterisk-users] Caller ID is not persisted when using Channel Redirect
Is there a work around for Caller ID information not being persisted when using the CLI or AMI Channel Redirect. A calls B (caller id is displayed), B transfers call to C (no caller id is displayed on phone c). Jacob Miles Software Engineer jacob.e.mi...@l-3com.com 903.457.4422 <>-- _ -- Bandwidth and Colocation Provided by http://www.api-digital.com -- New to Asterisk? Join us for a live introductory webinar every Thurs: http://www.asterisk.org/hello asterisk-users mailing list To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-users
[asterisk-users] core console debug on single file
Hi all, I have console debugging enabled in logger.conf: console => notice,warning,error,debug Then a issue de command: core set debug 100 manager.c To see only debugging messages from AMI. But It shows nothing!!! And then if I do: core set debug 1 Then I can see managar.c debug info, BUT if lots of other debug from all other files. How to see only manager.c (or any other ONE file) debug info? (I'm using asterisk 1.8) Thanks, Gabriel -- _ -- Bandwidth and Colocation Provided by http://www.api-digital.com -- New to Asterisk? Join us for a live introductory webinar every Thurs: http://www.asterisk.org/hello asterisk-users mailing list To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-users
Re: [asterisk-users] core console debug on single file
> Hi all, > > I have console debugging enabled in logger.conf: > console => notice,warning,error,debug > > Then a issue de command: > core set debug 100 manager.c > > To see only debugging messages from AMI. > > But It shows nothing!!! > > And then if I do: > core set debug 1 > > Then I can see managar.c debug info, BUT if lots of other debug from > all other files. > > How to see only manager.c (or any other ONE file) debug info? > > > (I'm using asterisk 1.8) You cannot specify a *.c file because no debug message will match with that string. The "core set [debug|verbose]" command has not received any attention to rectify its tab completion so it supplies only *.c filename suggestions which no longer work. IIRC, this was a consequence of modules becoming more than one file. You can specify core set debug 1 core To get debug messages for the Asterisk core module. or core set debug 1 <*.so-module> To get debug messages for the loadable Asterisk *.so module. In your case since manager.c is part of core you will get debug messages from manager.c and all other files that are part of the core module. Richard -- _ -- Bandwidth and Colocation Provided by http://www.api-digital.com -- New to Asterisk? Join us for a live introductory webinar every Thurs: http://www.asterisk.org/hello asterisk-users mailing list To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-users
[asterisk-users] Users.conf vs Sip.conf
I am using asterisk 1.8.5.0 and I am curious as to the roles of sip.conf and users.conf. My understanding is to provision phones you use users.conf. Doing so creates a user, and a phone profile. With that said my understanding is that sip.conf is the prefered method for creating sip accounts since it provides more flexibility. If I could get some help/clarification/advice as to the ideal setup between the two files to: 1) create users and, 2) provision phones I would greatly appreciate it. Thanks, -Bryan Anderson -- _ -- Bandwidth and Colocation Provided by http://www.api-digital.com -- New to Asterisk? Join us for a live introductory webinar every Thurs: http://www.asterisk.org/hello asterisk-users mailing list To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-users
[asterisk-users] Asterisk with whatsapp, facebook, viber, yahoo and hotmail messanger
Hello; Is there any modules or channels or integration between asterisk and any of the following: whatsapp, facebook, viber, yahoo and hotmail messanger? Regards Bilal -- _ -- Bandwidth and Colocation Provided by http://www.api-digital.com -- New to Asterisk? Join us for a live introductory webinar every Thurs: http://www.asterisk.org/hello asterisk-users mailing list To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-users
Re: [asterisk-users] On SIP INVITE answering to IP:port found in Contact: header.
Joshua Colp wrote: > > Most of your response is correct except it doesn't take into account the > rport RFC. Lack of implementation of an RFC doesn't make it > non-compliant, so their stuff really is fine for this scenario. It all > comes down to us forcing rport to be on by default. > > This is now the second known platform on my list that uses a random > source port for the IP header instead of the actual one. The other > being, like I mentioned, older Cisco phones. Joshua, I've added RFC 3581 to my list of references. Thank you for taking the time to look at my response and provide feedback, as well as for your hard work migrating Asterisk to a new SIP stack. Regards, Matthew Roth InterMedia Marketing Solutions Software Engineer and Systems Developer-- _ -- Bandwidth and Colocation Provided by http://www.api-digital.com -- New to Asterisk? Join us for a live introductory webinar every Thurs: http://www.asterisk.org/hello asterisk-users mailing list To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-users
Re: [asterisk-users] Asterisk with whatsapp, facebook, viber, yahoo and hotmail messanger
I think facebook uses xmpp so you could use asterisk jabber or so Don't know about the rest -Original Message- From: bilal ghayyad Sender: asterisk-users-boun...@lists.digium.com Date: Wed, 17 Apr 2013 14:41:53 To: Reply-To: Asterisk Users Mailing List - Non-Commercial Discussion Subject: [asterisk-users] Asterisk with whatsapp, facebook, viber, yahoo and hotmail messanger Hello; Is there any modules or channels or integration between asterisk and any of the following: whatsapp, facebook, viber, yahoo and hotmail messanger? Regards Bilal -- _ -- Bandwidth and Colocation Provided by http://www.api-digital.com -- New to Asterisk? Join us for a live introductory webinar every Thurs: http://www.asterisk.org/hello asterisk-users mailing list To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-users -- _ -- Bandwidth and Colocation Provided by http://www.api-digital.com -- New to Asterisk? Join us for a live introductory webinar every Thurs: http://www.asterisk.org/hello asterisk-users mailing list To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-users
[asterisk-users] How to show caller number ?
Hi, I am using asterisk 11.1.0. How to display the caller number (from asterisk -rvvv terminal) in the first step of the extension (before doing any action) ? Thanks -- _ -- Bandwidth and Colocation Provided by http://www.api-digital.com -- New to Asterisk? Join us for a live introductory webinar every Thurs: http://www.asterisk.org/hello asterisk-users mailing list To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-users
Re: [asterisk-users] How to show caller number ?
On Wed, 17 Apr 2013, neo haux wrote: I am using asterisk 11.1.0. How to display the caller number (from asterisk -rvvv terminal) in the first step of the extension (before doing any action) ? Use 'verbose()' in priority 1. Note that this means whatever was at priority 1 needs to be changed to either '2' or 'n'. To display the called number, I use something like: exten = _x.,1, verbose(1,[${EXTEN}@${CONTEXT}]) (The nice thing about exten@context is that you can use your mouse to quickly select it then type 'dialplan show ' and then paste the clipboard to see the relevant section of the dialplan.) To display the caller ID, how about something like: exten = _x.,1, verbose(1,[${CALLERID(num)}@${EXTEN}@${CONTEXT}]) -- Thanks in advance, - Steve Edwards sedwa...@sedwards.com Voice: +1-760-468-3867 PST Newline Fax: +1-760-731-3000 -- _ -- Bandwidth and Colocation Provided by http://www.api-digital.com -- New to Asterisk? Join us for a live introductory webinar every Thurs: http://www.asterisk.org/hello asterisk-users mailing list To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-users
Re: [asterisk-users] On SIP INVITE answering to IP:port found in Contact: header.
Markus, I'll take another shot at answering your questions. As before, if someone more knowledgeable, like Joshua Colp, also responds please give more credibility to their remarks. > Although I have to say I don't understand what is going on exactly. :) > As can be seen below, and as Joshua suggested, nat=no removed the > "rport" in the Via: header. I'm just wondering how Asterisk now knows to > which port to send the replies to? Is it simply using 5060 because > that's the RFC default for SIP? And because there is no port specified > in the Via: header? I think you're on the right track here. From RFC 3261 [1]: Before a request is sent, the client transport MUST insert a value of the "sent-by" field into the Via header field. This field contains an IP address or host name, and port. The usage of an FQDN is RECOMMENDED. This field is used for sending responses under certain conditions, described below. If the port is absent, the default value depends on the transport. It is 5060 for UDP, TCP and SCTP, 5061 for TLS. > Would the nat=no switch also fix it in a scenario > where the remote side was sending from port 36252 but wanted the replies > on port 5061 instead of 5060? Let's use another random port, 23456, as an example to avoid the default port for TLS. In this case, I believe the 'nat=no' setting would not work because if a port isn't specified in the Via header the default port for UDP, 5060, is used. It would only work if the provider included the port in the Via header as follows: Via: SIP/2.0/UDP 1.1.1.1:23456;branch=z9hG4bK2e91efaf > Matthew, to provide you with feedback, here are the SIP headers before > and after nat=no: > > Without nat=no: > > IP 1.1.1.1.36252 > 2.2.2.2.5060: UDP, length 845 > INVITE sip:1234@2.2.2.2 SIP/2.0 > Via:SIP/2.0/UDP > 1.1.1.1;branch=z9hG4bKBroadWorks.2plg2e-2.2.2.2V5060-0-164693126-1529565735-1366128986378- > From:;tag=1529565735-1366128986378- > To:"My wife" > Call-ID:BW161626378160413-1212022685@1.1.1.1 > CSeq:164693126 INVITE > Contact: > Supported:100rel > Allow:ACK,BYE,CANCEL,INFO,INVITE,OPTIONS,PRACK,REFER,NOTIFY,UPDATE > Accept:application/media_control+xml,application/sdp,multipart/mixed > Max-Forwards:40 > Content-Type:application/sdp > Content-Length:206 > > [ ... SDP removed ... ] > > IP 2.2.2.2.5060 > 1.1.1.1.36252: UDP, length 602 > SIP/2.0 100 Trying > Via: SIP/2.0/UDP > 1.1.1.1;branch=z9hG4bKBroadWorks.2plg2e-2.2.2.2V5060-0-164693126-1529565735-1366128986378-;received=1.1.1.1;rport=36252 > From: ;tag=1529565735-1366128986378- > To: "My wife" > Call-ID: BW161626378160413-1212022685@1.1.1.1 > CSeq: 164693126 INVITE > Server: Asterisk PBX 10.7.1 > Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, > PUBLISH > Supported: replaces, timer > Contact: > Content-Length: 0 As Joshua Colp stated in another email [2], without 'nat=no' Asterisk forces rport to be on by default. From RFC 3581 [3]: The Session Initiation Protocol (SIP) operates over UDP and TCP, among others. When used with UDP, responses to requests are returned to the source address the request came from, and to the port written into the topmost Via header field value of the request. This behavior is not desirable in many cases, most notably, when the client is behind a Network Address Translator (NAT). This extension defines a new parameter for the Via header field, called "rport", that allows a client to request that the server send the response back to the source IP address and port from which the request originated. So Asterisk ignores the Via header in the INVITE, sends the response back to 1.1.1.1:36252 (the source IP address and port), and appends an rport parameter to the Via header in the response. > And with nat=no: > > The same, except for the reply: > > IP 2.2.2.2.5060 > 1.1.1.1.5060: UDP, length 588 > SIP/2.0 100 Trying > Via: SIP/2.0/UDP > 1.1.1.1;branch=z9hG4bKBroadWorks.2plg2e-2.2.2.2V5060-0-179354203-809967599-1366158308532-;received=1.1.1.1 > > That means the "rport" part is gone. The sample sip.conf for Asterisk 10 [4] has a comment stating: ; nat = no ; Use rport if the remote side says to use it. Since the provider did not say to use rport in the INVITE, Asterisk responds to the source address the request came from and to the port in the Via header. The port is absent, so Asterisk uses the default port for UDP, 5060, and sends the response back to 1.1.1.1:5060. I really hope this helps you understand the situation. I know I learned at least a thing or two writing it up. [1] http://www.ietf.org/rfc/rfc3261.txt [2] http://lists.digium.com/pipermail/asterisk-users/2013-April/278611.html [3] http://www.ietf.org/rfc/rfc3581.txt [4] http://svnview.digium.com/svn/asterisk/branches/10/configs/sip.conf.sample?revision=373665&view=markup Regards, Matthew Roth InterMedia Marketing Solutions Software Engineer and Systems Developer -- ___
Re: [asterisk-users] Transfer only, no outbound calling
Nathan, Yes, SIP.. :-) I ended up deciding to just not allow attended transfer at all since it seemed so hard to deal with. If someone really wants attended transfer they can put the call on hold, dial using the other line then transfer the call on the other line if they want the call on the other end. Same thing, just one more step. I am just going to set a var in sip.conf so when people try to dial out direct, it will catch it in the dial plan and kill the call. With blind transfer I can set a var on the way in and it's held onto nicely and I can allow the transfer based on that. Again, thanks for your detailed response. On Tue, Apr 16, 2013 at 9:59 PM, Nathan Anderson wrote: > On Tuesday, April 16, 2013 6:25 PM, Todd Routhier wrote: > > > New Problem, now operators can pick up the previous inbound only line and > > dial out to anything that matches the patterns I have defined in the > > context for their extension in sip.conf. > > > > What I really need to make work here is Attended-Transfer since that is > > what is desired by those using the system. > > I'll assume we are talking about SIP extensions here. > > What is doing the actual transfer? Is it Asterisk (res_features / > features.conf), or the phones themselves? > > If it is the phones themselves, you're probably out of luck because in an > attended transfer scenario, the transferor has to send a regular ol' INVITE > to the transfer target before sending a REFER to the transferee, and so > there's really no way that Asterisk can know whether that INVITE to the > transfer target is someone in the middle of attempting an attended > transfer, or someone trying to place a regular outbound call. Your only > hope would be to sniff the SIP traffic between your handsets and Asterisk, > and see if there is a SIP header difference that is detectable between what > your phones generate for an attended transfer vs. an outbound call. If > there is, you can use the ${SIP_HEADER()} function in your dialplan to > check for the presence of that difference in order to determine whether a > call is an attended transfer or not. > > If you have the option of using Asterisk's built-in attended transfer > feature (features.conf + passing option 't' to the Dial() command that > calls a given extension for an inbound call) instead of a button on your > phones, you can override which context a transfer target's number is > executed in by overriding the global variable TRANSFER_CONTEXT. So you can > create a new stub context that sets your variable to let you know that this > is a transfer and then jumps to the SIP client's normal context, and set > TRANSFER_CONTEXT=your_new_context under the [globals] section of > extensions.conf. Check for the presence of your variable in the SIP > client's context, and act accordingly. > > Note that in either scenario, as long as you allow attended transfers, the > system can be gamed by people. For example, assuming that extensions can > call other extensions, someone who wants to make an unsanctioned outbound > call simply walks over to a vacant phone in another cubicle, calls their > own phone/extension, rushes back to answer it, and then initiates an > attended transfer that they never end up completing (they just talk to the > person they initiated the transfer to the whole time). > > Hope this helps, > > -- > Nathan Anderson > First Step Internet, LLC > nath...@fsr.com > > -- > _ > -- Bandwidth and Colocation Provided by http://www.api-digital.com -- > New to Asterisk? Join us for a live introductory webinar every Thurs: >http://www.asterisk.org/hello > > asterisk-users mailing list > To UNSUBSCRIBE or update options visit: >http://lists.digium.com/mailman/listinfo/asterisk-users > -- _ -- Bandwidth and Colocation Provided by http://www.api-digital.com -- New to Asterisk? Join us for a live introductory webinar every Thurs: http://www.asterisk.org/hello asterisk-users mailing list To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-users