How to return to script after CallPhoneNumber block

  • How can I return to the script after a number is called with the CallPhoneNumber block?


    User A calls module with phonenumber 101, the module calls the external phone number of user B. User B hangs up, user A is still connected with the callphonenumber block. What should I program to quit the phone call with user B and return user A to the rest of the script?


    Regards Rick

  • Hi,


    are you sure the callphonenumber block isn't left (e.g. by placing a log component behind that to check in the log files)
    In the service-type-module the new call is linked with the initial call but the initial call is not cancelled automatically when the hangup comes from extern. In that scenario placing a hangup component twice behind the callphonenumber block is my advice to terminate both calls properly.

    mfg
    may

  • Hi May,


    Thanks for your answer, but even after twice the hangup() function the caller a is not returned to the script. What am I doing wrong? Any help would be fantastic!


    See the attached screenshot of my script.


    RickCallPhoneNumberBlock.jpg

  • I think I can solve this by calling the outgoing number with asterisk dial() but how can I use this command within the starface script editor?

  • This might be related to a small bug regarding Hangup(). Do you have the chance to try this with STARFACE v5.1 Beta?


    Best regards

  • I will try to reproduce tomorrow, maybe there is something wrong within the programming. What are you trying to accomplish with the double hangup() command? This should actually tell the software to hangup() the original caller.


    Also, please specify what kind of module (see Define module type in Module Settings Tab) you have created here, and give a little overview on what you are trying to accomplish.


    To answer your original question: You should not need to do anything special. As soon as User B hangs up (the one that was called with CallPhoneNumber), the module should resume exactly in the module code after CallPhoneNumber.


    Here is a little snippet of a module type "standard" that works:


    example.jpg


    Best regards,
    Martin

    Edited 3 times, last by mkoenig ().

  • Hi Martin,


    I build exactly the same module as your screenshot, but still nothing happened when the remote site hangs up. what I'm trying to build is a module that perform some steps after the called number hanged up, like stopping an asynchronous recording and uploading the wav file to an ftp server for instance.


    The double hangup() was an idea from May, but unfortunately didn't work.


    Attached the screenshots:


    Development.jpg Module settings.jpg


    Regards Rick

  • Hi,


    I can't reproduce this here. Here is my testbed:


    forum-modul.png


    After the remote party (number 102) hangs up, the next announcement is played. No special handling is required for this. Maybe there is a signalling problem with the endpoint mentioned in the CallPhoneNumber function. So that the Call End Signalling (i.e. SIP BYE) does not reach the PBX, and thus the module does not resume operation?


    Best regards

Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!